Skip to content
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

Request redirect_from #189

Open
efc opened this issue Oct 26, 2024 · 0 comments
Open

Request redirect_from #189

efc opened this issue Oct 26, 2024 · 0 comments

Comments

@efc
Copy link

efc commented Oct 26, 2024

In Jekyll and in WordPress I use redirects that can be defined from certain pages and posts. In other words, the metadata defining the redirect is on the page. Jekyll is a closer analog to Statamic, so I'll go with that scenario. Let's say I have a page at the root of my site with the slug 'silly' and the filename 'silly.md', this file includes this YAML front matter:

redirect_from:
  - /Stuff/HomePage/
  - /Stuff/Stuff/
  - /Stuff/

This front matter results in redirects being created from '/Stuff/HomePage/" to '/silly', from '/Stuff/Stuff' to '/silly', and from '/Stuff/' to '/silly'.

I can't find a similar ability in statamic-redirect to define redirects from the YAML front matter (or custom "fields", I suppose, in Statamic terms). Am I missing something? Would you consider adding a feature like this to statamic-redirect?

I imagine in Statamic this might work by allowing the user to choose a field slug that statamic-redirect would regularly review for new redirects that get automatically generated (sort of like the auto-generated page-slug-change redirects).

@efc efc changed the title Redirect From? Request redirect-from Oct 26, 2024
@efc efc changed the title Request redirect-from Request redirect_from Oct 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant