getgrav / grav-plugin-maintenance

Grav Maintenance Plugin
https://getgrav.org
MIT License
16 stars 17 forks source link

Allow maintenance page to be non-routable #33

Open woutgg opened 4 years ago

woutgg commented 4 years ago

I expected that it would be possible to specify a page with routable: false in its frontmatter, but this causes a 404 to show up instead.

The error plugin does allow this so I quickly glanced the code there. I am not familiar with the plugin API so I'll just link to the differences in page handling between the plugins in case this saves someone else looking that up.

NicoHood commented 3 years ago

I guess this is a duplicate of https://github.com/getgrav/grav-plugin-maintenance/issues/27

A workaround would be:

redirect: /
NicoHood commented 3 years ago

I am not sure why this works for the error plugin, but not the maintainance plugin. I assume that there is some internal grav code the removes the routable attribute (not in the plugin code, but rather related to the event).

If that is true (@rhukster ?) we could simply modify the page header and set routable always to true. Does that sound correct?

Edit: working further with grav it turns out, that setting routable always to true and in the page markdown itself to false seems like a good idea!