Commit 0fa5105e authored by PoroCYon's avatar PoroCYon

add blog stuff

parent f0db251d
out/
stc/mathjax.js
ningau.sh
miscfiles
undertale
......@@ -5,6 +5,8 @@
# Version 2, as published by Sam Hocevar. See http://www.wtfpl.net/ for
# more details.
AWK ?= awk
default: all
DATE:="$(shell date "+%B %e, %Y")"
......@@ -16,7 +18,7 @@ SCSSC ?= sassc
PDMARKDOWN:=markdown_github+raw_tex+yaml_metadata_block+table_captions+implicit_figures+simple_tables+multiline_tables+grid_tables+tex_math_dollars+fenced_code_attributes+inline_code_attributes+markdown_attribute+fancy_lists+all_symbols_escapable+superscript+subscript+header_attributes-emoji-hard_line_breaks
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 \
$(SIDEBAR_FILES_CLEAN)
#-B tpl/before.html -A tpl/after.html
......@@ -36,9 +38,15 @@ OUTPUT_FILES:=$(patsubst src/%.md, 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/blog.md out/blog/postlist.html
$(PANDOC) $(PDFLAGS) -f $(PDMARKDOWN) --template=tpl/template-blog.html -A out/blog/postlist.html -t html "$<" -o "$@"
out/%.html: src/%.md
@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" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"$if(lang)$ lang="$lang$" xml:lang="$lang$"$endif$$if(dir)$ dir="$dir$"$endif$>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
$for(author-meta)$
<meta name="author" content="$author-meta$" />
$endfor$
$if(date-meta)$
<meta name="date" content="$date-meta$" />
$endif$
$if(keywords)$
<meta name="keywords" content="$for(keywords)$$keywords$$sep$, $endfor$" />
$endif$
<title>$if(title)$$title$ - $endif$$maintitle$</title>
<style type="text/css">code{white-space: pre;}</style>
$if(quotes)$
<style type="text/css">q { quotes: "“" "”" "‘" "’"; }</style>
$endif$
$if(highlighting-css)$
<style type="text/css">
$highlighting-css$
</style>
$endif$
$for(css)$
<link rel="stylesheet" href="$css$" type="text/css" />
$endfor$
$if(math)$
$math$
$endif$
$for(header-includes)$
$header-includes$
$endfor$
</head>
<body>
$for(include-before)$
$include-before$
$endfor$
$if(toc)$
<div id="$idprefix$TOC">
$toc$
</div>
$endif$
<table class="maintable">
<tr>
<td class="left"></td>
<td>
<h3><a href="/index.html" class="title">lo kibystu pe la poros</a></h3>
</td>
</tr>
<tr>
<td class="left">
$for(sidebar-links)$
<p><a href="/$sidebar-links$.html">$sidebar-links$</a></p>
$endfor$
</td>
<td class="middle">
$body$
$for(include-after)$
$include-after$
$endfor$
</td>
<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="https://gitlab.com/PoroCYon/kibystu">Website source and SSG</a></p>
<br />
<h3>license</h3>
<a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/">
<img alt="Creative Commons License" class="ccimg" src="/stc/cc-by-sa.png" />
</a>
<br />
This work is licensed under a <a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a>.
$if(date)$
<hr />
<p>Last update: $date$</p>
$endif$
</td>
</tr>
</table>
</body>
</html>
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