A simple static website generator.
The markdown parser supports the following elements from the CommonMark Spec:
- Thematic breaks
- ATX headings
- Indented code blocks
- Fenced code blocks
- Paragraphs
- Blank lines
- Block quotes
- Lists and list items
- Code spans
- Emphasis and strong emphasis
- Images
- Implement md to html function - TODO: this bit next!
- Implement template rendering of webpage
- input path for which template to use (defaults to base.html)
- template is parsed, components are fetched and necessary params are logged
- return string of html using template.render
- render accepts arguments for the necessary data used by the template
- data is inserted into the html template at the correct points
- allow parsing @foreach statements
- build.ts links together all of the parts mentioned above, including selecting
- Accept markdown input
- Parse frontmatter
- Convert Markdown → HTML
- Choose template
- Render template with page data
- Write HTML to static
- An ordered list cannot interrupt a paragraph unless it starts with "1.", but the current implementation is forgiving.
- List items cannot be empty in this implementation
- Currently no option for soft line breaks to be rendered as hard line breaks