Mkdocs: Authentication?

Created on 28 Apr 2014  路  6Comments  路  Source: mkdocs/mkdocs

Is it possible to protect (username/password) the hosted mkdocs site?

Or has it been considered as a future addition?

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

All 6 comments

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:

https://github.com/farnetani/django_material_mkdocs

Was this page helpful?
0 / 5 - 0 ratings

Related issues

SvenDowideit picture SvenDowideit  路  3Comments

rei-vilo picture rei-vilo  路  5Comments

KerimG picture KerimG  路  5Comments

pixelbrackets picture pixelbrackets  路  5Comments

banj picture banj  路  6Comments