--- title: powered by subtitle: of course it was time to diy a static blog generator, why wouldn't he do such a thing? author: david marsh toc: true --- Aim: To have a [static] blog build engine that just uses a [Makefile] for any configuration and deployment, and uses markup that's simple and compatable with other [Static Site Generators] Result: All settings in the [Makefile] and (if wanted) a [css] file located in `$(SRCDIR)`. Most markup I use for this site is shown at the [test](test.html) page. Needed software --------------- * [gnumake] for build engine * [pandoc] convert markdown to html * [yuicompressor] for `css` * [imagemagick] for converting images into `webp` * [rsync] and pre-shared keys (for deploying) Optional software ----------------- * [linklint] to check links File conventions ---------------- * all content files reside in: `$(SRCDIR)` * blog file format: `YYYY-MM-DD.title_spaces.$(MD)` * post file fomat: `title_spaces.$(MD)` * special posts start with: * `list_of_*.$(MD)` * `rpg_*.$(MD)` * `howto_*.$(MD)` * `draft_*.$(MD)` Build and Push ---------------- `make -j ; make push` Makefile -------- See `make help` for more options: ``` Usage: make [flags] [option] make all Build everything make pages Build markdown pages make prime Build primary pages make images Build images make push Push site to prod via rsync make test Start local test server make open Open main page in browser make back TAR and backup (eg ../backup/site.YYYY-MM-DD.tar.gz) make clean Remove all generated files make tidy Tidy extra files make nomac Tidy mac files make index Build index files make posts Build post files make archive Build archive files make lists Build list files make tables Build table files make rpg Build rpg files make reviews Build reviews files make howtos Build howtos files make drafts Build drafts files make css Build css file make favicon Build favicon file make sitemap Build sitemap files make robots Build robots file make rss Build rss feeds make new Create a draft post and open for editing make about About this Makefile make copy Copyright notice make help Show this help Useful make flags: make -n dry run make -j run simultaneous jobs make -B force make target You can override Makefile vars like so: make site_css=pandoc.css ``` Licence ------- ``` Copyright (C) 2021-2022 David Marsh rdmarsh@gmail.com https://rdm.sh/powered_by.html This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions. View the file "LICENSE" for details. ``` todo ---- Check [todo](todo.html) for things left todo or ideas I want to try. [Makefile]: Makefile [css]: _.css [gnumake]: https://www.gnu.org/software/make/ [pandoc]: https://pandoc.org [yuicompressor]: https://yui.github.io/yuicompressor/ [imagemagick]: https://imagemagick.org/index.php [rsync]: https://linux.die.net/man/1/rsync [linklint]: http://www.linklint.org [static]: https://en.wikipedia.org/wiki/Static_web_page [Static Site Generators]: https://jamstack.org/generators/