<p>Using routes for automatically generated content is the correct way to do this. The only thing I would change about your setup is using more specific placeholders for the date format, but besides that, the route is fine.</p>
<p>I would solve this by adjusting the way you use those plugins. This is why I don't like plugins like SEOmatic - they save you some time in the beginning (though arguably, they come with a lot of stuff that you don't really need). But later on they make easy tasks harder than they need to be.</p>
<p>You're gonna have to either figure out how to include your custom route in the features you mentioned, or remove those plugins and/or disable the features that are causing problems. For example, having a broken sitemap is worse than having no sitemap at all – as long as you have a good internal linking structure and all pages are reachable through the normal navigation and additional on-site links. Missing a couple of archived routes that probably aren't seeing tons of traffic in the cache warm-up isn't a big deal either.</p>
<p>You can also use the configuration options and hooks provided to cleanly integrate your custom route into the features you mentioned. For example:</p>
<ul>
<li>For the SEOmatic sitemap, the plugin uses events for the Sitemap generation that you can hook into to add your custom URLs. Check out the documentation on the <a href="https://nystudio107.com/docs/seomatic/advanced.html#registersitemapurlsevent" rel="nofollow noreferrer"><code>EVENT_REGISTER_SITEMAP_URLS</code> event</a> to get started.</li>
<li>For Blitz Cache Generation, you can <a href="https://putyourlightson.com/plugins/blitz#cache-generation" rel="nofollow noreferrer">specify custom URLs</a> in the settings. You can use that to configure all archive links for now and the forseeable future. Another option would be a <a href="https://putyourlightson.com/plugins/blitz#cache-generators" rel="nofollow noreferrer">custom cache generator</a> that's aware of your archive links.</li>
</ul>

CC BY-SA 4.0
2022-06-10T09:42:25.820Z
2022-06-10T09:42:25.820Z
MoritzLost
<p>My website features music releases. On the homepage, it shows the current week of releases. It also offers the ability to go back to previous weeks and see the releases e.g. mysite.com/new-releases/05-27-2022</p>
<p>To do this, I have a route set up:</p>
<p><a href="https://i.sstatic.net/vuvHm.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/vuvHm.png" alt="enter image description here" /></a></p>
<p>These pages are generated via some logic in the home page twig template which means the pages aren't actually entries.</p>
<p>The pages do not appear in SEOMatic and therefore not included in the sitemap or have their own SEO tags.</p>
<p>It also causes problems with Blitz caching because it doesn't know to warm these pages automatically because it only looks for entries.</p>
<p>Is there a better way to do this?</p>

<entry><routes><plugin-seomatic><plugin-blitz>
Dynamic entries?
# Dynamic entries?

(Asked by: username_0 on 2022-06-09)

My website features music releases. On the homepage, it shows the current week of releases. It also offers the ability to go back to previous weeks and see the releases e.g. mysite.com/new-releases/05-27-2022

To do this, I have a route set up:

[![enter image description here](https://i.sstatic.net/vuvHm.png)](https://i.sstatic.net/vuvHm.png)

These pages are generated via some logic in the home page twig template which means the pages aren't actually entries.

The pages do not appear in SEOMatic and therefore not included in the sitemap or have their own SEO tags.

It also causes problems with Blitz caching because it doesn't know to warm these pages automatically because it only looks for entries.

Is there a better way to do this?

**Tags:** entry, routes, plugin-seomatic, plugin-blitz


---

## 1 answers

### Answer by username_1 on 2022-06-10. Score: 2 | Accepted answer

Using routes for automatically generated content is the correct way to do this. The only thing I would change about your setup is using more specific placeholders for the date format, but besides that, the route is fine.

I would solve this by adjusting the way you use those plugins. This is why I don't like plugins like SEOmatic - they save you some time in the beginning (though arguably, they come with a lot of stuff that you don't really need). But later on they make easy tasks harder than they need to be.

You're gonna have to either figure out how to include your custom route in the features you mentioned, or remove those plugins and/or disable the features that are causing problems. For example, having a broken sitemap is worse than having no sitemap at all – as long as you have a good internal linking structure and all pages are reachable through the normal navigation and additional on-site links. Missing a couple of archived routes that probably aren't seeing tons of traffic in the cache warm-up isn't a big deal either.

You can also use the configuration options and hooks provided to cleanly integrate your custom route into the features you mentioned. For example:

* For the SEOmatic sitemap, the plugin uses events for the Sitemap generation that you can hook into to add your custom URLs. Check out the documentation on the [`EVENT_REGISTER_SITEMAP_URLS` event](https://nystudio107.com/docs/seomatic/advanced.html#registersitemapurlsevent) to get started.
* For Blitz Cache Generation, you can [specify custom URLs](https://putyourlightson.com/plugins/blitz#cache-generation) in the settings. You can use that to configure all archive links for now and the forseeable future. Another option would be a [custom cache generator](https://putyourlightson.com/plugins/blitz#cache-generators) that's aware of your archive links.


---

