在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:jekyll/jekyll-feed开源软件地址:https://github.com/jekyll/jekyll-feed开源编程语言:Ruby 98.8%开源软件介绍:Jekyll Feed pluginA Jekyll plugin to generate an Atom (RSS-like) feed of your Jekyll posts InstallationAdd this line to your site's Gemfile: gem 'jekyll-feed' And then add this line to your site's plugins:
- jekyll-feed
UsageThe plugin will automatically generate an Atom feed at Optional configuration optionsThe plugin will automatically use any of the following configuration variables, if they are present in your site's
Already have a feed path?Do you already have an existing feed someplace other than feed:
path: /blog/feed.atom To note, you shouldn't have to do this unless you already have a feed you're using, and you can't or wish not to redirect existing subscribers. Optional front matterThe plugin will use the following post metadata, automatically generated by Jekyll, which you can override via a post's YAML front matter:
Additionally, the plugin will use the following values, if present in a post's YAML front matter:
Author informationTL;DR: In most cases, put There are several ways to convey author-specific information. Author information is found in the following order of priority:
author:
twitter: benbalter
author:
twitter: benbalter
author: benbalter And you have the following in benbalter:
picture: /img/benbalter.png
twitter: jekyllrb
potus:
picture: /img/potus.png
twitter: whitehouse In the above example, the author Pro-tip: If
author: benbalter
author: benbalter Meta tagsThe plugin exposes a helper tag to expose the appropriate meta tags to support automated discovery of your feed. Simply place SmartyPantsThe plugin uses Jekyll's Jekyll's kramdown:
smart_quotes: apos,apos,quot,quot
typographic_symbols: {hellip: ...} Custom stylingWant to style what your feed looks like in the browser? When a XSLT Styleheet file named Why Atom, and not RSS?Great question. In short, Atom is a better format. Think of it like RSS 3.0. For more information, see this discussion on why we chose Atom over RSS 2.0. CategoriesJekyll Feed can generate feeds for each category. Simply define which categories you'd like feeds for in your config: feed:
categories:
- news
- updates Posts limitBy default the plugin limits the number of posts in the feed to 10. Simply define a new limit in your config: feed:
posts_limit: 20 CollectionsJekyll Feed can generate feeds for collections other than the Posts collection. This works best for chronological collections (e.g., collections with dates in the filenames). Simply define which collections you'd like feeds for in your config: feed:
collections:
- changes By default, collection feeds will be outputted to feed:
collections:
changes:
path: "/changes.atom" Finally, collections can also have category feeds which are outputted as feed:
collections:
changes:
path: "/changes.atom"
categories:
- news
- updates Excerpt Only flagOptional flag When in feed:
excerpt_only: true The same flag can be used directly in post file. It will be disable TagsTo automatically generate feeds for each tag you apply to your posts you can add a tags setting to your config: feed:
tags: true If there are tags you don't want included in this auto generation you can exclude them feed:
tags:
except:
- tag-to-exclude
- another-tag If you wish to change the location of these auto generated feeds ( feed:
tags:
path: "alternative/path/for/tags/feeds/" If you only want to generate feeds for a few tags you can also set this. feed:
tags:
only:
- tag-to-include
- another-tag Note that if you include a tag that is excluded a feed will not be generated for it. Skip developmentUse feed:
disable_in_development: true Contributing
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论