Skip to content

hugojosefson/docker-markdown

 
 

Repository files navigation

hugojosefson/markdown

Renders markdown syntax to html syntax.

Usage

Pipe html contents into the process, and you will get html as output.

Examples

Render README.md as html using this Docker container:

cat README.md | docker run --rm -i hugojosefson/markdown > README.html

Explore the Docker image manually:

docker run --rm -it --entrypoint=bash hugojosefson/markdown

Configuration

Optional environment variable(s) to set via docker run --env ...:

name value consequence
LINK_README_TO_INDEX "true" Renames relative links to files named README.md or README.markdown (case-insentitive) to index.html. You must output rendering of README.md files, to files named index.html, yourself.
LINK_INDEX_TO_DIR "true" Renames relative links to files named index.html (case-insentitive) to just the directory they are in. Use this to get nicer looking links, if your web server supports it.

Sample content

Sample plantuml

@startuml
Alice -> Bob : POST /hello_png
@enduml
@startuml
Alice -> Bob : POST /hello_svg
@enduml
@startuml
Alice -> Bob : POST /hello_txt
@enduml

Sample GitHub Flavoured Markdown

 - [ ] todo
 - [x] done

...becomes...

  • todo
  • done

Acknowledgements: This project wraps mikitex70/plantuml-markdown, py-gfm, and sindresorhus.com/github-markdown-css into an alpine docker image. I forked this from kerhac/plantuml-markdown-docker.

Languages

  • Dockerfile 39.9%
  • Shell 39.5%
  • HTML 20.6%