statyk/README.org

88 lines
2.1 KiB
Org Mode
Raw Permalink Normal View History

2024-01-19 23:08:31 +00:00
#+title: Readme
#+author: Yann Esposito
#+created: [2024-01-19 Fri]
* =statyk=
A short program whose goal is to build a static websites as naturally as possible.
The main concept is about keeping in sync a directory of files and their
respective content.
Mainly we would like the following:
For every file in ~_src~ directory create an associated generated file in ~_site~.
For example:
#+begin_src
2024-01-20 22:37:16 +00:00
_src/ ---------------> _site/
index.md - md-to-html -> index.html
about.org - org-to-html -> about.html
yolo.html - cp -> yolo.html
post/01.md - md-to-html -> post/01.html
post/02.org - md-to-html -> post/02.html
img/logo.png - png-to-webp -> img/logo.webp
css/main.sass - sass-to-css -> css/main.css
js/main.js - js-to-js -> js/main.js
2024-01-19 23:08:31 +00:00
#+end_src
2024-01-20 22:37:16 +00:00
Another mechanism is building intermediate files.
2024-01-19 23:08:31 +00:00
#+begin_src
phase 1:
2024-01-20 22:37:16 +00:00
_src/ ----------------------> _cache/
post/01.md - md-cache-rss.json -> post/01.rss.json
post/02.org - org-cache-rss.json -> post/02.rss.json
2024-01-19 23:08:31 +00:00
...
2024-01-20 22:37:16 +00:00
post/42.org - org-cache-rss.json -> post/42.rss.json
2024-01-19 23:08:31 +00:00
phase 2:
2024-01-20 22:37:16 +00:00
_cache/ --------------------> _site/
**/*rss.json - all-rss.json-gen -> rss.xml
**/*.kwds - all-kwds-gen -> keywords-index.html
-> keyword-1.html
-> keyword-2.html
-> ...
-> keyword-n.html
2024-01-19 23:08:31 +00:00
#+end_src
2024-01-21 22:10:19 +00:00
Organization of transformers:
#+begin_src
operators/
map/
html/
gemini.sh
html.sh
md.sh
org.sh
txt.sh
css/
sass.sh
less.sh
css.sh
webp/
jpg.sh
jpeg.sh
gif.sh
png.sh
cache/
map/
rss.json/
gemini.sh
html.sh
md.sh
org.sh
txt.sh
sitemap.json/
gemini.sh
html.sh
md.sh
org.sh
txt.sh
reduce/
rss.xml/rss.json.sh
sitemap.xml/sitemap.json.sh
sitemap.html/sitemap.json.sh
#+end_src