-
Firstly, thank you for a really nice tool :) Is it possible to add extra static files to be served by mkdocs? In my specific case, I have an install script that I'd like to serve from the relative URL I've tried the following: Creating a file called theme:
static_templates:
- get With this, I get the following error: $ mkdocs serve
INFO - Building documentation...
INFO - Cleaning site directory
WARNING - Template skipped: 'get' not found in theme directories.
INFO - Documentation built in 0.58 seconds
INFO - [19:39:48] Serving on http://127.0.0.1:8000/ Note that the contents of Installing the plugins:
- redirects:
redirect_maps:
get: https://github.com/twpayne/chezmoi/raw/master/assets/scripts/install.sh With this I get the following error: $ mkdocs serve
INFO - Building documentation...
INFO - Cleaning site directory
WARNING - redirects plugin: 'get' is not a valid markdown file!
[Errno 20] Not a directory: '/tmp/mkdocs_9xk7w1to/get/index.html' I also looked for a way to add this static file to the Any help appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
Beta Was this translation helpful? Give feedback.
mkdocs serve
is only meant for previewing. If you want to serve files with specific content types and as downloads, you'll need a proper reverse proxy or file server. I'm not sure if GitHub Pages will set the right headers so*.sh
will be a download. Theredirects
plugin is probably not a good choice for this, as its purpose is to redirect links to HTML files.