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

custom routes #19

Open
jaro-io opened this issue Jan 23, 2023 · 1 comment
Open

custom routes #19

jaro-io opened this issue Jan 23, 2023 · 1 comment
Labels
type: feature πŸŽ‰ Adds a feature (requests β†’ feedback.getkirby.com)

Comments

@jaro-io
Copy link

jaro-io commented Jan 23, 2023

hey everyone πŸͺ ✨
i am using a few simple custom routes, to remove parent page slugs from urls. it seems like the staticache plugin just ignores these pages? at least on my side, no cache files are generated. for all other pages it’s working fine.

any ideas on how to solve this?
thank you so much!
πŸ¦„

@lukasbestle
Copy link
Member

Staticache directly hooks into Kirby's page cache and only caches the canonical URL of each page.

What you could do is to manually store the result of your route in a HTML file inside the cache directory. Your web server will then pick the cached result up from there as if it was cached by the plugin.

In the future it might make sense to hook into the router instead of into the page cache. This would allow us to handle routes natively. But it would also lead to an entirely different configuration setup.

@lukasbestle lukasbestle added the type: feature πŸŽ‰ Adds a feature (requests β†’ feedback.getkirby.com) label Jan 26, 2023
@getkirby getkirby deleted a comment from robo-wg Apr 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature πŸŽ‰ Adds a feature (requests β†’ feedback.getkirby.com)
Projects
None yet
Development

No branches or pull requests

2 participants