• Skip to primary navigation
  • Skip to main content
sharadchhetri

sharadchhetri

Tutorials On Linux, Unix & Open Source

  • Home
  • Linux Commands
  • Resources
    • Learn Linux
  • My WordPress plugins

show post excerpt in atoms feed of octopress

March 21, 2014 by Sharad Chhetri Leave a Comment

In this tutorial we will learn, how to show post excerpt in atoms feed of octopress. After installing Octporess in Linux system, I am still exploring many things. For blogging platform,I mostly use and install wordpress.In recent time,the octopress came up with promising new blogging platform.
It is quite obvious some good features of WordPress,I was also looking into Octopress.

For default RSS ,Octopress has atoms feed.

Now here,my requirement is in atoms feed,the post must be shown with excerpt. In other terms,the post summary should be seen in atoms feed rather than full detail

To prevent from content copy dump scrappers, I was looking for post summary/excerpt in atoms feed.
Through RSS feed , these scrappers steal your whole content and make duplicate content in Internet world. Hence,the search engine like Google, skip the duplicate content site search.
In some case,I have also seen the result shows before the original source website.

To show post excerpt in atoms rss feed of octopress,Follow given below steps

Step 1: Edit the file atom.xml . I prefer to edit the atom.xml file which is located in Octopress theme directory.
For example, inside classic octopress theme directory , replace post.content with post.excerpt in atom.xml file (See line number 24)

Edit the file octopress/.themes/classic/source/atom.xml

For example, in atom.xml file inside classic theme directory. replace post.content with post.excerpt (See at line number 24)

See in blow given screenshot (post.content is replaced with post.excerpt)

Octopress atom feed

Step 2: Now create a new post in Octopress by using command rake new_post["title"]

For example.

rake new_post["This is an example post"]

In newly created post or existing post, add excerpt: and give description in summary.

See below given example.
In this example,we are editing post file. And added excerpt parameter in post file (See in below given screenshot)

vi 2014-03-21-this-is-an-example-post.markdown

octopress atom rss

Step 3: Because we are doing first time editing of octopress theme editing for RSS.We have to rerun the install theme command once again.
Note: Run install theme command only one time after editing any theme related file.
(Replace the classic with your theme name)

rake install['classic']

Now generate the html file once again.And check the result in preview by clicking on RSS link.

rake generate
rake preview

In below given screenshot, octopress rss is showing excerpt in atom feed

Octopress atom feed

NOTE: You can also edit the atom.xml file located in Octopress directly to octopress/source/ .Means it is not necessary to edit the atom.xml file inside of Octopress theme.

Share this:

  • Twitter
  • Facebook
  • More
  • Print
  • Email
  • LinkedIn
  • Reddit
  • Tumblr
  • Pinterest
  • Pocket
  • Telegram
  • WhatsApp
  • Mastodon

Related posts:

  1. Print double hyphen sign simultaneously in post of Octopress
  2. This XML file does not appear to have any style information associated with it, RSS Feed problem(wordpress)
  3. How to add excerpt on wordpress thematic child theme
  4. How to install Octopress in CentOS 6 and RHEL 6
  5. How to change Port number for Octopress rake preview
  6. Octopress : Could not find a JavaScript runtime
  7. How to install Octopress on Ubuntu 14.04 LTS
  8. grep command to show lines after and before the keyword
  9. How to show line numbers with less command in Linux
  10. How to show user account password expiration detail on Linux

Filed Under: BlogTalks, Linux Tagged With: Octopress

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Copyright © 2023 ยท
The material in this site cannot be republished either online or offline, without our permission.
Proudly Blogging From Bharat.

  • Contact
  • About Me
  • My WordPress plugins
  • Privacy Policy