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
local-markdown-presentation.mov
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.
docker build -t local-markdown-presentation .
docker run -d -p 8888:8888 -v $(pwd)/_slides:/app/_slides --name presentation local-markdown-presentation
poetry install
poetry shell
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
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
)
Replace _slides
with your markdown file folder for SLIDES_DIR
.
Note :
- if using
docker
, change the volume path indocker run
command. docker run ... -v $(pwd)/SLIDES_DIR:/app/_slides ...
Replace 8888
with your port number for PORT
.
Note :
- if using
docker
, change the expose mapping indocker run
command. docker run ... -p PORT:8888 ...
Replace black
with your theme name for SLIDE_THEME
.
All the themes can be found in reveal.js theme.
- Replace
^\n---\n$
with your separator forHORIZON_SLIDE_SEPARATOR
. - Replace
^\n----\n$
with your separator forVERTICAL_SLIDE_SEPARATOR
.
Note :
- The separator is a regular expression.
- The default separator is
^\n---\n$
for horizontal slide and^\n----\n$
for vertical slide. - Check this reveal.js Markdown example and this github issue for more information.
- CND link : https://cdnjs.com/libraries/reveal.js
- Replace
['python', 'javascript', 'html', 'css', 'bash' , 'json' ]
with your languages forSYNTAX_HIGHLIGHT_LANG
.
Note :
- The languages can be found in highlight.js.
- CND link : https://cdnjs.com/libraries/highlight.js
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 .
MIT License