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
_alerts.scss
— Sass module_github-markdown.scss
— Sass module_pandoc.scss
— Sass moduleBUILD-ALL.bat
— launchesTEMPLATE-BUILD.bat
andPREVIEW-BUILD.bat
css-injector.js
— injects CSS in template (used byTEMPLATE-BUILD.bat
)GitHub.css.map
— CSS source map file (autogenerated)GitHub.css
— template stylesheet (autogenerated)GitHub.min.css
— template stylesheet minified (autogenerated)GitHub.scss
— template's main Sass file that load all other SCSS modules.GitHub_source.html5
— template source with placeholder string for CSS injection.LICENSE
— MIT License text.PREVIEW-BUILD.bat
— builds../GitHub-Template-Preview.html
PREVIEW.md
— source contents of../GitHub-Template-Preview.html
SASS-BUILD.bat
— force buildsGitHub.css
from*.scss
source files.SASS-WATCH.bat
— force buildsGitHub.css
and then watches*.scss
files.TEMPLATE-BUILD.bat
— builds../GitHub.html5
WATCH-ALL.bat
— rebuilds../GitHub.html5
and../GitHub-Template-Preview.html
if any source file changes.
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
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:
- PP (version
>= 2.0
) - pandoc (version
>= 2.0
) - Sass (Dart)
- clean-css-cli (Node.js)
- multiwatch (Node.js)
To build the template launch TEMPLATE-BUILD.bat
. This will:
- Compile
GitHub.css
from Sass sources. - Minify
GitHub.css
toGitHub.min.css
. - Load
GitHub_source.html5
into memory and inject the contents ofGitHub.min.css
over the{{CSS-INJECT}}
placeholder string. - 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
)
To build the template preview example launch PREVIEW-BUILD.bat
. This will:
- Invoke
..\..\..\..\pp\macros\INIT-ENV.bat
to initialize the env vars of the PP Macros library. - Invoke PP to preprocess
PREVIEW.md
. - Pipe the preprocessed markdown to pandoc for HTML conversion.
- Save the final HTML document to
../GitHub-Template-Preview.html
(parent folder).
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.
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.
These are the editable source files of the template preview file: