What's on this page
Directory structure
File system tree
Project files organization.
<mywebsite>
├─ pages
| ├─ blog <- Section
| | ├─ post-1.md <- Page in Section
| | └─ post-2.md
| ├─ projects
| | └─ project-a.md
| └─ about.md <- Root page
├─ assets
| ├─ styles.scss <- Asset file
| └─ logo.png
├─ static
| └─ file.pdf <- Static file
└─ data
└─ authors.yml <- Data collection Built website tree
Result of the build.
<mywebsite>
└─ _site
├─ index.html <- Generated home page
├─ blog/
| ├─ index.html <- Generated list of posts
| ├─ post-1/index.html <- A blog post
| └─ post-2/index.html
├─ projects/
| ├─ index.html
| └─ project-a/index.html
├─ about/index.html
├─ styles.css
├─ logo.png
└─ file.pdf File based routing
Markdown files in the pages directory enable file based routing. Meaning that adding a pages/my-projects/project-a.md for instance will make it available at /project-a in your browser.
File:
pages/my-projects/project-a.md
└───── filepath ──────┘
URL:
┌───── baseurl ─────┬─────── path ────────┐
https://example.com/my-projects/project-a/index.html
└─ section ─┴─ slug ──┘