ssg-wiki banner

ssg-wiki

6 devlogs
8h 23m 26s

MediaWiki-esque documentation/online wiki tool that can be statically generated from (custom) wikitext files.

lenny

Links are now working. How I’m doing this is by creating a map of all the pages before rendering them to the AST->HTML thing can just find the value for that key (which is the page name) and use that. if it starts with http*:// it just assumes it’s external. (Yes I know I need to add other protocols like mailto and stuff but at the moment it’s clashing with the Namespace:Pages)

Attachment
0
lenny

I finally got templates working! They use a different system to regular pages, and provide a default export which is executed at build time to create the template’s HTML. In the screenshot you can see the page’s markup and the template’s script. In the future I want to add something like useTemplate to the template scripting so they can require each other.

Attachment
0
lenny

I finally got another part working! I have a small module which takes an input directory, turns all the subfolders and stuff into namespaces, and links them together and renders it onto a theme using Nunjucks! in this screenshot you can see the SGW code and the rendered output.

Attachment
0
lenny

I tried recreating Wikipedia’s vector theme as a nunjucks template so my HTML could render into it.

Attachment
0
lenny

I wrote a thing to convert tokens to an AST, i also made a small web demo because its nicer to look at than the unit tests.

Attachment
0
lenny

I wrote a tokenizer that converts my custom wikitext markdown language to an array of tokens with a type such as text, bold, template, link, etc. and parameters.

Attachment
0