- Notifications
You must be signed in to change notification settings - Fork4
simple markdown server (optional indexing, no symlinks) report bugs:https://github.com/aerth/markdownd/issues (Heroku takes a couple seconds to load. Patience...)
License
aerth/markdownd
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
markdownd [flags] <directory>
markdownd -toc -header theme/header.html -footer theme/footer.html .
markdownd -index=gen .
- tries markdown file (.md) in .html request (/index.html tries /index.md first)
- will serve .html if exists
- serves static files and downloads if not .html or .md
- optional indexing (default: off, use -index=gen or -index=README.md)
- no symlinks
- no
../
paths - raw markdown source requests ( example:
GET /index.md?raw
) - custom index page (use flag:
-index README.md
) - generates table of contents with
-toc
flag - themed html with
-header
and-footer
flag - now with syntax highlighting (use flag:
-syntax
)
GET /
will show a 404 unless -index flag is used (-index=gen to generate)GET /README.md
orGET /README.html
will process the markdown file and serve HTML.GET /README.md?raw
will serve raw markdown source- To generate index page (with links to files), use
-index=gen
- To serve custom
index.md
, use-index=index.md
From your project repository that contains a README.md file, run markdownd like so:
markdownd -index=README.md .
And visithttp://localhost:8080/ in your browser
git clone https://github.com/aerth/markdowndcd markdowndmake && sudo make install
If you don't want to install the server system-wide, or you don't have root privileges, replace last line with:
make && make install INSTALLDIR=$HOME/bin
GOFLAGS=-tags=netgo,osusergo GOBIN=$HOME/bin go get -v github.com/aerth/markdownd
Consider installinggo and building from source,Its fast and easy.
When using the docker image, markdownd servest the /opt directory,and exposes port 8080.
You will want to share a directory into /opt and forward the port(using docker's-v
and-p
flags).
For example (modify$PWD/docs
and8888
to suit your needs):
docker run -it -v $PWD/docs:/opt -p 8888:8080 aerth/markdownd
The MIT License (MIT)Copyright (c) 2017-2020 aerth <aerth@riseup.net>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- pull requests welcome
- bugs/issues/features very welcome
- please 'gofmt -w -l -s' before commits
About
simple markdown server (optional indexing, no symlinks) report bugs:https://github.com/aerth/markdownd/issues (Heroku takes a couple seconds to load. Patience...)