Added new article layout template that will be rendered inside a page template.
Added an alias for the new article layout to Eleventy config
This commit is contained in:
parent
54ff1740bc
commit
0d696e507c
|
@ -6,6 +6,8 @@ module.exports = function(eleventyConfig) {
|
|||
eleventyConfig.addPlugin(eleventyNavigationPlugin)
|
||||
|
||||
eleventyConfig.addLayoutAlias('page', 'layouts/page')
|
||||
eleventyConfig.addLayoutAlias('article', 'layouts/article')
|
||||
|
||||
eleventyConfig.addFilter('readableDate', dateObj => {
|
||||
return DateTime.fromJSDate(dateObj, {
|
||||
zone: "Europe/Paris",
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
layout: page
|
||||
---
|
||||
|
||||
<article>
|
||||
<h1>{{ title }}</h1>
|
||||
<small>
|
||||
Published: <time>{{ date | readableDate }}</time>
|
||||
</small>
|
||||
{{ content | safe }}
|
||||
</article>
|
Loading…
Reference in New Issue