bnomei / kirby3-redirects

Setup HTTP Status Code Redirects from within the Kirby Panel
https://forum.getkirby.com/t/kirby3-redirects-setup-http-status-code-redirects-form-within-the-panel/23581
MIT License
22 stars 2 forks source link

Where does it save the redirects? #15

Closed psntr closed 2 years ago

psntr commented 2 years ago

Hi,

I was wondering where do this plugin save the redirections?

bnomei commented 2 years ago

the structure is defined using the blueprint section.

site/blueprints/site.yml

sections:
  # ...other sections
  redirects:
    extends: plugin-redirects3xx

by default it loads from that structure as defined in the bnomei.redirects.map setting callback.

but since its a callback you could overwrite it to just load from a json/yaml file you manage yourself. thats why the php api like site()->appendRedirects(...) exists.