228 Commits (main)
 

Author SHA1 Message Date
Tom Alexander 62ffc76376
Add basic templates for plain list. 6 months ago
Tom Alexander 5bbb12327b
Add template for quote blocks. 6 months ago
Tom Alexander f6c475c80c
Add templates for text markup. 6 months ago
Tom Alexander 4c3bea06d1
Add templates for target, keyword, comment block and comment. 6 months ago
Tom Alexander 0e9d74b2c8
Merge branch 'element_template' 6 months ago
Tom Alexander 6bf1480366
Add a template for paragraph. 6 months ago
Tom Alexander c279bad13a
Add children to heading. 6 months ago
Tom Alexander bd982fb62d
Add a template for section. 6 months ago
Tom Alexander 53a531f568
Add dispatcher for object and element. 6 months ago
Tom Alexander 67b60087af
Add templates for the ast nodes. 6 months ago
Tom Alexander 8a3b85d5fa
Merge branch 'element_noop' 6 months ago
Tom Alexander b0ac14ee58
Add the skeletons for the objects. 6 months ago
Tom Alexander 23713a934c
Add the skeletons for the elements. 6 months ago
Tom Alexander 860b601f62
Merge branch 'build_site' 6 months ago
Tom Alexander 354d24cf69
Add comment as a no-op. 6 months ago
Tom Alexander 5891ac7fb7
Add keyword and as no-op. 6 months ago
Tom Alexander f9377d7609
Make converstion to intermediate state async.
We are going to need to do things like call external tools for syntax highlighting so we are going to need async in there eventually.
6 months ago
Tom Alexander 4a6948cde7
Add paragraph. 6 months ago
Tom Alexander 5b34942b64
Add element. 6 months ago
Tom Alexander 7b01230234
Add target. 6 months ago
Tom Alexander c6cf5f75ac
Introduce a registry into the conversion to intermediate format. 6 months ago
Tom Alexander e3b5f7f74f
Rename blog_post module to intermediate.
This module is mostly the intermediate representation of the AST, so the renaming is to make that more clear. The three forms are parsed => intermediate => render.

Parsed comes from Organic and is a direct translation of the org-mode text.

Intermediate converts the parsed data into owned values and does any calculations that are needed on the data (for example: assigning numbers to footnotes.)

Render takes intermediate and translates it into the format expected by the dust templates. The processing in this step should be minimal since all the logic should be in the intermediate step.
6 months ago
Tom Alexander 1ac39c2a6f
Add RenderPlainText. 6 months ago
Tom Alexander 744d3e50fb
Convert intermediate objects into render objects. 6 months ago
Tom Alexander 4c59011389
Copy heading level. 6 months ago
Tom Alexander ba2756c762
Create intermediate representation for plain text. 6 months ago
Tom Alexander 31a3efe417
Only print the contexts.
This allows us to pipe the output to jq to see the context easier. We can see the rendered output in the files written to disk.
6 months ago
Tom Alexander 2b7a19a1d4
Introduce the corresponding non-render types. 6 months ago
Tom Alexander 3b472a9e96
Introduce element and object enums. 6 months ago
Tom Alexander 77f8375d7a
Introduce an array of document elements. 6 months ago
Tom Alexander 3cfcae25a9
Move the render context to its own folder.
We are going to have a lot of render context types because there are so many org-mode elements/objects so I'm moving it to a separate folder for organization.
6 months ago
Tom Alexander 448e9bb8c6
Add comments. 6 months ago
Tom Alexander 2413923b3f
Render the page title and self link. 6 months ago
Tom Alexander ab36a60545
Generate the minimum relative path by chopping off the shared stem. 6 months ago
Tom Alexander 68cae57f16
Add a function to get the shared portion of a path. 6 months ago
Tom Alexander 11bfb6836f
Include a self-link for the blog. 6 months ago
Tom Alexander 3ac7826d2c
Move the logic into convert_blog_post_page_to_render_context.
I was writing it in the build command's rust files for convenience, but now its getting long enough to warrant moving it into its final location.
6 months ago
Tom Alexander 178ce877bc
Render the head for the page. 6 months ago
Tom Alexander 2b6f86d4e9
Switch to rendering blog post pages instead of blog posts. 6 months ago
Tom Alexander dc233d26b1
Store the title in BlogPostPage. 6 months ago
Tom Alexander e543a5db74
Starting to introduce a BlogPostPage struct.
Blog posts are going to be constructed of multiple documents each forming their own page. This will allow me to link to supporting documents without having to promote them to their own pages.
6 months ago
Tom Alexander 199621b6f1
Remove the separation of the main template.
I don't think this is necessary, and it certainly isn't necessary at this level.
6 months ago
Tom Alexander 586fd8a066
Getting rendered output from duster. 6 months ago
Tom Alexander 043cc5eda4
I think I have worked around the lifetime issue by keeping references to the intermediate str's. 6 months ago
Tom Alexander 58aba8efd5
Invoking the compile function.
I am going to have to address the lifetime issue of "compiled" duster templates borrowing the input str.
6 months ago
Tom Alexander ce0819e85b
Feeding the templates into the renderer integration. 6 months ago
Tom Alexander fc5342adce
Make the renderer a bit more generic. 6 months ago
Tom Alexander aed88cf05a
Add include_dir.
This will let us embed the default versions of templates, stylesheets, javascript, etc into the binary. Naturally, we will eventually support overriding the defaults.
6 months ago
Tom Alexander 24bac982f1
Starting to create the renderer integrations.
These are the layer directly over dust which can be used by anything, not just blog posts.
6 months ago
Tom Alexander 5f34cb2dd5
Creating a SiteRenderer struct to handle the logic for invoking dust. 6 months ago