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

Should templating syntax in contents be rendered? #15

Closed
ismay opened this issue Jul 18, 2015 · 1 comment
Closed

Should templating syntax in contents be rendered? #15

ismay opened this issue Jul 18, 2015 · 1 comment

Comments

@ismay
Copy link
Member

ismay commented Jul 18, 2015

Don't want to duplicate metalsmith-in-places functionality. But maybe this defines the goals for both plugins pretty well:

metalsmith-in-place: A generic template plugin that simply renders the contents in each source file, passing [the rendered contents] to the templating engine WITH the yaml matter in the top of the file.

metalsmith-layouts: A 'layout' plugin that has support for the [layout] template yaml which will pass the rendered content from the template onto the main layout. Again, this would conflict if you was using something like swig or nunjucks so that would have to be noted when using the plugin. It's really just a plugin for templating engines that don't support template inheritance.

from: segment-boneyard/metalsmith-templates#35

Metalsmith-layouts could be easily used for blogs rendering .md files into a main template, etc. Whereas metalsmith-in-place would support more diy, complex templating use-cases.

So basically the support for a layout yaml property is what separates them. Which doesn't mean templating syntax in source files shouldn't be processed by metalsmith-layouts, I'd say. Or are there reasons not to do this? You could also just drop a metalsmith-in-place instance in front of it of course..

@ismay
Copy link
Member Author

ismay commented Jul 18, 2015

Probably easier to just use metalsmith-in-place

@ismay ismay closed this as completed Jul 18, 2015
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