OrchidWritersBlocks
A collection of Template Tags and Components that help you get past the writer's block and make building your site a dream.
About
This plugin adds a collection of useful tags and functions for Pebble to make writing content simpler.
Installation
dependencies {
orchidRuntime("io.github.javaeden.orchid:OrchidWritersBlocks:0.21.2")
}
<dependency>
<groupId>io.github.javaeden.orchid</groupId>
<artifactId>OrchidWritersBlocks</artifactId>
<version>0.21.2</version>
<type>pom</type>
</dependency>
libraryDependencies += "io.github.javaeden.orchid" % "OrchidWritersBlocks" % "0.21.2"
@file:DependsOn("io.github.javaeden.orchid:OrchidWritersBlocks:0.21.2")
Demo
- Try the starter app
Usage
Tags
Alert
Wrap content in a callout or bootstrap-style alert.
{% alert 'warning' %}
This is your final warning!
{% endalert %}
Github Gist
Embed a Github Gist.
{% gist 'gistId' %}
Embed a photo from Instagram.
{% instagram 'username' 'postId' %}
Spotify
Embed a Spotify track or playlist.
{% spotify 'track | playlist' 'trackOrPlaylistID' %}
Tabs
Embed a Twitter post, collection, or timeline.
{% tabs %}
{% tab1 'One' %}Tab Content One{% endtab1 %}
{% tab2 'Two' %}Tab Content Two{% endtab2 %}
{% endtabs %}
Embed a Twitter post, collection, or timeline.
{% twitter 'username' %}
or
{% twitter 'username' 'tweetId' %}
Youtube
Embed a Youtube video.
{% youtube 'videoId' %}
Functions
Encode Spaces
Converts spaces to HTML-encoded non-breaking spaces to preserve spacing.
{{ encodeSpaces('text to encode') }}
Newline to BR
Converts newlines to BR tags to force HTML line breaks.
{{ nl2br('text to encode') }}
Pluralize
Attempts to convert a word to its English plural form.
{{ pluralize('word', 2) }}