|
|
|
|
|
by neilv
964 days ago
|
|
For over 2 decades, my personal Web site has been generated from one big Emacs Lisp file (plus a filesystem tree of image and downloadable files). Both the code and the text data were in the one file. The code included features like rich syntax coloring source view of files (fairly unusual at the time) that were also downloadable, and calendar-based blog navigation. Over time, the code changed a little, such as to convert from HTML tables to CSS with the same look. Just the one file, in Emacs, was a very rapid and lightweight way to work. Imagine a code file that includes simple function definitions, like that below, and calls to those functions, passed a mix of static and generated data for the pages. (defun web5-write-html-file-format-sideheads
(root-dir subdir leaf-fname title-list sections)
(if (stringp title-list)
(setq title-list (list title-list)))
(web5-write-file root-dir
(concat subdir "/" (or leaf-fname "index.html"))
(web5-page-html title-list
(web5-format-sideheads title-list
sections))))
If I were doing it today, I'd probably do lots of Markdown files and a bespoke generator program, though that wouldn't be quite as rapid to develop as the Emacs single file one was. |
|
And also various others, for various reasons. The thing about static site generators is that they are fantastically easy.