md-to-site

Markdown to Site

This project uses a collection of scripts to generate a static site from a directory of markdown files & then deploy it to AWS using the Serverless Framework.

Getting started

git clone git@github.com:pfych/md-to-site.git
cd md-to-site
npm install
npm run build && npm run serve
npm run build && npm run deploy:dev
npm run build && npm run deploy:prod

A more in-depth beginner friendly guide is available here.

Structure

All markdown files in the content directory are compiled to HTML using Pandoc. The default template that exists at templates/template.html is used.

It’s possible to modify this template, please refer to Pandoc’s template documentation for more details. We also provide a list of variables used in the default template here.

Working locally

After making any changes to content or templates run npm run build, this will rebuild all site content.

Using npm run serve will host a local copy of the site at 127.0.0.1:8080.

Deploying

It is possible to deploy this generated site anywhere that serves static HTML. The getting started guide provides steps on deploying using the built-in Serverless Framework configuration.

Functionality Breakdown

Included in this document is a breakdown of what each of the files under ./src/utils do and how you can use them.


Created by pfy.ch

Part of this project is a fork of Baseline Webpage