I know that this question was already asked a few years ago but not having found the answers sought I allow myself to ask this question again.
I am trying to protect a single page with a password. I know admin plugin can do that but only with a link account no?
I’ve find this plugin private_plugins But I am not strong enough on grav to get the plugins activated only on the page I want.
Thanks for reading me
You can use the Login plugin. Here is the link to the doc
I haven’t tried myself but it seems pretty straightforward.
Here is the link to the plugin page
Tell me if you managed to create a private page.
Hi, @AlexMart thank you for your answer,
I know it can be with the login plugin but I don’t want to create a user account, just ask for a password to display a speficic page.
And it seems to me that the admin plugin asks for a username to display the desired page and not just a password no?
So I’ve check the doc of the private_plugin and it’s not very clear how private page works but I figured out. I’ve check the closed issues and a lot of people had the same issue.
So after installing the
private plugin copy/past the
private.yaml to your
user/config/plugins folder and open it. Then change the line
Then you can go on individual page and add this to the header :
title: Home //exemple
If it’s not working try to logout first with the url
Tell me if it woks for your.
Oh thank you very much, I forgot the “taxonomy”: that’s why the plugins didn’t work before !
It’s really nice of you for helping me.
Just one last question, how can I change the password?
According to the doc you can change the password in the line
no_user : sha1_password
Note : The password MUST BE a SHA1 value. For quick checking see SHA1 Online to generate your SHA1 password. But it is adwised to generate it locally as http and any transmission is not as secure as no transmission at all. Use command:
echo -n "yourpassword" | sha1sum . You can remove it thereafter from bash history with
history -d 1234 and sourcing the ~/bashrc.
Thanks again for your help, have a nice day !