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:
arse run config.toml-v or -vv, the default level is INFO.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:
https://www.example.com
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:
```toml [site] name = 'Example Site' author = 'Arthur Writeson' url = 'https://www.example.com' template = 'default.tmpl' topics = [ 'one', 'two', 'three', ]
[server] bind = '0.0.0.0' port = 9090
[docpaths] templates = '/home/user/site/templates' webroot = '/home/user/site/webroot' ```
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 sectionpost, available when serving single-posts from from site/:topic/posts/:post.md
GET /:topic/posts/:post where :post is the markdown filename minus its extensionposts, a lexically reverse-sorted list of HTML rendered from markdown in site/:topic/posts/*.md
GET /:topicbind and port may be set in the [server] section.site/:topic/posts and site/:topic/ext[docpaths] are generated as full paths for completeness, however relative paths will work if desired
site/templates and site/webroot and move the directory out of /home/userarse new creates the site tree, and all other output files, in the current working directory.gallery is one of the topics requested
/gallery/ext/*.jpggallery topicLicensed 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.
To discuss features, offer assistance, or get help please join the project's Matrix room.