Rusty!nk

crates.io Build & test Publish to Pages

🚧 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.

Installation

You can install RustyInk using Cargo:

bash cargo install rustyink

Create new project

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

Features

Project Structure

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>

Building custom pages

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.

```md

template: blog

title: ~/Rusty!nk/blog

This is a blog index

```