You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Anthony Sottile efc7370a56
Merge pull request #83 from anthonywritescode/pre-commit-ci-update-config
3 days ago
.gitignore remove unneeded gitignore lines 5 months ago
.pre-commit-config.yaml [] pre-commit autoupdate 3 days ago
LICENSE Initial commit 5 years ago convert pip install comand to a block 6 days ago --master-branch -> --default-branch 5 months ago
setup.cfg [] auto fixes from hooks 1 week ago drop python3.6 support 7 months ago status


A build tool to turn markdown into an html presentation and then publish to gh-pages


pip install markdown-to-presentation


Set up the following files:

# Theme variables for reveal.js

# application-specific scss

# copied into build directory

# contains slides

Slides must be delimited by a blank line followed by *** followed by a blank line. When rendered as markdown *** will be a horizontal rule. If you need a horizontal rule in your slides, use --- or ___ instead.

Here's an example

# Title slide
## subtitle


## first slide

- bullet 1
- bullet 2
- bullet 3

If you need raw html in your slides, use a special rawhtml code block:

<div>this html will be <em>injected</em> directly</div>

A sample makefile which works well with this:

all: run-build

venv: requirements.txt
    rm -rf venv
    virtualenv venv -ppython3
    venv/bin/pip install -rrequirements.txt
    venv/bin/pre-commit install -f --install-hooks

.PHONY: run-build
run-build: venv
    venv/bin/markdown-to-presentation run-build

.PHONY: push
push: venv
    venv/bin/markdown-to-presentation push index.htm build

    rm -rf .mtp venv build index.htm

Hooking up push to github pages

Acquire a push token which has the public_repo permission.

Use travis encrypt to encrypt your push token as GH_TOKEN=.... You'll need the yaml it spits out to fill out your .travis.yml.

Make a .travis.yml which looks something like this:

install: pip install virtualenv
script: make
after_success: make push
        - gh-pages
        # GH_TOKEN
        - secure: ...

For your make push target, invoke something like this:

.PHONY: push
push: venv
    venv/bin/markdown-to-presentation push index.htm build

consult the markdown-to-presentation push --help to get a full list of options.