guilty/craft-rss
Composer 安装命令:
composer require guilty/craft-rss
包简介
Use RSS Feeds in your templates with ease
README 文档
README
Craft RSS is a simple helper plugin that lets you pull down an RSS feed and use it in your Twig templates.
Requirements
This plugin requires Craft CMS 3.0.0-beta.23 or later.
Installation
To install the plugin, follow these instructions.
- Open your terminal and go to your Craft project:
cd /path/to/project
- Then tell Composer to load the plugin:
composer require guilty/craft-rss
- In the Control Panel, go to Settings → Plugins and click the “Install” button for Craft RSS.
Configuring Craft RSS
No configuration needed.
Using Craft RSS
{% set blogFeed = craft.rss.loadRss("https://helgesverre.com/blog/feed/") %}
{% if blogFeed %}
<h1>{{ blogFeed.title }}</h1>
<a href="{{ blogFeed.link }}">{{ blogFeed.link }}</a>
<ul>
{% for post in blogFeed.item %}
<li>
<a href="{{ post.link }}">
{{ post.title }} - {{ post.pubDate }}
</a>
</li>
{% endfor %}
</ul>
{% endif %}
Brought to you by Guilty AS
统计信息
- 总下载量: 15.24k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-10-12