Giter VIP home page Giter VIP logo

mdmake's Introduction

๐Ÿ“œ mdmake

Generate Static Websites from Directories of Markdown Files.

  1. Features
  2. Installation
  3. Quick Start
  4. Usage

Features

  • Convert single files from Markdown to HTML
  • Watch Mode that detects File changes and recompiles those Markdown files
  • Capability to add custom HTML-Headers and -Footers
  • Linking file against a CSS style sheet
  • Convert nested directory structure of Markdown files to interlinked HTML-Pages
    • Updating relative links to other Markdown files to point to their respective HTML output

    • Linking all files against a single CSS style sheet

Installation

To install mdmake from source, first set up a Rust tool chain including Cargo.

Simply clone, then build and install the project!

git clone https://github.com/markichnich/mdmake --depth=1 &&
cargo install --path mdmake

or alternatively

git clone https://github.com/markichnich/mdmake --depth=1 &&
cd mdmake && cargo build --release && sudo cp target/release/mdmake /usr/bin

Quick Start

First, set up a directory hierarchy of Markdown files within a folder. Unless specified, mdmake tries to use ./src as the source folder.

src
โ”œโ”€โ”€ index.md
โ”œโ”€โ”€ food
โ”‚   โ”œโ”€โ”€ fried_rice.md
โ”‚   โ””โ”€โ”€ spaghetti_carbonara.md
โ””โ”€โ”€ gardening
    โ””โ”€โ”€ cacti.md

Then execute mdmake. When not specifying an output folder. ./out will be used.

โ”œโ”€โ”€ index.md
โ”œโ”€โ”€ food
โ”‚   โ”œโ”€โ”€ fried_rice.md
โ”‚   โ””โ”€โ”€ spaghetti_carbonara.md
โ””โ”€โ”€ gardening
    โ””โ”€โ”€ cacti.md
out
โ”œโ”€โ”€ index.html
โ”œโ”€โ”€ food
โ”‚   โ”œโ”€โ”€ fried_rice.html
โ”‚   โ””โ”€โ”€ spaghetti_carbonara.html
โ””โ”€โ”€ gardening
    โ””โ”€โ”€ cacti.html

Additionally, mdmake will look for style.css, header.html and footer.html in the input directory.

  • If a style sheet is found, it will be copied to the output directory and all HTML files will be linked against it automatically.
  • If a header/footer if found, it will be prepended/appended to the HTML bodies of the output files.

You can also manually specify the input- and output directories, as well as style sheet-, header- and footer files.

Usage

Generate static websites from a directory of markdown files.

Usage: mdmake [OPTIONS] [COMMAND]

Commands:
  watch, -w  Watch for changes and automatically recompile.
  help       Print this message or the help of the given subcommand(s)

Options:
  -i, --input [<DIRECTORY>]   The project root of the markdown files.
  -o, --output [<DIRECTORY>]  The destination for the compiled webpage.
      --style [<FILE>]        The CSS-stylesheet to use for all html files.
      --header [<FILE>]       The HTML-header to prepend to all HTML-Bodies.
      --footer [<FILE>]       The HTML-footer to append to all HTML-Bodies.
  -h, --help                  Print help
  -V, --version               Print version

Credits

mdmake's People

Contributors

mxhagen avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.