Is it possible to protect (username/password) the hosted mkdocs site?
Or has it been considered as a future addition?
I think that will be difficult as it is a static site without any means to evaluate code on the server side. The JS is evaluated on the client and can not be trusted.
A solid solution is to enable this in the hosting configuration instead. Both Apache and IIS all have settings for enabling basic authentication before allowing access to the hosted content.
Yes, I can see that providing the auth myself with Apache or similar is the best solution - I was hoping for a simple auth mechanism for the mkdocs built-in web server (I just use that at the moment, since it's dead simple to use and does live-reloading).
Please note that the dev-server is single threaded and is not going to scale with the number of connections. Its not viable as a production server and by that I think the requirement is void.
Please note that the dev-server is single threaded and is not going to scale with the number of connections. Its not viable as a production server and by that I think the requirement is void.
Yup, this. :)
Just in case, I recently made an opensource Rails app wrapping a MkDocs site and providing users authentication. You can easily deploy e.g. to Heroku. https://www.npmjs.com/package/authenticated-docs
Using django and material theme:
Most helpful comment
Just in case, I recently made an opensource Rails app wrapping a MkDocs site and providing users authentication. You can easily deploy e.g. to Heroku. https://www.npmjs.com/package/authenticated-docs