https://github.com/xiokka/ironite
Simple static site generator written in Rust.
https://github.com/xiokka/ironite
Last synced: about 1 year ago
JSON representation
Simple static site generator written in Rust.
- Host: GitHub
- URL: https://github.com/xiokka/ironite
- Owner: xiokka
- License: gpl-3.0
- Created: 2024-08-06T19:17:51.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-01-04T04:39:05.000Z (over 1 year ago)
- Last Synced: 2025-02-13T14:43:51.749Z (over 1 year ago)
- Language: Rust
- Size: 32.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ironite
Simple static site generator written in Rust.
[My personal blog runs on ironite](https://xiokka.neocities.org/articles/)
## Usage
Create a new project
```bash
ironite new_project $project_name
```
Example
```bash
ironite new_project "My simple static blog"
```
This will generate some basic project files and directories.
projectname.txt => contains project name.
static/base.html => base HTML file that will be used as a template to generate all pages. It contains two placeholdes ($TITLE and $CONTENT) which the generator function will replace accordingly.
static/about.html => The $CONTENT of the homepage. This also contains the placeholder $NAVCLOUD, which the generator function will replace with links to each tag index page (each tag index page contains links to all entries for that tag).
static/style.css => a rather empty CSS file.
entries/ => contains blog entries.
images/ => contains images.
New blog entry
```bash
ironite new_entry $entry_name
```
Example
```bash
ironite new_entry "This is my entry, there are many like it but this one is mine"
```
Once a new entry is created, the corresponding subdirectory is created inside the entries directory. Within that entry, you will find two files: "tags.txt" and "content.html".
tags.txt contains the tags for that entry, where each tag is separated by a whitespace. For example:
```
linux programming command_line
```
assigns that entry the tags "linux", "programming" and "command_line".
content.html is the blog entry itself. The contents of content.html will be inserted into a copy of base.html and thus the blog entry page will be generated.
Generate site
```bash
ironite generate
```
This will create the public/ directory, where the site has been generated.