A Rust Site Engine https://crates.io/crates/arse
Go to file
Anthony J. Martinez 564845c13e
Update deps and rev to 0.11.5
2021-09-28 14:15:11 +02:00
src Update deps, implement RSS feed, rev 0.11.0 2021-07-11 11:38:58 +00:00
test_files Update deps, implement RSS feed, rev 0.11.0 2021-07-11 11:38:58 +00:00
.gitignore Bump deps and rev to 0.11.3, update .gitignore 2021-08-29 17:24:19 +02:00
Cargo.lock Update deps and rev to 0.11.5 2021-09-28 14:15:11 +02:00
Cargo.toml Update deps and rev to 0.11.5 2021-09-28 14:15:11 +02:00
LICENSE-APACHE Name the project. Add a README, and license headers. 2021-04-10 11:27:29 +02:00
LICENSE-MIT Name the project. Add a README, and license headers. 2021-04-10 11:27:29 +02:00
README.md Update README.md 2021-07-11 11:41:29 +00:00


A Rust Site Engine

A Rust Site Engine, or arse, is static site generator written in Rust. It seeks to provide a simple and flexible base for serving sites using:


  • Run an existing site given the path to its config TOML: arse run config.toml
  • Logging verbosity can be increased with -v or -vv, the default level is INFO.
  • Create and run a new site from user input: arse new
$ arse new
2021-05-01T17:34:11.155427589+00:00 [INFO] Logging started
2021-05-01T17:34:11.155543182+00:00 [INFO] Generating new site configuration
Please enter a name for the site: 
Example Site
Please enter the site author's name: 
Arthur Writeson
Please enter the base URL for your site:
Please enter comma-separated site topics: 
one, two, three
2021-05-01T17:34:26.501980660+00:00 [INFO] Creating site filesystem tree
2021-05-01T17:34:26.504816188+00:00 [INFO] Writing site configuration to disk


An example config, as generated, is shown below:

name = 'Example Site'
author = 'Arthur Writeson'
url = 'https://www.example.com'
template = 'default.tmpl'
topics = [

bind = ''
port = 9090

templates = '/home/user/site/templates'
webroot = '/home/user/site/webroot'

Rendering and Styling

A default template, default.tmpl, is provided statically within the binary. To change the Tera template, add your custom template to the templates directory referenced in the [docpaths] configuration section of config.toml. Once the template is in the templates directory, change the templates parameter in the [site] configuration section to reference the template's file name. This template will now be loaded at runtime.

The following elements are available within the Tera context for rendering:

  • site, mapping directly to the fields available in the site configuration section
  • post, available when serving single-posts from from site/:topic/posts/:post.md
    • Used when serving GET /:topic/posts/:post where :post is the markdown filename minus its extension
  • posts, a lexically reverse-sorted list of HTML rendered from markdown in site/:topic/posts/*.md
    • Used when serving GET /:topic

Further Customizations

  • bind and port may be set in the [server] section.
  • New topics are added as array elements
    • For each new topic, create the necessary paths site/:topic/posts and site/:topic/ext
  • Items in [docpaths] are generated as full paths for completeness, however relative paths will work if desired
    • From the example above the user is free to simply use site/templates and site/webroot and move the directory out of /home/user
    • Note that arse new creates the site tree, and all other output files, in the current working directory.
  • If gallery is one of the topics requested
    • A simple image slideshow will be generated for /gallery/ext/*.jpg
    • Display will follow the same lexical reverse order as posts.

Path to 1.0

  • Dynamic route handling
  • Provide meaningful logging of binary activites at appropriate levels
  • Context-specific Errors and handling
  • Support custom Tera templates
  • Support custom bind address and port
  • Support favicons
  • Support a special gallery topic
  • Support RSS feeds


Licensed under either of

at your option.


Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.