No description
Find a file
2016-12-13 19:14:49 +09:00
src Roughly working page rendering 2016-12-13 19:14:49 +09:00
.editorconfig Create new project 2016-12-06 14:51:33 +09:00
.gitignore Create new project 2016-12-06 14:51:33 +09:00
Cargo.lock Render section pages 2016-12-13 18:05:59 +09:00
Cargo.toml Separate front matter parsing from the page 2016-12-11 15:06:18 +09:00
README.md Separate front matter parsing from the page 2016-12-11 15:06:18 +09:00

Gutenberg

Design

Can be used for blogs or general static pages

Commands:

  • new: start a new project -> creates the structure + default config.toml
  • build: reads all the .md files and build the site with template
  • serve: starts a server and watches/reload the site on change

All pages go into the content folder. Subfolder represents a list of content, ie

├── content
│   ├── posts
│   │   └── intro.md
│   └── some.md

some.md will be accessible at mywebsite.com/some and there will be other pages:

  • mywebsite.com/posts that will list all the pages contained in the posts folder
  • mywebsite.com/posts/intro

Building the site

Get all .md files in content, remove the content/ prefix to their path Split the file between front matter and content Parse the front matter markdown -> HTML for the content TO THINK OF: create list pages for folders, can be done while globbing I guess? Render templates