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

Opinion: Layouts used Exclusively for Page Generation Should Be in _templates with Fresh Scope #106

Open
desirtech opened this issue May 13, 2021 · 1 comment

Comments

@desirtech
Copy link

  1. Thanks @avillafiorita for finishing up this gem into ruby gems! I wish I could hand solutions before presenting new problems but all in good time.
  2. Surprisingly, liquid can be used in template front matter to set with datafile.
    ex.
- id: home # [note]: title & content keys overlap with Layout variables. 
  data: >- my lovely content. 
  layout: basic
  perma: /:id/
  prop: value
---
layout: {{ page.layout }} 
prop: {{ page.prop }}
permalink: {{ page.perma }}
---

# {{ page.id }}
### {{ page.data }} 
  1. However, I feel this means templates used for DataGen are fundamentally different than regular layouts, so why not have their own directories? This would allow for better variable scoping too because currently, page.[key], overlaps with regular Layout object (I use 'data' instead of content due to clash).

_templates would be great! Let's all work to makes this the most feature rich gem ever! The ability to author content and configs all from YAML isn't to be taken lightly.

@avillafiorita
Copy link
Owner

... so sorry for taking so long to start looking at your issue... been extremely busy with a new job.

Interesting idea. I'll look into the matter!

Thanks for the report and sorry again for the time it took me to acknowledge the bug.

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

No branches or pull requests

2 participants