Quick Start
Eleventy requires Node.js 18. You can check whether or not you have Node installed by running node --version
in a Terminal. (Well, wait—what is a Terminal?) If node
is not found or it reports a version number below 18, you will need to install Node.js before moving on.
Now we’ll create an index.md
Markdown file. You can do this in the text editor of your choice or by running one of these commands in your terminal:
echo '# Heading' > index.md
Run Eleventy using npx
, an npm-provided command that is bundled with Node.js.
npx @11ty/eleventy --serve
Eleventy compiles any files in the current directory matching valid file extensions (md
is one of many) to the _site
output folder. It might look like this:
[11ty] Writing _site/index.html from ./index.md (liquid)
[11ty] Wrote 1 file in 0.03 seconds (v3.0.0)
[11ty] Watching…
[11ty] Server at http://localhost:8080/
The --serve
option also starts a local development server. Open up http://localhost:8080/
in your favorite web browser to view your web site.
- Read our full Get Started guide on the docs。
- Watch 6 minutes to Build a Blog from Scratch.
- from https://www.11ty.dev/
- (https://www.11ty.dev/docs/)
- (https://www.11ty.dev/blog/)
- 项目地址:https://github.com/11ty/eleventy/
$ cd vredeburg-site
$ npm run build (这个就是生成/更新静态博客的命令。它会在当前目录下生成
title: "快乐的节日"
date: 2024-10-24T16:23:00
tags:
- life
- music
---
No comments:
Post a Comment