9 releases
0.5.9 | Aug 28, 2023 |
---|---|
0.5.8 | Dec 24, 2022 |
0.5.5 | Nov 20, 2022 |
#1596 in Web programming
29 downloads per month
18KB
286 lines
Rumage
Rumage is a simple web framework. It converts Markdown files to plain HTML.
⚠️ Rumage is not fully production ready! It is pretty stable, but it needs more error handling. You could use it, but keep in mind that if you encounter an error, it might be harder to troubleshoot. I use it for my personal website.
Features
- ⚡️ Blazingly fast
- ✨ Simple by design
- 📄 Markdown and HTML
- 💔 ZERO JavaScript
- 🧑💻 Customizable
Installation
Make sure you have installed cargo and install rumage like this:
cargo install rumage
Usage
For building:
rumage build
Pages
Rumage supports both Markdown and HTML pages. Create an index.md
or index.html
to create a home page.
Also add some properties at the top to add a title and description. By default, you need to
fill those in, else they will replaced with %title%
and %description%
. (this will be addressed soon),
index.md
---
title: Homepage
description: Cool page
---
# Homepage
lorem
If you want to do more with properties, check Head tag.
You can include HTML in Markdown files, but you can't include Markdown in HTML files. (this will be addressed soon)
Style
To add style to your website, add a style.css
in your source folder. Rumage
will automatically pick it up and include it in all your pages.
Head tag
By default, the head tag contains a customisable title and description property, a favicon and stylesheet.
Default name for favicon is favicon.png
and the global stylesheet is style.css
.
To customise the head of every page, add a _head.html
in your source folder.
You can use %property%
in the html to replace it with custom values from markdown
pages.
Example:
_head.html
<head>
<title>%title</title>
<meta name="description" content="%description%" />
<meta name="tags" content="%tags%" />
</head>
index.md
---
title: Home
description: The homepage
tags: tech, typescript, web, rust
---
# Hello world
Routing
The routing is very simple, all files represent a route.
Custom components
Planned
Nav & Footer
To add a navbar or a footer, create a _nav.html
or _nav.md
for a navbar,
and _footer.html
or _footer.md
for a footer.
If those files are present in the source folder, all pages will contain navbar
and footer by default. To disable this, add nav: false
or footer: false
at the top of the file.
---
nav: false
footer: false
---
Dependencies
~13–24MB
~349K SLoC