45 lines
1.2 KiB
Plaintext
45 lines
1.2 KiB
Plaintext
# list all recipes
|
|
default:
|
|
just --list --unsorted
|
|
|
|
# build index
|
|
@index:
|
|
find src -type f -name "*.md" -print0 \
|
|
| sort -zr \
|
|
| xargs -r0 sed -nr '/^(date|name|title): /p' \
|
|
| sed '/^date/{G;}' \
|
|
| recfmt '* <time>{{{{date}}</time> [{{{{title}}]({{{{name}}.html)|' \
|
|
| sed 's/|/\n\n/g' \
|
|
| pandoc \
|
|
-f markdown+autolink_bare_uris \
|
|
-t html5 \
|
|
-s \
|
|
--include-in-header templates/headerinclude.html \
|
|
-A templates/footer.html \
|
|
-M title="a blog that is just a bunch of lists" \
|
|
> www/index.html
|
|
|
|
# build htmls
|
|
html:
|
|
make html
|
|
|
|
# build rss
|
|
rss:
|
|
#!/usr/bin/env sh
|
|
echo "<rss version=\"2.0\"><channel><title>list blog</title>" > www/feed.xml
|
|
echo "<link>http://tilde.town/~dozens/listblog/index.html</link><description>a blog that is just a bunch of lists</description><atom:link rel=\"self\" type=\"application/rss+xml\" href=\"http://tilde.town/~dozens/listblog/episodes.xml\"/>" >> www/feed.xml
|
|
for f in `ls src/*.md`; do
|
|
ed -s $f < commands.ed | recfmt -f templates/template.recfmt | m4 >> www/feed.xml
|
|
done
|
|
echo '</channel></rss>' >> www/feed.xml
|
|
|
|
# make html and rss
|
|
build: index html rss
|
|
|
|
# upload
|
|
up:
|
|
rsync -zaP www/ tilde:public_html/listblog
|
|
|
|
# build and upload
|
|
all: build up
|