Rout issue: trying to route / to a story/page


#1

Hi
I created a story and make it a page
Access it by domain/hone
All working fine
Now I change the routing of the blog to /blog so the root / is empty
Now how do I route / to my page /home
I try redirect but all what I try couze redrict loop
Also I tried to use the route yaml but I keep getting the match issue

What should I do :confused:


#2

There’s a guide to creating a custom home page here:

If you’re still stuck, share your routes.yaml :slight_smile:


#3

This guide is related to create home file template,
Alternative question is how to route / to a blog post?


#4

It’s the same approach, but you can use a data key to link the new / route to the post or page you want to use.

E.g.

 routes:
    /: 
      data: page.home

More docs:

If you share the routes file you have so far it’s much easier to help :slight_smile:


#5

Thank you I will try
OK i get now
Cannot read property ‘match’ of undefined

Route file
routes:
/:
data: page.home


#6

all working now i guess there is latency :confused:
Thanks!


#7

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.