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

Extra routes rendering only redirect #186

Closed
efc opened this issue Dec 27, 2024 · 1 comment
Closed

Extra routes rendering only redirect #186

efc opened this issue Dec 27, 2024 · 1 comment

Comments

@efc
Copy link

efc commented Dec 27, 2024

We have special routes on our site for RSS feeds (facilitated by Feedamic) and for blog archives (facilitated by Bonus Routes). We have added them to SSG via addUrls, which seems to be working since pages are generated for these routes. However, the pages are a simple redirect to the homepage, not the pages that Statamic should be rendering (and does properly render when using the site regularly).

How can I get SSG to render the actual entries using the layout and templates, instead of this redirect stub?

@efc
Copy link
Author

efc commented Dec 28, 2024

This turned out being an issue of where the routes are defined. I had defined my routes in /routes/web.php, but the SSG runs in the console only. When I added the same routes to /routes/console.php then SSG was able to render them.

This might be worth a reminder in the documentation.

@efc efc closed this as completed Dec 28, 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