ZeroSharp

Robert Anderson's ones and zeros

Removing the RSS Subscription Icon From Octopress

| Comments

A fellow Octopress blogger recently asked how I removed the RSS subscription icon from the Octopress navigation bar.

First, create a new site variable show_feeds by adding a line to the _config.yml file which is in the root folder of the Octopress source.

_config.yml
1
2
3
4
5
6
  # RSS / Email (optional) subscription links (change if using something like Feedburner)
+ show_feeds: false
  subscribe_rss: http://feeds.feedburner.com/zerosharp
  subscribe_email:
  # RSS feeds can list your email address if you like
  email:

Then modify the source/_includes/navigation.html as follows

navigation.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
+ {% if site.show_feeds %}
  <ul class="subscription" data-subscription="rss">
    <li><a href="http://feeds.feedburner.com/zerosharp" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
    {% if site.subscribe_email %}
      <li><a href="" rel="subscribe-email" title="subscribe via email">Email</a></li>
    {% endif %}
  </ul>
+ {% endif %}
  {% if site.simple_search %}
  <form action="http://google.com/search" method="get">
    <fieldset role="search">
      <input type="hidden" name="q" value="site:ZeroSharp.github.com" />
      <input class="search" type="text" name="q" results="0" placeholder="Search"/>
    </fieldset>
  </form>
  {% endif %}
  {% include custom/navigation.html %}

Then you can toggle the visibility of the feed icon by changing the show_feeds setting in the _config.yml file.

Comments