-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TODO: - Include page contexts when rendering descendant layouts; lowest layout should include chained parent contexts up to the first non-layout page (perhaps by making `page` a list of pages rather than just the immediate parent page?) - Parallelise building - `meta` context - Write documentation on concepts (including usage) - Document `main.rs` - Create logo
- Loading branch information
Showing
11 changed files
with
94 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,2 @@ | ||
# Vox | ||
A performant static site generator built to scale. | ||
|
||
## Features | ||
* Fast build times. | ||
* Intelligent rebuilding; only pages needing rebuilding are rebuilt. | ||
* Flexible data model, perfect for any static site. | ||
|
||
## Overview | ||
Sites have the following structure: | ||
- A `global.toml` file. Anything here defines the `{{ global }}` context. | ||
- `.vox` files: | ||
- Inside the `layouts` folder, defining pages which other pages can use as a template; layout pages provide the `{{ layout }}` context to their child pages. | ||
- Inside the `snippets` folder, defining partial pages which can be embedded in other pages. | ||
- Inside any other subdirectory, defining pages inside a collection; a collection provides its own context, referred to by the name of the subdirectory. | ||
- Inside the root folder, defining pages not inside a collection. | ||
All of the items above are optional; even the `global.toml` file is optional if no page requires it. | ||
|
||
Building occurs in the following stages: | ||
1. A directed acyclic graph (DAG) of pages (`.vox` files) is built. | ||
2. Pages are built iteratively, descending the hierarchy of pages. | ||
3. If serving, changed pages trigger rebuilds of themselves and their child pages. | ||
- This avoids the need for a site-wide rebuild. | ||
# [Vox](https://emmyoh.github.io/vox/) | ||
A performant static site generator built to scale. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
title = "Greetings from Vox" | ||
date = 2024-05-30T00:00:00+00:00 | ||
layout = "post" | ||
permalink = "date" | ||
--- | ||
|
||
Welcome to the Vox blog! Here, you'll find posts regarding milestones and general discussion regarding static site generators. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
title = "Data Model" | ||
layout = "page" | ||
permalink = "none" | ||
--- | ||
|
||
{% markdown %} | ||
|
||
## Overview | ||
{% raw %} | ||
Sites have the following structure: | ||
- A `global.toml` file. Anything here defines the `{{ global }}` context. | ||
- `.vox` files: | ||
- Inside the `layouts` folder, defining pages which other pages can use as a template; layout pages provide the `{{ layout }}` context to their child pages. | ||
- Inside any other subdirectory, defining pages inside a collection; a collection provides its own context, referred to by the name of the subdirectory. | ||
- Inside the root folder, defining pages not inside a collection. | ||
- `.voxs` files: | ||
- Inside the `snippets` folder, defining partial pages which can be embedded in other pages. | ||
- Anything else is simply ignored. | ||
All of the items above are optional; even the `global.toml` file is optional if no page requires it. | ||
{% endraw %} | ||
|
||
{% endmarkdown %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
collections = ["blog"] | ||
permalink = "blog/atom.xml" | ||
--- | ||
{% include atom.voxs posts = blog %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
layout = "default" | ||
collections = ["blog"] | ||
permalink = "blog/index.html" | ||
--- | ||
{% assign posts = blog | sort: "blog.date" %} | ||
{% include index.voxs posts = posts minimal = true %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
layout = "default" | ||
collections = ["guide"] | ||
permalink = "guide/index.html" | ||
--- | ||
{% assign posts = guide | sort: "guide.date" %} | ||
{% include index.voxs posts = posts minimal = true %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{% if include.minimal %} | ||
{% for post in include.posts %} | ||
<article class="post"> | ||
<h1 class="post-title"> | ||
<a href="{{ post.url | prepend: global.url }}"> | ||
{{ post.data.title }} | ||
</a> | ||
</h1> | ||
{% if post.date %} | ||
<time datetime="{{ post.date.rfc_2822 }}" class="post-date">{{ post.date.short_day }}, {{ post.date.day }} {{ post.date.short_month }} {{ post.date.year }}</time> | ||
{% endif %} | ||
</article> | ||
{% endfor %} | ||
{% else %} | ||
<div class="posts"> | ||
{% for post in include.posts %} | ||
<article class="post"> | ||
<h1 class="post-title"> | ||
<a href="{{ post.url | prepend: global.url }}"> | ||
{{ post.data.title }} | ||
</a> | ||
</h1> | ||
{% if post.date %} | ||
<time datetime="{{ post.date.rfc_2822 }}" class="post-date">{{ post.date.short_day }}, {{ post.date.day }} {{ post.date.short_month }} {{ post.date.year }}</time> | ||
{% endif %} | ||
{{ post.rendered }} | ||
</article> | ||
{% endfor %} | ||
</div> | ||
{% endif %} |