Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
* stipe [[https://b.agaric.net/pub/img/agaric-64.png]] *** about A basic file-based blog engine written in rust, with the help of [[https://actix.rs/][actix]], [[https://github.com/rust-ammonia/ammonia][ammonia]], [[https://crates.io/crates/chrono][chrono]], [[https://github.com/raphlinus/pulldown-cmark][pulldown-cmark]], [[https://crates.io/crates/rand][rand]], and [[https://crates.io/crates/regex][regex]]. Posts are in markdown format and are flat (one level deep). The engine's original implementation [[https://github.com/blobject/stipe/tree/clojure][in clojure]] had to be abandoned due to memory limitations in deployment. *** use - Start by placing all markdown files (eg. your individual blog posts) into a folder situated at =db/=. The filenames should end in =.md=, and each file can include metadata at the very top, with the format: #+BEGIN_SRC markdown key0: value0 key1: value10, value11, ... ::: Lorem ipsum ... #+END_SRC - *Important!* End the metadata declaration with a dinkus, - where a dinkus is a line consisting of only colons and spaces and at least one 3-colon sequence (for example, " : ::: ::::: ::: :"). - A page with no metadata should have a dinkus as the first line. - The =time= key takes the page creation time, in seconds-since-unix-epoch. - The =tag= key takes a comma-separated list of strings, representing the tags associated with the blog post. - The =script= key takes a comma-separated list of filenames (relative to ~pub/js/~), which get appended as ~<script>~ lines to the ~<head>~ block. - The metadata are parsed manually, but for the parsing of the rest of the file (ie. the post itself), see [[https://github.com/raphlinus/pulldown-cmark][pulldown-cmark]] and [[https://spec.commonmark.org/][commonmark]]. - example, /db\slash{}neuromancer.md:/ #+BEGIN_SRC markdown title: Neuromancer (William Gibson) time: 457488001 tag: Science Fiction, Cyberpunk script: wintermute.min.js ::: <h1>Part 1, Chiba City Blues</h1> ## 1 The sky above the port was the color of ... #+END_SRC - Execute the server with ~cargo run~ or ~cargo run --release~. - Visit =http://localhost/page/neuromancer=.