Statyk is a versatile static site generator.
Go to file
Yann Esposito (Yogsototh) f9b7a019d2
Modifying the strategy to use external cmds
2024-01-22 18:13:33 +01:00
resources/statyk Improve readme 2024-01-20 00:08:31 +01:00
.gitignore added resources 2024-01-16 09:02:07 +01:00
README.org New org 2024-01-21 23:10:19 +01:00
deps.edn Small logging improvement 2024-01-18 18:09:01 +01:00
statyk Modifying the strategy to use external cmds 2024-01-22 18:13:33 +01:00

README.org

Readme

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:

_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

Another mechanism is building intermediate files.

phase 1:
  _src/           ---------------------->  _cache/
    post/01.md    - md-cache-rss.json  ->     post/01.rss.json
    post/02.org   - org-cache-rss.json ->     post/02.rss.json
    ...
    post/42.org   - org-cache-rss.json ->     post/42.rss.json

phase 2:
  _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

Organization of transformers:

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