Issue with Routes For Custom Homepage

Hi there having an issue with my routes.yaml to load a custom homepage. The file goes as follows:

routes:
  /:
    template: page
    data: page.home

  collections:
    /blog/:
      permalink: /blog/{slug}/
      template: index

In theory, this should load a page called home using the default page template to the root and shift the blog index to /blog/. I keep getting the error “The following definition “collections” is invalid: A trailing slash is required.” can anyone help?

No indentation is required for collections.

routes:
  /:
    template: page
    data: page.home

collections:
  /blog/:
    permalink: /blog/{slug}/
    template: index
2 Likes