Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Front matter" in partials #22

Open
xsorifc28 opened this issue Feb 23, 2019 · 0 comments
Open

"Front matter" in partials #22

xsorifc28 opened this issue Feb 23, 2019 · 0 comments

Comments

@xsorifc28
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant