Commit Graph

155 Commits

Author SHA1 Message Date
Tom Alexander
3d44d20384
Running into borrow issue on intermediate. 2023-10-29 18:46:14 -04:00
Tom Alexander
f98a09bc59
Use macros for creating the intermediate stage.
This is to make it easier to change function signatures by consolidating the places where the signatures exist.
2023-10-29 18:46:14 -04:00
Tom Alexander
ba511b7f9e
Add another test for footnote definitions. 2023-10-29 18:46:13 -04:00
Tom Alexander
3720558d93
Render the footnote definitions. 2023-10-29 18:46:13 -04:00
Tom Alexander
b66ec507ef
Create a render ast node type. 2023-10-29 18:46:13 -04:00
Tom Alexander
645ae26701
Remove intermediate lifetime. 2023-10-29 14:53:11 -04:00
Tom Alexander
6109902945
Create an intermediate ast node type. 2023-10-29 14:45:02 -04:00
Tom Alexander
cd27869122
Populate render context for footnote references. 2023-10-29 14:45:02 -04:00
Tom Alexander
795945f0da
Register footnote definitions. 2023-10-29 14:45:02 -04:00
Tom Alexander
cb7c28c1ae
Add intermediate lifetime. 2023-10-29 12:24:49 -04:00
Tom Alexander
52ca300de3
Beginning to hand out footnote ids. 2023-10-29 12:24:49 -04:00
Tom Alexander
06dcd22e69
Switch to split inclusive instead of manually-implemented full lines iterator. 2023-10-29 10:59:33 -04:00
Tom Alexander
f87c453459
Move the full lines iterator to its own file. 2023-10-29 10:55:03 -04:00
Tom Alexander
e42edb3f49
Merge branch 'src_block' 2023-10-29 10:44:42 -04:00
Tom Alexander
6d83828012
Add inline source block. 2023-10-29 10:44:32 -04:00
Tom Alexander
eaea37f448
Add a basic template for source blocks. 2023-10-29 10:41:03 -04:00
Tom Alexander
fb99fd2b39
Get the source code lines. 2023-10-29 10:32:05 -04:00
Tom Alexander
313313ae53
Initial structure for unhighlighted source blocks. 2023-10-29 09:37:27 -04:00
Tom Alexander
d9a3b13780
Use raw_link instead of path for regular links. 2023-10-29 09:31:00 -04:00
Tom Alexander
8d9a50226a
Add a tree-sitter-highlight dependency for source blocks. 2023-10-27 21:17:00 -04:00
Tom Alexander
f164838953
Add a space after objects. 2023-10-27 20:54:24 -04:00
Tom Alexander
fe3f2642fe
Add a marker to make incomplete templates more obvious in the rendered html. 2023-10-27 20:51:27 -04:00
Tom Alexander
3d89492518
Add regular link. 2023-10-27 20:43:57 -04:00
Tom Alexander
793789bdf2
Add entity. 2023-10-27 20:27:50 -04:00
Tom Alexander
dbea9318e9
Merge branch 'plain_list' 2023-10-27 20:21:30 -04:00
Tom Alexander
4adaeb0341
Add line break. 2023-10-27 20:21:21 -04:00
Tom Alexander
bfc9e3ed80
Add plain list items. 2023-10-27 20:18:19 -04:00
Tom Alexander
62ffc76376
Add basic templates for plain list. 2023-10-27 20:12:56 -04:00
Tom Alexander
5bbb12327b
Add template for quote blocks. 2023-10-27 19:53:18 -04:00
Tom Alexander
f6c475c80c
Add templates for text markup. 2023-10-27 19:42:33 -04:00
Tom Alexander
4c3bea06d1
Add templates for target, keyword, comment block and comment. 2023-10-27 19:30:16 -04:00
Tom Alexander
0e9d74b2c8
Merge branch 'element_template' 2023-10-27 19:26:38 -04:00
Tom Alexander
6bf1480366
Add a template for paragraph. 2023-10-27 19:26:27 -04:00
Tom Alexander
c279bad13a
Add children to heading. 2023-10-27 19:22:17 -04:00
Tom Alexander
bd982fb62d
Add a template for section. 2023-10-27 18:30:29 -04:00
Tom Alexander
53a531f568
Add dispatcher for object and element. 2023-10-27 18:26:56 -04:00
Tom Alexander
67b60087af
Add templates for the ast nodes. 2023-10-27 18:15:53 -04:00
Tom Alexander
8a3b85d5fa
Merge branch 'element_noop' 2023-10-27 17:49:04 -04:00
Tom Alexander
b0ac14ee58
Add the skeletons for the objects. 2023-10-27 17:48:19 -04:00
Tom Alexander
23713a934c
Add the skeletons for the elements. 2023-10-27 17:08:58 -04:00
Tom Alexander
860b601f62
Merge branch 'build_site' 2023-10-27 16:19:39 -04:00
Tom Alexander
354d24cf69
Add comment as a no-op. 2023-10-27 16:14:37 -04:00
Tom Alexander
5891ac7fb7
Add keyword and as no-op. 2023-10-27 16:09:44 -04:00
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.
2023-10-27 15:55:19 -04:00
Tom Alexander
4a6948cde7
Add paragraph. 2023-10-27 15:46:56 -04:00
Tom Alexander
5b34942b64
Add element. 2023-10-27 15:46:56 -04:00
Tom Alexander
7b01230234
Add target. 2023-10-27 15:05:50 -04:00
Tom Alexander
c6cf5f75ac
Introduce a registry into the conversion to intermediate format. 2023-10-27 15:05:49 -04:00
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.
2023-10-27 13:10:21 -04:00
Tom Alexander
1ac39c2a6f
Add RenderPlainText. 2023-10-27 13:01:45 -04:00