jekyll-wns

A collection of filters, tags and hooks that I use on my pages.

Installation

  1. Add gem "jekyll-wns", git: "https://github.com/0xReki/jekyll-wns.git, branch: "main" to your site's Gemfile and run bundle
  2. Add the following to your site's _config.yml:
gems:
  - jekyll-wns

Usage

Filters

Checksums

{{ site.content | sha384_64 }}
{{ site.content | sha384 }}
{{ site.content | sha256_64 }}
{{ site.content | sha256 }}

File Size

{{ site.content | file_size }}

Tags

Scene Breaks

{% scene_break leaves %}
<p style="text-align:center" data-mce-style="text-align:center">πŸ™ πŸ™‘ πŸ™“ πŸ™’ πŸ™ πŸ™‘ πŸ™“ πŸ™’ πŸ™ πŸ™‘ πŸ™“ πŸ™’</p>
{% scene_break wave %}
<p style="text-align:center;letter-spacing:-.13em" data-mce-style="text-align:center;letter-spacing:-.13em">◠◑◠◑◠◑◠◑◠◑◠◑◠◑◠◑◠◑◠◑◠‏</p>
{% scene_break wall %}
<p style="text-align:center;letter-spacing:-.2em" data-mce-style="text-align:center;letter-spacing:-.2em">β€ŽβšŽβ€βšβ€ŽβšŽβšβ€ŽβšŽβšβ€ŽβšŽβšβ€ŽβšŽβšβ€ŽβšŽβšβ€ŽβšŽβšβ€ŽβšŽβšβ€ŽβšŽβšβ€ŽβšŽβšβ€ŽβšŽ</p>
{% scene_break %}
<p style="text-align:center" data-mce-style="text-align:center">πŸ™ΏπŸ™ΎπŸ™ΏπŸ™ΎπŸ™ΏπŸ™ΎπŸ™ΏπŸ™Ύ

Hooks

Automatic replacement of spaces to en quads after each sentence

Assuming your files are each sentence in their own line, just add this to your _config.yml:

wns:
  quads: true

Automatic typographic handling of abbreviations

Just omit the space between the letters and use normal spaces, then add this to your _config.yml:

wns:
  abbrevations: true
Example
… tools, e.g., hammer,…

With abbreviations: true:

… tools,&nbsp;e.&#8239;\g.,&nbsp;hammer,…