Skip to main content

Takes markdown and turns it into an html slideshow.

Project description

pre-commit.ci 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
    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

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

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.33.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

markdown_to_presentation-0.0.33-py2.py3-none-any.whl (7.7 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: markdown_to_presentation-0.0.33.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.10

File hashes

Hashes for markdown_to_presentation-0.0.33.tar.gz
Algorithm Hash digest
SHA256 a50a008f5f4a690a1c2ef1bd6647d6afd7e190271b43a5c757803c03db09e5f9
MD5 c4ee7a7501d7d8b7823a3d726129f2d2
BLAKE2b-256 3f05bf2d87dd4b6e9d3e9fd967b0e1d5b598f6d45cd7e44c5a13f85490e90bcb

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: markdown_to_presentation-0.0.33-py2.py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.10

File hashes

Hashes for markdown_to_presentation-0.0.33-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a0fd3a8c7775607287179e9f4d24231c7f8256dd274d2021e63045d55eef6457
MD5 2b5a1519d567b865a1b5fb2c313366aa
BLAKE2b-256 f72552a9e3d124b6d06d4b3a990d38032c275d6f371c3fc93cc951321c3a9623

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