Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RSS in Menubar (Image?) #153

Closed
jacksgt opened this issue May 12, 2015 · 2 comments
Closed

RSS in Menubar (Image?) #153

jacksgt opened this issue May 12, 2015 · 2 comments

Comments

@jacksgt
Copy link
Contributor

jacksgt commented May 12, 2015

This themes (by default) puts the RSS in the sidebar.
I wanted to have a link to the RSS feed in the menubar. A few little changes made this possible:

diff --git a/_config.yml b/_config.yml
index 6a20238..97e53b8 100755
--- a/_config.yml
+++ b/_config.yml
@@ -5,6 +5,7 @@ menu:
   archives: /archives
   tags: /tags
   #commonweal: /404.html
+  rss: /atom.xml

 # Place your favicon.ico to /source directory.
 favicon: /favicon.ico
diff --git a/languages/default.yml b/languages/default.yml
index fce8509..d8ce719 100644
--- a/languages/default.yml
+++ b/languages/default.yml
@@ -9,6 +9,7 @@ menu:
   categories: Categories
   tags: Tags
   about: About
+  rss: RSS

 sidebar:
   overview: Overview

Result: http://upper.cf/ul/rss-patch-hexo.png

Unfortunately, I do not know how to display an image above the text (e.g. http://upper.cf/ul/rss-iconbw.gif)
Any hints?

@iissnan
Copy link
Owner

iissnan commented May 13, 2015

One more step: add a css class named icon-rss and specify the rules for this class. For example:

.icon-rss {
    background: url(http://upper.cf/ul/rss-iconbw.gif) no-repeat;
    /* other rules */
}

Actually, NexT has built-in icons for rss, but the class name is icon-feed. So another option is to change your menu setting for rss to:

about: About
feed: /atom.xml

@jacksgt
Copy link
Contributor Author

jacksgt commented May 15, 2015

Ok, thank you.
So you only need to add the following things to get an RSS icon in the Menubar:

# theme's _config.yml
menu:
   feed: /atom.xml

# theme's language file
# (e.g. next/languages/default.yml)
menu:
   feed: RSS

Thanks again for your support!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants