otsuarez / mkdocs_auth

adding basic authentication to mkdocs site
BSD 3-Clause "New" or "Revised" License
42 stars 6 forks source link

multi users #5

Closed WilliamCunhaCardoso closed 5 years ago

WilliamCunhaCardoso commented 5 years ago

How to add others users? is it possible

otsuarez commented 5 years ago

It is possible. The simplest way would be to add them to the theme_addons/basic_auth.inc file.

Not the best approach since you'll be hardcoding sensitive data on the php code, but it's the fastest way.

A better way would be to change the config.extra section of the mkdocs.yml file to accomodate for a list of users and to update the theme_addons/basic_auth.inc mentioned line to read the list of users from the yaml file.