Skip to main content

Takes markdown and turns it into an html slideshow.

Project description

Build Status

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

markdown_to_presentation-0.0.29.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

markdown_to_presentation-0.0.29-py2.py3-none-any.whl (7.8 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file markdown_to_presentation-0.0.29.tar.gz.

File metadata

  • Download URL: markdown_to_presentation-0.0.29.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8

File hashes

Hashes for markdown_to_presentation-0.0.29.tar.gz
Algorithm Hash digest
SHA256 be6d9500fb364f3f7f685f0a8d3a9d30a1a7e1254c13a4e5b1030d05aa2ff7fc
MD5 4607a6a38d5d7a010b292a2967e046a1
BLAKE2b-256 0d5c238b81fe8024b6fc7417e697b165edb4b120b980233d222e0781f30e41fe

See more details on using hashes here.

Provenance

File details

Details for the file markdown_to_presentation-0.0.29-py2.py3-none-any.whl.

File metadata

  • Download URL: markdown_to_presentation-0.0.29-py2.py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8

File hashes

Hashes for markdown_to_presentation-0.0.29-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a9a9f687bd4db200e276782b053c7d813b4aa1b8eade74628905c54f2017a871
MD5 88a83b6f9212bed69bf48c042e320c7d
BLAKE2b-256 89250373dcef8313bbeac356a55959cc2b5c4c66902f206a25081adec1967dfe

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page