Skip to content

A markdown presentation tool with searching & rendering slides features .

License

Notifications You must be signed in to change notification settings

jason810496/local-markdown-presentation

Repository files navigation

Local Markdown Presentation

This is a markdown presentation tool for local usage.

Features :

  • Present markdown file from local server
  • Search markdown file by keywords with fuse.js
  • Present markdown file with reveal.js

Demo

local-markdown-presentation.mov

Usage

git clone https://github.com/jason810496/local-presentation.git
# installation : see below

Replace your markdown file in _slides folder and run the server.

python3 app.py

Open your browser and go to http://localhost:8888/ to select your presentation markdown file.
Search your markdown file by keywords in the right top corner.

Installation

Docker

docker build -t local-markdown-presentation .
docker run -d -p 8888:8888 -v $(pwd)/_slides:/app/_slides --name presentation local-markdown-presentation

Poetry

poetry install
poetry shell

Manual (pip venv)

python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

Dependencies

Customization

All the configuration is in config.py file.

# Setting variables
SLIDES_DIR = '_slides'
PORT = 8888
SLIDE_THEME = 'black' # https://revealjs.com/themes/
SYNTAX_HIGHLIGHT_LANG = ['python', 'javascript', 'html', 'css', 'bash' , 'json' ] # search https://cdnjs.com/libraries/highlight.js for all languages
SYNTAX_HIGHLIGHT_THEME = 'atom-one-dark' # search https://cdnjs.com/libraries/highlight.js for all themes
VERTICAL_SLIDE_SEPARATOR = '^\n----\n$'
HORIZON_SLIDE_SEPARATOR = '^\n---\n$'

( in config.py )

Markdown file directory

Replace _slideswith your markdown file folder for SLIDES_DIR.

Note :

  • if using docker, change the volume path in docker run command.
  • docker run ... -v $(pwd)/SLIDES_DIR:/app/_slides ...

Server port

Replace 8888 with your port number for PORT.

Note :

  • if using docker, change the expose mapping in docker run command.
  • docker run ... -p PORT:8888 ...

Other presentation themes

Replace black with your theme name for SLIDE_THEME.

All the themes can be found in reveal.js theme.

Markdown page separator

  • Replace ^\n---\n$ with your separator for HORIZON_SLIDE_SEPARATOR.
  • Replace ^\n----\n$ with your separator for VERTICAL_SLIDE_SEPARATOR.

Note :

Other languages syntax highlight

  • Replace ['python', 'javascript', 'html', 'css', 'bash' , 'json' ] with your languages for SYNTAX_HIGHLIGHT_LANG.

Note :

Inspiration

This project is inspired by hackmd.io and marp-cli.
I want to present markdown file in local with a simple tool like marp-cli but with UI presentation like hackmd.io .

License

MIT License

About

A markdown presentation tool with searching & rendering slides features .

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published