renders markdown book and serves it on port 80
1.4K
This is work in progress, can be still unstable. It serves the markdown book on http port 80.
Create the folder with your markdown book (see folder structure below), and create there following dockerfile
FROM milung/render-md
ADD . /var/www/book
then run it to see your book rendered:
docker run -p 4320:80 --name my-md-book
and navigate to the [http://localhost:4200]. Alternatively, you can run it with local
folder mounted to /var/www/book during book authoring:
docker run -p 4320:80 -v ${PWD}:/var/www/book --name my-md-book
Currently there is no automatic refresh during authoring.
The following is recommended book folder structure:
<project root>
│
├──book-src
│ │
│ ├──<chapter-XX>
│ │ │
│ │ ├─── README.md
│ │ └─── <chapter files and subchapter folders>
│ │
│ ├─── README.md
│ ├─── SUMMARY.md
│ └─── LINKS.md
│
└─── book.json
The file book.json is the configuration manifest of your book. The manifest is optional, if not
present then default settings are assumed for all of its parameters. The following parameters
can be configured in the manifest:
source-root folder. Relative links starting with ./ will be rebased to the base_url environment variable (see below).[foo]: /url "title", each on separate line. The link reference definitions are not rendered into the result document. The path is relative to the source-root folder.The following environment variables control the behavior of the server:
book.json configuration manifest. All your book markdown files and assets must be placed under this folder.docker pull milung/render-md:latest