Commit Briefs

ec9aff1b16 Rene Kita

Change www root directory (HEAD)


4538db5e0f Rene Kita

Revert "Link to sr.ht mirror for code"

This reverts commit a7fa23e8601799f546ebf07497f1788e0726b6b6.


a7fa23e860 Rene Kita

Link to sr.ht mirror for code

This is due to aggressive bots...


58bd3ea715 Rene Kita

Add robots.txt

Mostly ai.robots.txt v1.40


7b374d83e6 Rene Kita

Add ssh key


f7fd0fe864 Rene Kita

[zsh-globs] Add borked symlinks glob


9aa056d4cf Rene Kita

Add post-receive hook


455df6e0b8 Rene Kita

Allow passing additional arguments to rsync

Mostly useful to do a dry run.


b3e73594b5 Rene Kita

Let rsync skip based on checksum instead of mtime


faddbe4cef Rene Kita

Refactor Makefile


Branches

Tags

This repository contains no tags

Tree

.builds/
.fsan*commits | blame
.genlst*commits | blame
.gitattributescommits | blame
.gitignorecommits | blame
.up-date*commits | blame
Makefilecommits | blame
READMEcommits | blame
about.mccommits | blame
anti-cf.mccommits | blame
artadd*commits | blame
artfoot.mccommits | blame
article.mc.incommits | blame
artimp*commits | blame
assets/
debbug-subscribe.mccommits | blame
feed.mccommits | blame
footer.mccommits | blame
header.mccommits | blame
id_rsa.pubcommits | blame
index.mccommits | blame
irssi-awl.mccommits | blame
irssi-openurl-ssh.mccommits | blame
jekyll-perms.mccommits | blame
ksudbf.mccommits | blame
links.mccommits | blame
m4fnmacro.mccommits | blame
m4html.vimcommits | blame
post-receive*commits | blame
robots.txtcommits | blame
selfhost.mccommits | blame
stddef.m4commits | blame
submodule-ctags.mccommits | blame
ts-bench.mccommits | blame
w3m-gemini.mccommits | blame
zsh-globs.mccommits | blame

README

MINIMAL STATIC SITE GENERATOR / WEBSITE
#######################################

This repository contains my personal weblog including my own static
site generator.

The static site generator uses m4, make, shell and awk. Everything is kept
POSIX-compliant. It can convert the website to a gemini capsule using h2g[0].

Add a new article:
- Pick one:
  + ./artadd short_name "short description"
  + make new NAME=short_name DESC="short description"
- edit 'short_name.mc'
- put images etc in 'assets'
- make
- cp assets/ feed.xml *.html /var/www/html
- or use 'make tar' to create an archive

Updating an article:
- Edit article and don't forget to update MODIFIED
  (Vim users see below)

Working with a draft:
- Pick one:
  + cp article.mc.in drafts/short_name.mc
  + make draft NAME=short_name
- edit 'short_name.mc'
- put images etc in 'assets'
- leave short_name.mc laying around till it's finished
- Replace __TITLE__ in short_name.mc or provide "description" in the next step
- Pick one:
  + ./artimp drafts/short_name.mc ["description"]
  + make import drafts/short_name.mc ["description"]
- make
- cp assets/ feed.xml *.html /var/www/html

See stddef.m4 for macros and usage.

Vim users
---------
Put m4html.vim in ~/.vim/syntax.

Add the following autocmd to your .vimrc:

" '*/blog/' is the directory containing this README
" Update timestamps in blog articles
autocmd BufWritePre,FileWritePre */blog/*.mc   ks|call LastMod()|'s
fun LastMod()
  if line("$") > 5
    let l = 5
  else
    let l = line("$")
  endif
  exe "1," .. l .. "g/MODIFIED/s/, `.*'/, `" .
   \ strftime("%FT%TZ", strptime("%F%T", system('date -u "+%F%T"'))) . "'"
endfun

(The autocmd is an adjusted version of the one found in the vim help,
see ':h autocmd'.)

--
[0]: https://sr.ht/~rkta/h2g/