Closed tao closed 3 years ago
Maybe the best option would be to use different environment variables, which would allow the CI/CD pipeline to generate the static website? Might be something that's worth mentioning in the documentation if that's the simpler option.
To overcome this I use an environment variable, which I can toggle on and off when I need to generate the static website during CI stages. This works well enough for now so I'm going to close the issue.
/*
|--------------------------------------------------------------------------
| Default (or site-wide) Scheme
|--------------------------------------------------------------------------
|
| The default scheme will be applied to every page of the site.
| By default, you probably won't want to protect anything
| at all, but you are free to select one if necessary.
|
*/
'default' => env('PROTECT_SCHEMA', 'password'),
I am planning to use a Statamic 3 server for my team, and generate a static website for general users to view. I would like to protect the admin site because it might have content we don't want to push to the static site yet or let other users see yet.
I set up Statamic Protect to use the
password
scheme, however when I try generate the static site it blocks and redirects the pages.How can we work around this or can SSG detect the Protect scheme and generate the static site regardless? I don't believe the redirect form would work on a static site anyway.