lfe / lfe.github.io

The LFE Landing Site / Home Page
https://lfe.io/
28 stars 19 forks source link

Break up the walls of text on non-home pages #123

Open oubiwann opened 10 months ago

oubiwann commented 10 months ago

TailwindCSS has some nice content separators, callouts, etc., than can be used on the following pages to break up the text and make the read experience a little better:

Resources:

oubiwann commented 10 months ago

These have potential (both for design and re-thinking info architecture):

oubiwann commented 10 months ago

Hrm. This is going to be tricky:

There is a Rust markdown library that has an alpha version capable of parsing markdown to an AST:

Perhaps it would be possible to override the Zola parser? Get the mdast as a Rust data structure, walk the AST, convert each heading and its content to HTML, put those in Tera variables and make the available to Zola templates?

Yikes, that sounds like a doozy of a project.

oubiwann commented 10 months ago

Gonna stop poking now, but should be possible to (with a Zola fork):

oubiwann commented 10 months ago

I've done a little cleanup of the /learn page that should help us limp along until a better/cleaner solution is ready.

oubiwann commented 10 months ago

Moving the longer-term solution for this to the backlog ...

oubiwann commented 10 months ago

Let's see where the work here goes:

If that pans out, we can switch the LFE site to using poise instead of zola, and we can update the templates to use the markdown AST to do the specialised rendering setups to avoid walls of text from straight markdown ...

oubiwann commented 10 months ago

Working on a tool that the poise static generator will need in order for all of this to be possible (extracting selective chunks of a parsed Markdown file for rendering in specific locations in a page template).

That tool is here, and I'm making good progress on it :-D

The usage examples in the README are all currently working (v0.1.0, unreleased). I think this tool will be most useful when shell support has landed, which will allow poise to run it in a supervisor and write commands to its stdin to generate the desired output (thus avoiding the bad pattern of shelling out to the system for every markdown file that needs to be processed).