Skip to content

Latest commit

 

History

History

GitHub Pandoc HTML5 Template Source Files

pandoc v2.1.1 | PP v2.1.5

Here are the source files to build the GitHub template and the template preview example, plus some watch and build scripts to facilitate working with the sources.


Table of Contents


Files List

Build Instructions

The BUILD-ALL.bat script will build/update both the template and the template preview example (in parent folder):

  • ../GitHub.html5
  • ../GitHub-Template-Preview.html

Requirements

Some scripts rely on the presence of third party tools on the system. In order to be able to build all the contents of this folder, you'll need:

Building The Template

To build the template launch TEMPLATE-BUILD.bat. This will:

  1. Compile GitHub.css from Sass sources.
  2. Minify GitHub.css to GitHub.min.css.
  3. Load GitHub_source.html5 into memory and inject the contents of GitHub.min.css over the {{CSS-INJECT}} placeholder string.
  4. Save the final template with injected CSS to ../GitHub.html5 (parent folder).

You can skip Step-1 (compiling CSS from Sass) by passing the "--no-sass" option:

TEMPLATE-BUILD --no-sass

... this is useful if you are not editing the *.scss sources, or don't have Sass on your system. (It's also required to prevent a vicious circle in WATCH-ALL.bat)

Building The Template Preview

To build the template preview example launch PREVIEW-BUILD.bat. This will:

  1. Invoke ..\..\..\..\pp\macros\INIT-ENV.bat to initialize the env vars of the PP Macros library.
  2. Invoke PP to preprocess PREVIEW.md.
  3. Pipe the preprocessed markdown to pandoc for HTML conversion.
  4. Save the final HTML document to ../GitHub-Template-Preview.html (parent folder).

Editing Instructions

The WATCH-ALL.bat script will watch for any changes in source files affecting both the template and its preview example, when file changes are detected it will automatically rebuild the template and/or the template preview.

Editing The Template

These are the editable source files of the pandoc HTML5 template:

And these are the Sass source files of the CSS stylesheet:

All other template files are autogenerated by scripts.

Editing The Template Preview

These are the editable source files of the template preview file: