website/README.md

30 lines
1.4 KiB
Markdown
Raw Permalink Normal View History

2020-05-08 17:26:39 +00:00
# mycelial.technology
2021-11-21 13:54:30 +00:00
_glyph's website_
2021-11-21 13:54:30 +00:00
Handwritten CSS and HTML, images, an HTML splicer and an RSS generator.
2021-11-21 14:02:02 +00:00
## nyf
2021-11-21 13:54:30 +00:00
2021-11-26 09:20:06 +00:00
`src/lib.rs`
2021-11-21 13:54:30 +00:00
An opinionated, custom-built HTML splicer. It reads HTML templates, splices them into a base template and writes the output.
Templates are expected at `./templates` and output is written to `./site`. The `./site` directory will be created if it doesn't exist.
A base template is expected at `./templates/base.html`. It must contain two tags: `[[ title ]]` and `[[ content ]]`.
The root index template is expected at `./templates/index.html`. All other templates are expected to be in sub-directories; for example: `./templates/plants/index.html` or `./templates/fungi/entomopathogens.html`.
The splicer crawls the sub-directories of `./templates`, reads each HTML file, splices it into the `[[ content ]]` tag of the base HTML template and writes the output to the `./site` directory (preserving the sub-directory structure). The contents of the `<h2>` element are spliced into the `[[ title ]]` tag of the base HTML template for each sub-directory template.
## RSS Generator
`src/bin/generate_rss.rs`
A custom RSS generator. It crawls the template sub-directories containing articles for syndication, extracts relevant information and writes the items to `./static/feed.rss`.
2020-06-17 16:53:13 +00:00
## License
[CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/)