Skip to content

Commit

Permalink
feat: switch file to .njk
Browse files Browse the repository at this point in the history
  • Loading branch information
tcelestino committed Nov 5, 2024
1 parent 7ece66e commit cc0dc0b
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions eleventy.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ module.exports = (config) => {

config.addPassthroughCopy('src/assets/css/**/*');

config.addLayoutAlias('default', 'default.html');
config.addLayoutAlias('post', 'post.html');
config.addLayoutAlias('default', 'default.njk');
config.addLayoutAlias('post', 'post.njk');

config.addCollection('posts', require('./lib/collections/posts'));

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/_layouts/default.html → src/_layouts/default.njk
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ <h1 class="top__title"><a href="{{ '/' | url }}">Blocos de Notas</a></h1>
</header>

<main class="page-content">
<div class="wrapper">{{ content | raw }}</div>
<div class="wrapper">{{ content | safe }}</div>
</main>

<footer class="site-footer">
Expand Down
2 changes: 1 addition & 1 deletion src/_layouts/post.html → src/_layouts/post.njk
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ <h1 class="post-title">{{ title }}</h1>
</time>
</p>
</header>
<div class="post-content">{{ content }}</div>
<div class="post-content">{{ content | safe }}</div>
</article>
2 changes: 1 addition & 1 deletion src/index.html → src/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<li>
<span class="post-meta">{{ post.date | readableDate }}</span>
<h2>
<a class="post-link" href="{{ post.url | url }}">{{ post.data.title | raw }}</a>
<a class="post-link" href="{{ post.url | url }}">{{ post.data.title | safe }}</a>
</h2>
</li>
{%- endfor -%}
Expand Down

0 comments on commit cc0dc0b

Please sign in to comment.