Liquid Filters
Because Jekyll uses Liquid for template processing, jekyll-octopod does so, too. Along with the standard liquid tags and filters, Jekyll adds a few of its own and jekyll-octopod adds a few more which are documented on this page.
Filters
CDATA escape
Escapes some text for CDATA
JSON escape
Escapes HTML entities in JSON strings.
Expand URLs
Replaces relative urls with full urls
Remove Script and Audio tags
Removes unwanted tags from shownotes
Http Only
changes url from requesting https to http
Time to RSS schema
Formats a Time to be RSS compatible.
Otherwise
Returns the first argument if it’s not nil or empty — otherwise it returns the second one.
Select audio file from hash
Returns the value of a given hash. If no key is given as a second parameter, it first tries “mp3”, then “m4a” and then it will return a more or less random value.
MIME type
Returns the MIME-Type of a given file format.
File size
Returns the size of a given file in bytes. If there is just a filename without a path, this method assumes that the file is an episode audio file which lives in /episodes.
Size By Format
Returns the size of a given file in bytes by looking into the front matter The sizes in bytes should be in the front matter for remotely hosted files:
filesize:
mp3: 123456
ogg: 234567
m4a: 345678
In Megabytes
Converts a size in Bytes to Megabytes
Slug
Returns a slug based on the id of a given page.
Split chapter
Splits a chapter, like it is written to the post YAML front matter, into the components ‘start’ — which refers to a single point in time relative to the beginning of the media file — and ‘title’ — which defines the text to be the title of the chapter.
Audio tag
Returns an <audio>
tag for a given page with <source>
tags in it for every
audio file in the page’s YAML front matter.
Web player
Returns the web player for the episode of a given page.
String of duration
Gets a number of seconds and returns a human readable duration string of it.
String of size
Gets a number of bytes and returns a human readable string of it.
Host from URL
Returns the host of a given url
Disqus configuration
Generates the config for disqus integration. If a page object is given, it generates the config variables only for this page. Otherwise, it only generates the global config variables.
SHA1
Returns the hex-encoded hash value of a given string. The optional second argument defines the length of the returned string.
Navigation list
Returns a ready-to-use navigation list of all pages that have navigation
set
in their YAML front matter. The list is sorted by the value of navigation
.
Episode feeds
Returns an array of all episode feeds named by the convention
episodes.<episode_file_format>.rss
within the root directory. Also it
contains all additional feeds specified by additional_feeds
in the _config.yml
.
If an episode_file_format
or key of additional_feeds
equals the optional
parameter, it will be skipped.
Episode feeds HTML
Returns HTML links to all episode feeds named by the convention
episodes.<episode_file_format>.rss
within the root directory. Also it returns
all additional feeds specified by additional_feeds
in the _config.yml
. If
an episode_file_format
or key of additional_feeds
equals the optional
parameter, it will be skipped.
Episode feeds RSS
Returns RSS-XML links to all episode feeds named by the convention
episodes.<episode_file_format>.rss
within the root directory. Also it returns
all additional feeds specified by additional_feeds
in the _config.yml
. If an
episode_file_format
or key of additional_feeds
equals the optional
parameter, it will be skipped.
Font Awesome icons
Returns the HTML tags for a font awesome icon
Continue reading with The post structure.