Static page 404!

I habe a links.hbs file in my theme and want to load it with this address:
site.com/links
therefore I add a
/links/: links
under the routes: in my routes.yaml and upload it to ghost. but it gives me 404!
can any one say whats wrong?
also if there is any way that I cloud upload my .html file to server and load it without ghost

I successfully load my portfolio and blog url but this page is not working…

Have you tried restarting your Ghost instance?

2 Likes

Hey @moeen could you share your full routes.yaml file?

What you’ve said sounds like it should work, so I’d like to rule out any syntax issues before looking for bugs :slight_smile:

Note: if you aded your links.hbs file or routes.yaml file manually to a dev environment, you would need to restart Ghost for it these files to be detected. If you uploaded the theme & routes.yaml via the UI, then you would not need to restart.

1 Like

I tried both way, but now works.
my route file :

routes:
/links/: links

collections:
 /blog/:
    permalink: /blog/{slug}/
    template: index
    filter: primary_tag:blog
    data: tag.blog
 /:
    permalink: /{slug}/
    template: index
    filter: primary_tag:portfolio
    data: tag.portfolio
taxonomies:
  tag: /tag/{slug}/
  author: /author/{slug}/

Should be:

routes:
  /links/: links

collections:
 /blog/:
    permalink: /blog/{slug}/
    template: index
    filter: primary_tag:blog
    data: tag.blog
 /:
    permalink: /{slug}/
    template: index
    filter: primary_tag:portfolio
    data: tag.portfolio
taxonomies:
  tag: /tag/{slug}/
  author: /author/{slug}/

E.g. the things after routes: should be indented.

1 Like