Search code examples
themesghost-blog

can i change pages url in ghost manually?


hello everybody i'm new to ghost and want to change page links for team page as example from :

www.myblog.com/team-name

to be like :

www.myblog.com/team/team-name

this is my routes.yaml page

routes: /team/: team /: home

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

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

and tried many solutions but nothing worked for me any help and thanks in advance


Solution

  • Are you creating team members as posts? If so something like this should do it:

    collections:
      /:
        permalink: /{slug}/
        template: index
        filter: 'tag:-hash-team'
      /team/:
        permalink: /team/{slug}/
        template: team
        filter: 'tag:hash-team'
    

    This will create a new posts collection appearing at "/team/". Any post tagged with the private tag "#team" will get put into this collection and appear as the link "/team/team-name/". No need for the initial team configuration under routes :). Hope this helps!