https://github.com/kinduff/jekyll_miscellaneous
A collection of opinionated plugins for Jekyll.
https://github.com/kinduff/jekyll_miscellaneous
Last synced: 6 months ago
JSON representation
A collection of opinionated plugins for Jekyll.
- Host: GitHub
- URL: https://github.com/kinduff/jekyll_miscellaneous
- Owner: kinduff
- License: mit
- Created: 2022-02-08T22:42:15.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-06-01T21:26:31.000Z (about 2 years ago)
- Last Synced: 2025-03-02T09:48:40.508Z (over 1 year ago)
- Language: Ruby
- Homepage:
- Size: 44.9 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Jekyll Miscellaneous
[](https://badge.fury.io/rb/jekyll_miscellaneous) [](https://codecov.io/gh/kinduff/jekyll_miscellaneous)
A collection of opinionated plugins for Jekyll.
## How to install
Install the gem:
```
gem install jekyll_miscellaneous
```
Or add it to your Gemfile. You can use `bundle add jekyll_miscellaneous`.
Then use the plugin in your Jekyll's `_config.yml` file.
```
plugins:
- jekyll_miscellaneous
```
## How to use
This gem includes multiple Jekyll or Liquid plugins that you can use immediately without further configuration.
- Tags
- [YouTube](#youtube)
- Filters
- [Base64 Encode](#base64-encode)
- [Base64 Decode](#base64-decode)
- [Hash Color](#hash-color)
- [Regex Replace](#regex-replace)
- [Clean URLs](#clean-urls)
- [Truncate](#truncate)
- [URI Encode](#uri-encode)
- Hooks
- [External Links](#external-links)
- [Mark](#mark)
More to come.
### YouTube
Given:
```liquid
{% youtube dQw4w9WgXcQ %}
```
Will output:
```html
```
### Base64 Encode
Given:
```liquid
{% 'Hello, World!' | base64_encode %}
```
Will output:
```
SGVsbG8sIFdvcmxkIQ==
```
### Base64 Decode
Given:
```liquid
{% 'SGVsbG8sIFdvcmxkIQ==' | base64_decode %}
```
Will output:
```
Hello, World!
```
### Hash Color
Given:
```liquid
{% 'Hello, World!' | hash_color %}
```
Will output:
```
hsl(349, 100%, 90%)
```
### Regex Replace
Given:
```liquid
{% 'Hello, World!' | regex_replace '$Hello', 'Goodbye' %}
```
Will output:
```
Goodbye, World!
```
### Clean URLs
Given:
```liquid
{% 'Hello, http://example.com World!' | clean_urls %}
```
Will output:
```
Hello, World!
```
### Truncate
Given:
```liquid
{% 'Hello, World!' | truncate 10 %}
{% 'Hello, World!' | truncate 10 ',' %}
{% 'Hello, World!' | truncate 10 ',' '!' %}
```
Will output:
```
Hello, ...
Hello...
Hello!
```
### URI encode
Given:
```liquid
{% 'Hello, World!' | uri_encode %}
```
Will output:
```
Hello%2C%20World%21
```
### External links
With the configuration:
```yaml
base_url: https://kinduff.com
```
Given:
```html
Link to the
example.
```
Will output:
```html
Link to the
example ⧉.
```
More in the documentation.
### Mark
Given:
```markdown
Hello, ==World==!
```
Will output:
```html
Hello, World!
```
## Contributing
1. Fork it (`https://github.com/kinduff/jekyll_miscellaneous/fork`).
2. Create your feature branch (`git checkout -b my-new-feature`).
3. Commit your changes (`git commit -am "Add some feature"`).
4. Push to the branch (`git push origin my-new-feature`).
5. Create new Pull Request.