Go to file
2023-02-24 16:20:11 -06:00
_data Update to 2.0.0-beta.2 2023-01-26 17:17:58 -06:00
_includes Fixes https://github.com/11ty/eleventy-base-blog/issues/141 2023-02-07 11:07:11 -06:00
content Fixes https://github.com/11ty/eleventy-base-blog/issues/141 2023-02-07 11:07:11 -06:00
public One more tweak to heading links 2023-01-24 09:19:02 -06:00
.editorconfig Convert to tabs 2023-01-23 11:37:44 -06:00
.gitignore Initial commit. 2018-01-16 21:08:47 -06:00
.nojekyll Fixes https://github.com/11ty/eleventy-base-blog/issues/87 2022-06-29 14:28:21 -05:00
.nvmrc Update the Node default 2022-05-13 16:11:39 -05:00
eleventy.config.drafts.js Clean up the drafts code 2023-01-24 15:32:58 -06:00
eleventy.config.images.js A few more features and cleanup 2023-01-24 08:41:50 -06:00
eleventy.config.js Use the new eleventy-plugin-bundle 2023-02-02 17:35:18 -06:00
LICENSE Tiny tweaks 2023-01-23 11:37:54 -06:00
netlify.toml A bit more clarity on copy 2023-01-24 10:38:55 -06:00
package.json Update to v2.0.0 2023-02-09 10:04:04 -06:00
README.md Link to stable 2023-02-24 16:20:11 -06:00

eleventy-base-blog v8

A starter repository showing how to build a blog with the Eleventy site generator (using the v2.0 release).

Netlify Status

Getting Started

  1. Clone this Repository
git clone https://github.com/11ty/eleventy-base-blog.git my-blog-name
  1. Navigate to the directory
cd my-blog-name
  1. Have a look at eleventy.config.js to see if you want to configure any Eleventy options differently.
  2. Install dependencies
npm install
  1. Edit _data/metadata.js to change the site data.
  2. Run Eleventy

Generate a production-ready build:

npx @11ty/eleventy

Or build and host locally on a local development server:

npx @11ty/eleventy --serve

Or you can run debug mode to see all the internals.

Features

Demos

Deploy this to your own site

Deploy this Eleventy site in just a few clicks on these services:

Implementation Notes

  • content/about/index.md is an example of a content page.
  • content/blog/ has the blog posts but really they can live in any directory. They need only the post tag to be included in the blog posts collection.
  • Use the eleventyNavigation key (via the Eleventy Navigation plugin) in your front matter to add a template to the top level site navigation. This is in use on content/index.njk and content/about/index.md.
  • Content can be in any template format (blog posts neednt exclusively be markdown, for example). Configure your projects supported templates in eleventy.config.js -> templateFormats.
  • The public folder in your input directory will be copied to the output folder (via addPassthroughCopy in the eleventy.config.js file). This means ./public/css/* will live at ./_site/css/* after your build completes.
  • Provides two content feeds:
    • content/feed/feed.njk
    • content/feed/json.njk
  • This project uses three Eleventy Layouts:
    • _includes/layouts/base.njk: the top level HTML structure
    • _includes/layouts/home.njk: the home page template (wrapped into base.njk)
    • _includes/layouts/post.njk: the blog post template (wrapped into base.njk)
  • _includes/postslist.njk is a Nunjucks include and is a reusable component used to display a list of all the posts. content/index.njk has an example of how to use it.