Updated Readme for version 2

This commit is contained in:
Jeremy Gonyea
2017-10-03 23:40:22 -04:00
parent e216fa9ea0
commit bf891fa239
4 changed files with 53 additions and 56 deletions

View File

@@ -1,7 +1,8 @@
# v2.0.0
## 09/29/2017
## 10/03/2017
1. [](#new)
* New page type for podcast-series. Folder structure follows Channel->Series->Episode.
* New page type for podcast-series. Folder structure follows Channel->Series->Episode. (Issue #4)
* New RSS feed available at podcast-series for child episodes of a series.
2. [](#improved)
* Vastly improved Twig templates for all three page types

View File

@@ -1,9 +1,8 @@
# Podcast Plugin
The **Podcast** Plugin is for [Grav CMS](http://github.com/getgrav/grav). This plugin creates the following:
- Page template for Podcast Channel
- Page template Podcast Episode
- An iTunes compatible podcast RSS feed
- Page templates for Podcast Channel, Podcast Series, and Podcast Episode
- An iTunes compatible podcast RSS feed, both at the Podcast Channel (all episodes) and Podcast Series (only a series' episodes)
## Installation
@@ -26,10 +25,12 @@ You should now have all the plugin files under
/your/site/grav/user/plugins/podcast
> NOTE: This plugin is a modular component for Grav which requires the following to operate:
* [Grav](http://github.com/getgrav/grav)
* [Auto Date](https://github.com/getgrav/grav-plugin-auto-date)
* [Error](https://github.com/getgrav/grav-plugin-error)
* [Problems](https://github.com/getgrav/grav-plugin-problems)
* [Feed](https://github.com/getgrav/grav-plugin-feed)
* [GetId3](https://github.com/jgonyea/grav-plugin-get-id3), along with its accompanying [getID3 php library](http://www.getid3.org/)
* [Grav](http://github.com/getgrav/grav)
* [Problems](https://github.com/getgrav/grav-plugin-problems)
> While technically not required, using the [Admin](https://github.com/getgrav/grav-plugin-admin) plugin will assist in adding new content.
@@ -39,45 +40,64 @@ Before configuring this plugin, you should copy the `user/plugins/podcast/podcas
Here is the default configuration and an explanation of available options:
```yaml
enabled: true
```
_Defaults plugin to **enabled** after installation_
## Usage
After installing and enabling the plugin, the admin form should now have two new page templates:
- Podcast Channel
- Podcast Episode
After installing and enabling the plugins, the admin form will now have three new page templates:
* Podcast Channel
* Podcast Series
* Podcast Episode
The general folder structure using only series will look like this:
* Podcast Channel
* Podcast Series A
* Podcast Episode 1
* Podcast Episode 2
* Podcast Series B
* Podcast Episode 3
* Podcast Episode 4
Using no series will look like this:
* Podcast Channel
* Podcast Episode 1
* Podcast Episode 2
Non-series episodes can exist next to series:
* Podcast Channel
* Podcast Episode 1
* Podcast Episode 2
* Podcast Series A
* Podcast Episode 3
* Podcast Episode 4
### Podcast Channel
A podcast RSS feed is created at PAGENAME.rss. RSS tags are filled with the appropriate data submitted in the admin form for a podcast channel/ episode.
A podcast RSS feed is created at PAGENAME.rss of all episodes underneath the channel, including ones within series. RSS tags are filled with the appropriate data submitted in the admin form for a podcast channel/ episode.
Example:
If a podcast channel is created at at http://www.example.com/mypodcast, then the url for the podcast RSS feed is found at http://www.example.com/mypodcast.rss
A partial is included for use on a podcast channel page. Place the following:
```
{% include 'partials/podcast_archive_list.html.twig' %}
```
in a podcast channel page's markdown for a listing of that channel's latest podcasts. Ensure to add the following to the header of the podcast channel:
```
process:
markdown: true
twig: true
twig_first: true
```
### Podcast Series
Used to group episodes, a podcast series page should be a child page to a podcast channel. Multiple series can exist as child pages of a podcast channel. A podcast RSS feed is also available at SERIESNAME.rss, but it will only contain episodes that are child pages to the series.
Example:
If a podcast series is created at at http://www.example.com/mypodcast/series1, then the url for the podcast RSS feed is found at http://www.example.com/mypodcast/series1.rss
### Podcast Episode
These should be created as child pages of a podcast channel. Note: Episodes won't show up in the RSS feed or the partial if there is no podcast audio attached.
These should be created as child pages of either a podcast channel or a podcast series. Note: Episodes won't show up in the RSS feed if there is no podcast audio attached. Episodes can use the built-in publish_date field to schedule publishing of the page, and the RSS feed will use publish_date, falling back to just date if found.
## Credits
- RSS structure based on [iTunes RSS Feed Sample](https://help.apple.com/itc/podcasts_connect/#/itcbaf351599)
- Thanks to [flaviocopes](https://github.com/flaviocopes) who assisted me with the initial groundwork from the feeds plugin
* RSS structure based on [iTunes RSS Feed Sample](https://help.apple.com/itc/podcasts_connect/#/itcbaf351599)
* Thanks to [flaviocopes](https://github.com/flaviocopes) who assisted me with the initial groundwork from the feeds plugin
## To Do
There is a Trello board of backlog and progress of items found [here](https://trello.com/b/jIKLMt5K/grav-plugin-podcast).
- Better media player integration (playlist?)
- Set podcast meta field validations as required
Submit any issues you find to the [issue queue](https://github.com/jgonyea/grav-plugin-podcast/issues).
A Trello board of current progress can be found [here](https://trello.com/b/jIKLMt5K/grav-plugin-podcast).

View File

@@ -1,5 +1,5 @@
name: Podcast
version: 1.0.1
version: 2.0.0
description: Creates a Podcast Content type and podcast RSS feed
icon: microphone
author:
@@ -12,8 +12,9 @@ docs: https://github.com/jgonyea/grav-plugin-podcast/blob/develop/README.md
license: MIT
dependencies:
- get-id3
- auto-date
- feed
- get-id3
form:
validation: strict

View File

@@ -1,25 +0,0 @@
<div class ="podcast-archive-wrapper">
<div class="podcast-archive>"
<h2>Podcast Archive</h2>
<ul>
{% set foundItems = FALSE %}
{% for episode in page.collection %}
{% if episode.header.podcast.audio %}
{% set striping = cycle(["even", "odd"], loop.index) %}
{% set foundItems = TRUE %}
<li class = 'podcast-meta {{ striping }}'>
<a href="{{ episode.url|absolute_url }}"><h3>{{ episode.title }}</h2></a>
<p class="date">{{ (episode.header.publish_date ?: episode.header.date)|date(' d M Y ') }}</p>
<p class="length">Length: {{ ((episode.header.podcast.audio)|first).duration }} </p>
</li>
{% endif %}
{% endfor %}
{% if foundItems == FALSE %}
<li><p>No episodes were found</p></li>
{% endif %}
</ul>
</div>
</div>