A very small, very minimal CMS for allowing admins deploying your web applications to add custom pages and have them accessible from a nav bar.
A typical application using TeensyCMS dos so like this:
pages_dir
variable in its config/pages/{tail:.*}
that renders TeensyCMS contentThat's it.
A typical use case for this would be if you wanted a admin to be able to provide their own pages that may or maybe not include:
About
pageContact
pageTerms of Service
pageCode of Conduct
pageA full working example of a website implementing TeensyCMS can be found in the examples/
directory and run with cargo run
, but for reference a simple app might look like this:
```rust use teensy_cms::{TeensyCms, DefaultPage};
let myconfig = MyConfig::fromenv();
let cms = TeensyCms::
// imagine some fancy routing macro that wraps this
fn handlepagerequest(req: Request) -> String {
// something like "contact" or "about"
let page = &req.path_args()["page"];
req.data::
Templates are loaded relative to where the config was loaded from. Configs look like this:
url_root: /page pages: - path: about.html url: /about - title: Submenu pages: - path: sub/page.html url: sub/page ```
A page looks like the following:
title: My Page
```
Intellectual property isn't real. There is no license. If you insist on having one, this is Creative Commons Zero (public domain).