Eakam1007 / rost_gen

A simple static site generator built using Rust
MIT License
0 stars 3 forks source link
rust

rost_gen

A simple static site generator that generates basic .html files from .txt files.

Getting started

This project requires that you have Rust and Cargo installed on your device. Run the following to install in your desired directory:

cargo install rost_gen --root <path_to_directory>

For example:

cargo install rost_gen --root /my_dir

This will install the executable inside the ./my_dir/bin directory. Run the project by changing into the install directory:

cd /my_dir/bin 

Usage

./rost_gen[.exe] [OPTION]
Option Description
-v, --version Print tool name and version
-h, --help Print help message with a list of options
-i, --input [PATH] Provided a path to a text(.txt) or Markdown (.md) file, generate an html file
Provided a path to a directory, generate html files for all text(.txt) and Markdown (.md) files in that directory
Warning: will output generated html files to the ./dist directory, replacing any existing content
-o, --output [PATH] Optional: Use to specify an output directory:
-i, --input [INPUT_PATH] -o, --output [OUTPUT_PATH]

This will not delete any existing content in the specified directory. If the directory doesn't exist, it will be created
-l, --lang [LANG] Optional: Use to specify the language (lang attribute of the html tag) of html file. Defaults to "en-CA"
-c, --config [PATH] Flags accept a file path to a JSON config file.

Features

Markdown (.md) File Features

Examples