@pewu, the reason you get a 404 is that posts have to be in some collection in order to have a URL at all, because it’s the collection’s permalink
property that determines a post’s URL.
To fix it, you need to not just remove posts with your tag from the index collection, but also create a new collection that you put them in. That new collection can still have the same permalink
property as the index collection if you like, but its key in the collections
dictionary (which is the URL where you can view the collection) has to be different. If you don’t want a page where you can view the collection (because you want to use the tag page at /tag/mytag
instead), a hack that seems to work, at least for the current version of Ghost, is to just put some URL-illegal characters like ^
into the URL of the new collection. This, I think, will give you what you were looking for:
collections:
/:
permalink: /{slug}/
template: index
filter: tag:-mytag
/^/:
permalink: /{slug}/
template: index
filter: tag:mytag