Neur
A minimalist static site generator using the Tera templating engine, Lightning CSS, and Comrak.
Documentation
Installation
From source
- Clone the repository
- Install using
cargo install
Basic usage
Neur comes configured out-of-the-box, allowing you to get started quickly.
To create a new project, simply create a src sub-directory for your files and run neur.
src/
├─ home.css
├─ index.html
├─ about.html
The output files are generated in the dist sub-directory by default.
To change the default source and output directories, refer to configuration.
Templates
Neur uses the Tera templating engine. All html files starting with an _ are not considered for generation and thus can be used as layouts, components, etc. Refer to Tera's documentation for more info.
Markdown
Neur supports generating html pages from markdown files. These files use the _template.html found in the same directory, or a minimal fallback template.
Here's an example of how you might create a custom template:
posts/
├─ _template.html
├─ hello-world.md
(in _template.html)
<!doctype html>
{{ title }}
{{ title }}
Published on {{ date }}.
{{ content }}
(in hello-world.md)
title: Hello world!
date: 24th of December.
CSS
Neur supports CSS syntax lowering using Lightning CSS, allowing you to use features such as nested styles, logical properties, etc.
Configuration
Neur comes configured out-of-the-box with sensible defaults, however these can be changed either by passing arguments to the command-line, or defining them in neur.toml. In case of conflicts, command-line arguments take precedence.
Command-line
neur.toml
= "pages"
= true
Configuration reference
-
source: . Defaults to "src" The path to the source directory to use as input for the generator.
-
output: . Defaults to "dist" The path to the output directory to store the generated files.
-
minify: bool. Defaults to false. Whether to minify the output files.