This is my first time using 11ty, so I had some trouble creating a blog at first, so I followed this LINK to start.
Besides step 1 using VSC, I created all these files and folders within the project through Notepad
Step 1
- You start of by creating a directory in the terminal
mkdir myblog
cd myblog
(myblog is what I called my project).
Step 2
-
Next is creating a
package.json
file
npm init -y
Then you install it
npm install --save-dev @11ty/eleventy
Step 3
-
Creating a folder called
_includes
and a file within calledlayout.njk
.
First Blog
Now you have to create a folder where all your
.md
files will be held. I created a folder calledblog
and the first markdown filefirstblog.md
Now you can compile the project with
npx @11ty/eleventy --serve
Your terminal should have compiled an index.html
into a _site
folder.
Final Project
Plug-in
The plug-in is used to make the date more presentable and easier to read.
To do this, create a file
.eleventy.js
. Then you putnpm install --save-dev eleventy-plugin-date
and donpx @11ty/eleventy --serve
.You'll see a http link containing
localhost
. Doctrl + click
to open your page!
Top comments (0)