Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/friendly-banana/jekyll-eval-frontmatter
Plugin for jekyll to evaluate ruby code in frontmatter
https://github.com/friendly-banana/jekyll-eval-frontmatter
Last synced: about 15 hours ago
JSON representation
Plugin for jekyll to evaluate ruby code in frontmatter
- Host: GitHub
- URL: https://github.com/friendly-banana/jekyll-eval-frontmatter
- Owner: Friendly-Banana
- License: gpl-3.0
- Created: 2024-02-20T15:03:33.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-02-20T17:00:14.000Z (9 months ago)
- Last Synced: 2024-02-21T17:58:52.314Z (9 months ago)
- Language: Ruby
- Homepage: https://friendly-banana.github.io/project/evaluating-frontmatter-jekyll-plugin/
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
This is a Jekyll plugin to evaluate Ruby code in the frontmatter.
If you want to use it, copy the Ruby file into your _plugins folder.
The plugin will find and execute all code in frontmatter values matching the regex `eval(
)`.
For example
```md
---
date: 'eval(site.time.strftime("%Y-%m-%d %H:%M:%S"))'
---
```will render the current time when building.
You can access everything from Ruby, the current `page`, the entire `site` etc..