Commit 0fa5105e authored by PoroCYon's avatar PoroCYon

add blog stuff

parent f0db251d
......@@ -5,6 +5,8 @@
# Version 2, as published by Sam Hocevar. See for
# more details.
AWK ?= awk
default: all
DATE:="$(shell date "+%B %e, %Y")"
......@@ -16,7 +18,7 @@ SCSSC ?= sassc
PDFLAGS=-s --ascii -M date=$(DATE) \
-V maintitle=$(MAINTITLE) -c /stc/style-light.css --mathml \
--template=tpl/template -H tpl/header.html \
-H tpl/header.html \
#-B tpl/before.html -A tpl/after.html
......@@ -36,9 +38,15 @@ OUTPUT_FILES:=$(patsubst src/, out/%.html, $(INPUT_FILES))
mkdir -p "$@"
out/blog/postlist.html: src/blog/postdb.tsv out/blog/
< "$<" $(AWK) -F '\t' -f src/blog/mkpostdb.awk > "$@"
out/blog.html: src/ out/blog/postlist.html
$(PANDOC) $(PDFLAGS) -f $(PDMARKDOWN) --template=tpl/template-blog.html -A out/blog/postlist.html -t html "$<" -o "$@"
out/%.html: src/
@if ! [ -d "$(dir $@)" ]; then mkdir -p "$(dir $@)"; fi
$(PANDOC) $(PDFLAGS) -f $(PDMARKDOWN) -t html "$<" -o "$@"
$(PANDOC) $(PDFLAGS) -f $(PDMARKDOWN) --template=tpl/template -t html "$<" -o "$@"
out/stc/%.css: sty/%.scss out/stc/
$(SCSSC) -t compact -M "$<" "$@"
title: blog
## my 'blog'
print "<a href=\"/blog/post/" $1 ".html\">" $3 "</a> (" $2 ")"
# Hello world!
I set up something that should resemble one of thse "blog" thingies,
from the ground up in ~half an hour. (A certain friend kept asking
me to make one as well...)
Everything should be working, I'll add RSS some time later.
hello-world 2017-12-13 Hello, world!
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns=""$if(lang)$ lang="$lang$" xml:lang="$lang$"$endif$$if(dir)$ dir="$dir$"$endif$>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="author" content="$author-meta$" />
<meta name="date" content="$date-meta$" />
<meta name="keywords" content="$for(keywords)$$keywords$$sep$, $endfor$" />
<title>$if(title)$$title$ - $endif$$maintitle$</title>
<style type="text/css">code{white-space: pre;}</style>
<style type="text/css">q { quotes: "“" "”" "‘" "’"; }</style>
<style type="text/css">
<link rel="stylesheet" href="$css$" type="text/css" />
<div id="$idprefix$TOC">
<table class="maintable">
<td class="left"></td>
<h3><a href="/index.html" class="title">lo kibystu pe la poros</a></h3>
<td class="left">
<p><a href="/$sidebar-links$.html">$sidebar-links$</a></p>
<td class="middle">
<td class="right">
<p><a href="javascript:toggle_theme();">Toggle theme</a></p>
<br />
<p>Days without lynx compatibility: 0</p>
<br />
<p><a href="">Website source and SSG</a></p>
<br />
<a rel="license" href="">
<img alt="Creative Commons License" class="ccimg" src="/stc/cc-by-sa.png" />
<br />
This work is licensed under a <a rel="license" href="">Creative Commons Attribution-ShareAlike 4.0 International License</a>.
<hr />
<p>Last update: $date$</p>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment