Skip to content

Commit 5cb6d88

Browse files
committed
change .njk to .html
1 parent 7b3e3dc commit 5cb6d88

File tree

9 files changed

+29
-23
lines changed

9 files changed

+29
-23
lines changed

.eleventy.js

+6
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,10 @@ module.exports = function (eleventyConfig) {
3939

4040
// Copy Image Folder to /_site
4141
eleventyConfig.addPassthroughCopy("./static/img");
42+
43+
// Let Eleventy transform HTML files as nunjucks
44+
// So that we can use .html instead of .njk
45+
return {
46+
htmlTemplateEngine: "njk",
47+
};
4248
};
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

_includes/posts.njk renamed to _includes/posts.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
<div class="pb-5 mb-5 border-b border-gray-100">
88
<h1 class="font-bold text-5xl">{{title}}</h1>
99
<p class="text-center text-base leading-6 font-medium text-gray-500">
10-
<time>
11-
{{ date | readableDate }}
10+
<time> {{ date | readableDate }}
1211
by
1312
<a>{{ author }}</a>
1413

index.html

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
layout: default
3+
title: Neat Starter
4+
path: home
5+
---
6+
7+
<div class="container mx-auto lg:h-screen flex flex-col justify-center items-center">
8+
<h1>
9+
Welcome to
10+
<strong class="bg-clip-text text-transparent bg-gradient-to-r from-blue-500 to-purple-500">
11+
{{title}}
12+
</strong>
13+
</h1>
14+
15+
<p>
16+
<abbr title="netlify cms, eleventy, alpine js & tailwind css">NEAT</abbr>
17+
Starter Template. Get Started by editing
18+
<code class="bg-gray-100 text-blue-800 p-1">/index.njk</code>
19+
</p>
20+
21+
{% include "_includes/partials/content.njk" %}
22+
</div>

index.njk

-21
This file was deleted.

0 commit comments

Comments
 (0)