nanogen
nanogen copied to clipboard
"Front matter" in partials
If i have partials/menu.ejs
, I figured I should be able to use "front matter" there such that:
---
menuItems:
- Item 1
- Item 2
- Item 3
---
would be available, e.g.:
<% if (partial.menuItems.tags) { %>
<% partial.menuItems.forEach(function(item) { %>
<span><%= item %></span>
<% }) %>
<% } %>
Alternatively..since "menu" is site wide I could make the "menuItems" available in site.config.js
.
Thought it would be a good nice-to-have though...assuming it's not complicated since page
already implements this.