5 releases

0.2.58 Jan 29, 2023
0.2.57 Jan 16, 2023
0.2.49 Nov 12, 2021
0.2.48 Nov 12, 2021
0.2.46 Nov 1, 2021

#1159 in Web programming

MPL-2.0 license

21KB
374 lines

cover

Sedum is a static site generator written in Rust. It can be used locally or with a service like Netlify to generate websites on the fly.

Check and Lint Security audit Release Netlify Status

Usage

Local

Prerequisites

You must have rust and cargo installed and available on the path.

Setup

  1. Run git clone https://github.com/ellygaytor/Sedum.git
  2. Prepend the appropriate yaml to your markdown files (prepending and appending ---) (optional): - title - description - language - author - list ('True' or 'False')

Generation

  1. Run cargo run [source] [result], setting the source directory and the directory you want the generated files to be placed in.

Netlify

File Based

  1. Add netlify.toml to your git repository
  2. Change the build command and publish directory to fit your needs (optional)
  3. Prepend the appropriate yaml to your markdown files (prepending and appending ---) (optional)

Manual

Setup
  1. Set your build command to wget -N https://github.com/ellygaytor/Sedum/releases/latest/download/sedum && chmod +x sedum && ./sedum [source] [result], setting the source directory and the directory you want the generated files to be placed in.
  2. Set your publish directory to [result] that you chose in step one.
  3. Prepend the appropriate yaml to your markdown files (prepending and appending ---) (optional): - title - description - language - author - list ('True' or 'False')
Generation
  1. Place your markdown files in [source] that you set in step one of setup
  2. Push the changes, and Netlify will automatically download the latest version of Sedum, and generate the files.

Options:

Option Usage Description
-t or —timestamp -t … Add a timestamp (in seconds since epoch) in a comment to the generated HTML
-m or -metadata -m … Generate a metadata file in the target directory that specifies the time at generation, operating system, and version of Sedum

Dynamic Replace:

Usage Description
|LIST| Insert a HTML list of files with list enabled
|TIMESTAMP| Insert the number of seconds since the epoch
|COPYRIGHT| Insert a copyright notice for the author of the page or the default author in settings.

Settings File:

The settings file is placed in the source directory, and uses YAML.

Usage Description
default_author The default author to be used if not set in the page options

Dependencies

~5–13MB
~155K SLoC