Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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..