md_puppy

Your assistant in making a static site!

GitHub license Crates.io

Project Description

A minimalist static site generator written in Rust, inspired by Hugo. The site's html template and file layout is based off of HTML5 Boilerplate.

An example

You can see an example of a site generated with md_puppy at https://softannalee.neocities.org

a screenshot of a site generated

Installation

Pre-requisites

How to install

To install, first install Rust and Cargo. Then and use one the following commands;

cargo install md_puppy

or

cargo install --git https://github.com/SoftAnnaLee/md_puppy

Compiling from source

First clone this repo and then use cargo build or cargo install like the following code exerpt;

git clone https://github.com/SoftAnnaLee/md_puppy cd md_puppy cargo install --path "$(pwd)"

Usage

Use md_puppy help to display the following information;

``` md_puppy 1.0.0 AnnaLee <@SoftAnnaLee> A minimal static site generator

USAGE: md_puppy [OPTIONS] [SUBCOMMAND]

OPTIONS: -c, --completions Generate a SHELL completion script and print to stdout [possible values: bash, zsh, fish, power-shell, elvish] -h, --help Print help information -V, --version Print version information

SUBCOMMANDS: build Process all files in the 'content/' folder and parse into a website help Print this message or the help of the given subcommand(s) init Download and initalize directories needed for website new Create a new file within the 'content/' folder with default frontmatter ```

The site generator only has a single theme, which I used in my personal site. I give free usage to copy and reuse it; but I heavily encourage you to personalize it yourself. It is only HTML and CSS, so it should be pretty easy to modify to your own personal taste.

There is also a config.toml which has a default configuration of the following; ```

Name for the website across all pages

sitename: mdpuppy site

Url to pull the static site content/theme

staticurl: https://github.com/SoftAnnaLee/mdpuppy/releases/download/static/static.zip

Url to pull boilerplate

boilerplateurl: https://raw.githubusercontent.com/SoftAnnaLee/mdpuppy/main/template/boilerplate.html

Base Url used for relative links

base_url: https://www.example.com/ ```

If you have a different HTML boilerplate you'd like to use, or a different theme to pull into static_url, then you can change those details there.

Purpose

I am a beginner programmer who is trying to teach themselves Rust and finishing projects. So this is pretty minimal and designed around my personal use case (running a personal blog and website). If you want any features added, I may do so on request, but sadly no guarantees. Feel free to fork or add pull requests as well!