krasimir / techy

A flat file CMS based on Gulp and AbsurdJS
http://krasimir.github.io/techy
MIT License
250 stars 23 forks source link

Modular content #36

Open 42piratas opened 8 years ago

42piratas commented 8 years ago

Hello there!

Do you see any way I could create pages with modular content using Techy?

E.g. using <% get('content_1') %> and <% get('content_2') %>

Love Techy! Thanks for sharing!

krasimir commented 8 years ago

Hey,

what about the template function http://krasimir.github.io/techy/docs/#templates

42piratas commented 8 years ago

Hey @krasimir!

Not exactly that. I've been using templates too, but I'd like to create pages in which the content comes from different .md files, so the content would be modular.

Let's say for example that on "page A" I want to insert <% get('content_1') %> and <% get('content_2') %>, considering that "content_1" comes from file_1.md, and content_2 comes from file_2.md.

Then I can create a "page B" and re-use <% get('content_2') %>, if I want (from the same 'file_2.md').

I know I can use templates inside other templates, but then the content of the sub-template must be inside the template, right? For example, I have been using templates for "footer" and "analytics". But in these cases the content is inside the templates, it doesn't come from .md files.

Makes sense?

krasimir commented 8 years ago

I see your point. I'll leave this issue open and will try to implement that. The challenge here is to run Techy inside itself which may be difficult right now.

42piratas commented 8 years ago

Actually please don't worry with implementing that, specially if I am the first and only to ask. I was just curious if you see any way to do that with the current features.

Thank you!