-
This might sound stupid question, i am trying to deploy Material for MkDocs in private repo and it can be accessible by limited authorized people either through google login screen or some other way. I am still new to mkdocs, i did try it out. Is this something possible? Any suggestion would be welcome, at least it will give me a path to start. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 1 reply
-
Not with MkDocs in particular, but you can use any authentication system in front of your site, because the site is just static HTML. One of the simplest ideas is to use nginx for hosting and .htpasswd for access control |
Beta Was this translation helpful? Give feedback.
-
@squidfunk Your suggestion is one way of doing it, I took a little different approach, used fastapi for auth and then redirection to mkdocs url. Haven't fully implemented it yet. I have another question, is it possible to set limit to access to some page based on mkdocs url (mkdocs nav)? i hope my question makes sense |
Beta Was this translation helpful? Give feedback.
-
Hi! There is a software called I've created an example using "Materia for MkDocs" to generate the documentation, The config file that generates that site is at https://github.com/readthedocs/test-builds/blob/staticrypt/.readthedocs.yaml I hope this helps for your use case 👍🏼 |
Beta Was this translation helpful? Give feedback.
-
I used Netlify Identity + JavaScript to gate content in my site. Admittedly, it was kind of tricky to implement, so I built Scipress.io as an alternative. |
Beta Was this translation helpful? Give feedback.
-
I encountered the same challenge when trying to protect an MkDocs Material static site with authentication. After some research and testing, I found a way to solve this using OAuth2 Proxy with GitHub authentication. I've documented my approach in this repository: meadapt/login-static-site. Key Points of My Solution:
If you’re looking for a way to secure your MkDocs Material site with GitHub authentication, check out the repository. The Let me know if you have any questions! 🚀 This is, also, another oportunity to thanks @squidfunk for his brilhant work. The mkdocs-material is one of the best GitHub repos in my modest opinion! 💪 |
Beta Was this translation helpful? Give feedback.
Not with MkDocs in particular, but you can use any authentication system in front of your site, because the site is just static HTML. One of the simplest ideas is to use nginx for hosting and .htpasswd for access control