This is my personal blog, built with eleventy and based on the eleventy-base-blog v9 starter template.
See live on http://mar.coconauts.net/blog
Install deps:
npm install
Generate a production-ready build to the _site folder:
npx @11ty/eleventy
Or build and host on a local development server:
npx @11ty/eleventy --serve
Or you can run debug mode to see all the internals.
Posts go on content/posts/, each in their own directory. Directory name will become the url segment for that post. Content should go on a .md file matching the same name as the directory. Assets particular to that post (like images or any downloads) should go in the folder as well, and linked relatively from the post content.
The blog is hosted on github pages. There's a github workflow that is triggered by repository pushes and will build the blog and place the result on the gh-pages branch. It is then served on http://mar.coconauts.net/blog
- Blog base url lives on _data/metadata.js. Other settings are in eleventy.config.js.
- The content on
./publicwill be copied to./_siteat build time. Eg:./public/css/*will live at./_site/css/*. - URLs get
/content/prepended automatically by theHtmlBasePlugin. Useeleventy:ignoreto override (eg, done in _includes/layouts/base.njk) - Tag a post with
const draft = true;in the front matter and it will not be included in the build, but will show in the preview