Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hiding posts of some categories in index page in octopress?

I have created a blog using octopress, I have made a dummy link instead of a page and pointed it to posts of some categories by editing the navigationbar :

<ul class="main-navigation">
  <li><a href="{{ root_url }}/">Blog</a></li>
  <li><a href="{{ root_url }}/blog/archives">Archives</a></li>
  <li><a href="{{ root_url }}/about">About</a></li>
  <li><a href="{{ root_url }}/blog/categories/python">Python101</a></li>
</ul>

The last link Python101 will show posts from category python only. Now I want to hide all the posts only from python category on the index page. You can see the live site here bhansa.github.io

Is there any way I can do this?

Update: The above blog link is available no more.

like image 808
bhansa Avatar asked Dec 08 '25 05:12

bhansa


1 Answers

Let's do it as an incremental answer :

Spec is : "py101 category posts must not appear in index". You can exclude posts with py101 category but, you will end up with pagination showing an undetermined number of posts. User can get lost with a page with no post because you've posted 7 py101 posts in a row.

Alternative : py101 is a collection. You make it available from

  • the menu,
  • the aside
  • from inside posts referring to a new/updated collection item in py101
like image 135
David Jacquel Avatar answered Dec 11 '25 14:12

David Jacquel



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!