Skip to content

batunpc/palpatine

Repository files navigation


Markdownify
palpatine

A minimal static site generator (SSG) built with C++

See demo . Read blog

License workflow badge codecov

Overview

Palpatine is a command line tool and a static site generator (SSG) that takes a directory of raw data (text and markdown) and generates a static website. It is designed to be fast, simple and easy to use. Find out how to install palpatine by reading CONTRIBUTING.md

Available flags

Flag Description Required / Optional
-i Specify raw data directory or file e.g. use data directory in the codebase Required
<if -c not specified>
-c Specify config file e.g. use config.json in the codebase Required
<if -i not specified>
-o Specify particular directory that you want to generate static sites to. Optional
-s Add custom stylesheets by specifying the css files.
By default it uses bahunya.
Optional
-h This will display all the available flags that palpatine handles Optional

Usage

Note: The example commands below are using the sample data directory in the codebase. You can use your own data directory or config file.

Input

The most basic usage of palpatine is to specify the input directory (i.e. the directory that contains the raw data)

./palpatine -i data

Input & Output

By default this will generate a dist directory within the project. You can specify a different output directory by using the -o flag

./palpatine -i data -o ~/Desktop

The above command will generate a dist directory in your Desktop.

Stylesheets

Add a custom stylesheet to present your static site in a preffered way (i.e. use water.css) Notice that the URL tail has extension .css

./palpatine -i data -s https://cdn.jsdelivr.net/npm/water.css@2/out/water.css

Config file

You can use a config file in JSON instead of specifying the each flag manually from CLI. The config file should be in the following format:

{
  "input": "data",
  "output": "~/Desktop",
  "stylesheet": "https://cdn.jsdelivr.net/npm/water.css@2/out/water.css"
}

Then you can use the config file by specifying the -c flag

./palpatine -c config.json

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)