Removing auth and tag slugs

Greetings, if I am not interested in showing tags and author URLs, I can just remove those lines from the routes.yaml file?

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

Thanks

If you remove them, those urls will not exist. What your theme will do in response could be a little variable, so you may want to test things out after you do it.

1 Like

But the same thing will not happen if I do not include a tag.hbs and author.hbs files in the theme structure?

If you omit author.hbs or tag.hbs, Ghost will attempt to use index.hbs for those cases.

To clarify my previous post, a lot of themes assume that they can link to a tag page, so you might have a structure like

<a href="{{url}}">{{name}}</a>

I suspect that if you remove the tags from the taxonomies that you’re going to get something like <a href=""> for the link, which might be confusing for users. Not tested, feel free to try it and report back!

1 Like

So, if you remove the tag: /tag/{slug}/ the navigation won’t work, but if you remove just the /author/{slug}/ everything looks ok.

Navigation won’t work?

Yes, the menu items are routed to 404 after removing the taxonomies block in the routing.yaml file

Ah, maybe you had some kinks to /tag/whatever - since that’s removed from your routes, that’d be expected.

No, i do not have, i have replaced them with /{primary_tag}/{slug}.