Site Navigation

Edit on GitHub


MarkPub Install and Web-publish Steps

MarkPub generates HTML files from Markdown files. It is a static site generator.

MarkPub helps publish the HTML files to the web by installing automation files for GitHub Pages and Netlify. When you enable the automation, the site will be regenerated automatically by GitHub or Netlify when files are updated.

The following instructions yield a static website published via GitHub Pages.

Assumptions and pre-requisites

These instructions assume the following:

Prerequisites for installation

Basic installation and use

Assuming the local folder name, and the GitHub repository name of the Markdown collection, is "myDocumentCollection" these commands initialize and web-publish those documents to a GitHub Pages hosted website.

Install MarkPub:

cd /to/some/work/directory
pip install markpub

Initialize the document collection:

Note: prior to initialization, the myDocumentCollection folder must be a local copy (“clone”) of an existing GitHub repository.

markpub init /full/path/to/myDocumentCollection

MarkPub initialization will ask you for:

Web-publish the collection as a GitHub Pages website

cd /full/path/to/myDocumentCollection
git commit -am "MarkPub installation updates"
git push

Log into GitHub, and for this repository's "Pages" settings, set "Build and deployment" "Branch" to "gh-pages" in the drop-down menu, and select "Save".

Web-publish using Netlify

For Netlify deployment, MarkPub installs a netlify.toml configuration file during initialization. You can use this to web-publish your site using Netlify, instead of GitHub Pages. From your Netlify dashboard, select "Add new site" and "Import an existing project". Netlify will load the repository and run MarkPub automatically.

Configuration options

Some website configuration details are specified in a separate file, markpub.yaml. For these instructions the file has this name: myDocumentCollection/.markpub/markpub.yaml

Edit this file to set or change:

Other site-wide settings include: