quick and dirty static site generator
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Lilly Rosaline e4da3ce475 index must always be written, so write to it before exiting 3 months ago
.idea Initial commit of version 0.1.0 3 months ago
src index must always be written, so write to it before exiting 3 months ago
.gitignore minor refactors here and there 3 months ago
Cargo.lock partial implementation of hashing? 3 months ago
Cargo.toml partial implementation of hashing? 3 months ago
LICENSE.md Initial commit of version 0.1.0 3 months ago
README.md Create README.md 3 months ago
Typeset.iml Initial commit of version 0.1.0 3 months ago

README.md

typeset

Quick and dirty static site generator

How to use

  1. Create a folder where you will store your markdown and configuration files. One good option is to use whatever folder you're gonna store your output posts in and create a subdirectory.
  2. In that folder, create the following files:
  • typeset.toml
  • index.html
  • template.html
  1. In typeset.toml, enter the following keys.
Key Value
schema_version For Typeset 0.1.0, this should be 1.
name The name of the blog. Currently unused.
index The filename of the index page. Should be index.html.
template The filename of the template. Should be template.html.
page_title The pattern to use for page titles. Currently unused.
input Regex to select pages to input as markdown. I recommend .md#.
output The output directory for the index, template, and posts. If in a subdirectory 1 level deep, use "..".
ref_from_index Currently unused, but must be set.
time_format Format string for the time. See this page.
  1. In index.html, create HTML for the page which will show a list of links to all posts. Create only 1 link to a post, and instead of an <a> element to link to the post, type the following:
<meta typeset="index-entry" content="n"/>

where the n in the value of the content field is equal to how many levels up is the unit that should be repeated per post.

  1. In template.html, create HTML for an individal post. In lieu of the actual name and contents of the post, use the following tags instead:
Key Value
<meta typeset="page-title" content="..."/> Use in place of a <title> element. In the content attribute, a $ will be replaced with the page title.
<meta typeset="title"/> The page title, in text form.
<meta typeset="date"/> The post's publication date.
<meta typeset="body"/> The text component of the page, in text form. Do not use a <body> tag!!
  1. Create a markdown file. Before you begin writing, insert the following lines (with the ... changed based on your needs, but with the quotes still present):
Key Value
title = "..." The title of the page.
published = "..." The publication date of the page. MUST be in the format specified in typeset.toml!
  1. Insert line breaks, and begin writing.
  2. Once you're done writing all your posts, simply enter the directory containing your posts, template, index, and typeset.toml files, and run typeset.
  3. Your index in HTML form as well as all your posts should come out nicely!
  4. If they don't, it's probably a bug. Open an issue, if you would.