-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conditional search #416
Comments
Related issue #210 |
|
Hi @weareoutman, The issue we're having is that the search box in the header is also shown to people who are not logged in. |
If you only want to hide the search bar when users are not logged in, you can do it by adding a global css which hides the search bar, in your client auth guard component, or somewhere else appears in all your pages. Even though users can get the index file by accessing the URL directly if they know it. Or you have to add a server-side auth guard and serve the index file on your server, just as I mentioned above. |
We have implemented custom authentication for the Docusaurus site. We don't want the search to work as long as someone is not yet logged in. What would be the best way to implement this?
I'm thinking of various options:
The text was updated successfully, but these errors were encountered: