Git Product home page Git Product logo

Comments (2)

aliarsalankazmi avatar aliarsalankazmi commented on May 29, 2024 1

Thanks a lot, Hemang! That worked perfectly well!
I'm going to save the reference you shared, to learn more.

About the blog, well I think your design is a very important component of the blog too, so I am thankful for your great, minimal design! 😃
You may like to stay tuned to the blog, because there is some much more interesting application of analytics coming ahead 😉

from gravity.

hemangsk avatar hemangsk commented on May 29, 2024

Hello Ali 😃 I'm well thanks, hope you are great too!

You are absolutely right currently the theme doesn't support the category specific feed and it only has the feed.xml provided by jekyll by default. I looked on some references and found that we can create a feed-category.xml file in the root directory of our blog which will create category feed of the category specified.

So for the category "design",

We can create a 'feed.category.xml' file in the root directory.

And then Insert this content in the feed.category.xml file ,

---
---
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>

        <title>{{ site.name | xml_escape }}  Design</title>

               <description>Posts categorized as 'design'</description>

            <link>{{ site.url }}</link>
        <atom:link href="{{ site.url }}/{{ page.path }}" rel="self" type="application/rss+xml" />

            {% for post in site.categories.design %}

                    <item>
                <title>{{ post.title | xml_escape }}</title>
                {% if post.excerpt %}
                    <description>{{ post.excerpt | xml_escape }}</description>
        {% endif %}  
                {% if post.content %}
                    <description>{{ post.content | xml_escape }}</description>
                {% endif %}
                <pubDate>{{ post.date | date_to_rfc822 }}</pubDate>
                <link>{{ site.url }}{{ post.url }}</link>
                <guid isPermaLink="true">{{ site.url }}{{ post.url }}</guid>
            </item>
        {% endfor %}
    </channel>
</rss>

See I got a feed like this from this file,

This XML file does not appear to have any style information associated with it. The document tree is shown below.
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
<channel>
<title>Design</title>
<description>Posts categorized as 'design'</description>
<link>http://yourdomain.com</link>
<atom:link href="http://yourdomain.com/feed.category.xml" rel="self" type="application/rss+xml"/>
<item>
<title>Design Stories : Gravity</title>
<description>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p>
</description>
<description>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p> <p>Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> <p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</description>
<pubDate>Wed, 30 Mar 2016 19:45:31 +0530</pubDate>
<link>
http://yourdomain.com/design/science/life/2016/03/30/design-stories.html
</link>
<guid isPermaLink="true">
http://yourdomain.com/design/science/life/2016/03/30/design-stories.html
</guid>
</item>
</channel>
</rss>

btw here's the reference that helped , https://github.com/snaptortoise/jekyll-rss-feeds/

I'm quite sure it will work just fine and will enable the category specific feed functionality 🎉
If there's any kind of issue I am always here to help👍 😄
Also, Really Great blog Sir 😃

from gravity.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.