Issue with routes.yaml

I have a english / french blog. I would like blog posts tagged with “fr” to be hidden from the main page and instead show up at /blog/fr.

I am trying with routes.yaml but am running into error when I try to upload the routes.yaml from Labs.

here is the modified routes.yaml:

routes:
collections:
  /:
    permalink: /{slug}/
    filter: "-tag:fr"
    template: index

  /blog/fr/:
    permalink: /blog/fr/{slug}/
    filter: "tag:fr"
    template: index

taxonomies:
  tag: /tag/{slug}/
  author: /author/{slug}/
Error from ghost log:
[2025-01-21 15:27:49] ERROR "POST /blog/ghost/api/admin/settings/routes/yaml/" 500 7074ms

NAME: InternalServerError
MESSAGE: Could not load routes.yaml file.

level: critical

InternalServerError: Could not load routes.yaml file.
    at /var/www/html/ghost/versions/5.105.0/core/server/services/route-settings/RouteSettings.js:129:35
    at async Object.query (/var/www/html/ghost/versions/5.105.0/core/server/api/endpoints/settings.js:158:13)
    at async getResponse (/var/www/html/ghost/versions/5.105.0/node_modules/@tryghost/api-framework/lib/pipeline.js:259:34)
    at async ImplWrapper (/var/www/html/ghost/versions/5.105.0/node_modules/@tryghost/api-framework/lib/pipeline.js:264:30)
    at async Http (/var/www/html/ghost/versions/5.105.0/node_modules/@tryghost/api-framework/lib/http.js:70:28)

I have tried 3-4 variants of this routes.yaml, it always breaks something, am I doing this the right way?

filter: tag:-fr

Try that ?

I tried with:

routes:
collections:
  /:
    permalink: /{slug}/
    filter: -tag:fr
    template: index

  /blog/fr/:
    permalink: /blog/fr/{slug}/
    filter: tag:-fr
    template: index

taxonomies:
  tag: /tag/{slug}/
  author: /author/{slug}/

Now I get:

[2025-01-21 15:56:58] ERROR

MESSAGE: begin.toISOString is not a function

TypeError: begin.toISOString is not a function
at #fetchEvents (/var/www/html/ghost/versions/5.105.0/node_modules/@tryghost/email-analytics-service/lib/EmailAnalyticsService.js:293:64)
at EmailAnalyticsService.fetchMissing (/var/www/html/ghost/versions/5.105.0/node_modules/@tryghost/email-analytics-service/lib/EmailAnalyticsService.js:185:39)
at async EmailAnalyticsServiceWrapper.fetchMissing (/var/www/html/ghost/versions/5.105.0/core/server/services/email-analytics/EmailAnalyticsServiceWrapper.js:107:29)
at async EmailAnalyticsServiceWrapper.startFetch (/var/www/html/ghost/versions/5.105.0/core/server/services/email-analytics/EmailAnalyticsServiceWrapper.js:148:24)
at async /var/www/html/ghost/versions/5.105.0/core/server/services/email-analytics/EmailAnalyticsServiceWrapper.js:63:13
at async EventEmitter. (/var/www/html/ghost/versions/5.105.0/node_modules/@tryghost/domain-events/lib/DomainEvents.js:34:17)