Takes markdown and turns it into an html slideshow.
Project description
markdown-to-presentation
A build tool to turn markdown into an html presentation and then publish to gh-pages
Installation
pip install markdown-to-presentation
Usage
Set up the following files:
# Theme variables for reveal.js
assets/_theme.scss
# application-specific scss
assets/_app.scss
# copied into build directory
assets/*.png
# contains slides
slides.md
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 slides.md:
# 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:
```rawhtml
<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.6
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
clean:
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
branches:
except:
- gh-pages
env:
global:
# 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
The markdown-to-presentation push
executable takes the following arguments:
$ markdown-to-presentation push --help
usage: markdown-to-presentation push [-h] [--master-branch MASTER_BRANCH]
[--pages-branch PAGES_BRANCH]
paths [paths ...]
positional arguments:
paths
optional arguments:
-h, --help show this help message and exit
--master-branch MASTER_BRANCH
--pages-branch PAGES_BRANCH
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file markdown_to_presentation-0.0.26.tar.gz
.
File metadata
- Download URL: markdown_to_presentation-0.0.26.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ada8d704d9a25110afd8d33ced09a67f65a3c04f7594cc8b9d7c69101f38010c |
|
MD5 | 5710760cf5f173e67322d7271685d39b |
|
BLAKE2b-256 | a42cd09976a089245f98634357f1da4c92dfabdc35136112e8cc62d1956162c3 |
Provenance
File details
Details for the file markdown_to_presentation-0.0.26-py2.py3-none-any.whl
.
File metadata
- Download URL: markdown_to_presentation-0.0.26-py2.py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15aa8158d148e048f3ab8180f965fb53d1c76ed5ab696e988feac46aa3e04931 |
|
MD5 | 82deae744da963855f9a249be5606672 |
|
BLAKE2b-256 | e6c4e4d60c5af7d88e535dc8938282a32f72340ac8e878068c89bcbabf2b13d1 |