Hiding post from the home page

I need a routes code so I can with internal hashtag #hide to hide post only from the homepage, but the post need to be visible and readable in Tag page (for example mydomain.com/news/) for example.

I have managed not to be visible on homepage, but when I try to open it from tag page (for example mydomain.com/news/) got 404 error.

Hey there!

Posts must have to be valid under any collection in order to have a URL and load.
This might help you to solve the problem.
Now, All you have to do is to keep or insert #hide (which will be the internal tag) and add whichever tag you want like for news to the post. So, the post can be visible at mydomain.com/news/ and not homepage.

You can copy and paste the below to your dynamic routing configuration if it is default or modify accordingly.


    permalink: /{slug}/
    template: index
    filter: tag:-hash-hide

    permalink: /{slug}/
    template: index
    filter: tag:hash-hide

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


Wow! Tnx! Works perfectly.

1 Like