example | ||
src | ||
.gitignore | ||
Cargo.lock | ||
Cargo.toml | ||
LICENSE | ||
README.md |
🐐 tetratto!
This is the year of the personal website.
Tetratto (4 * 10^-18
) is a super simple dynamic site server which takes in a conglomeration of HTML files (which are actually Jinja templates) and static files like CSS and JS, then serves them!
You might by wondering: "why dynamic and not just generate a static site then?" Well the answer is simple! I needed something to manage my server remotely through my browser, and most things were just overly complicated for this simple feat.
Features
- Templated HTML files (
html/
directory) - Markdown posts (
posts/
directory, served withhtml/post.html
template) - Super simple SQLite database for authentication (and other stuff)
- Web terminal for managing your server
- Must be enabled in
tetratto.toml
in project root
- Must be enabled in
Usage
Install Tetratto CLI:
cargo install tetratto
Clone the ./example
directory to get started.
You can run a project by running tetratto
in the directory. The entry file for CSS is assumed to be public/css/style.css
. Note that your index.html
file should not include boilerplate stuff, and should instead just include a {% block body %}
for beginning your content in the body. {% block head %}
can be used to place data in the page head element. Templates should all extend the _atto/root.html
template.
Config
You can configure Tetratto by editing the project's tetratto.toml
file.
name
: the{{ name }}
variable in templates (default:Tetratto
)port
: the port the server is served on (default:4118
)database
: the name of the file to store the SQLite database in (default:./atto.db
)