🚧 This project is currently under development. Expect breaking changes. 🚧
A sleek and minimalist static site generator written in Rust. Designed with simplicity in mind, RustyInk makes website creation a breeze.
You can install RustyInk using Cargo:
bash
cargo install rustyink
You can initialise a new project using new
command.
bash
rustyink new <folder>
You can optionally specify a theme also.
bash
rustyink new <folder> -t pico
The following folder structure is expected by RustyInk:
docs/
├─ public/
├─ pages/
│ ├─ page.md
│ ├─ path/
│ │ ├─ page.md
│ │ ├─ custom-url.md
├─ theme/
│ ├─ global.css
│ ├─ app.hbs
│ ├─ custom-template.hbs
├─ Settings.toml
The docs
folder is the input directory of the project and is always specified while running dev server or building. You can specify a different input directory like this:
bash
rustyink dev <input-dir-path>
Settings.toml
file contains the settings of the website, you can customize the website by changing the values in this file.public
folder contains all the static assets of the website, these files are copied as-is to the output directory.pages
folder contains all the Markdown files, this is where you write your content.theme
folder contains all site templates and styles. It is written using handlebars syntax.global.css
file contains the global CSS of the website, you can write your own CSS in this file.A great example would be a blog index page where you show a list of posts and link to them. This can be achieved by accessing the site directory that is passed to every page. The site directory can be accessed through the root object, this is available in every page and it represents the entire site structure including its metadata, so I can render a blog index page like this:
A custom template say blog
, with lists all pages under blog
folder.
```handlebars
```
Then define a new page under blog folder and specify the template as blog
which we have created as shown above.
template: blog
```