TechLifeWeb

🌱Eleventy (11ty) a simpler static site generator


Published by 
Scott Kingery
 on 

Official Site

Eleventy, a simpler static site generator

Getting Started

How Tos

Others

Notes on Getting Things Set up

node Node.js — Download

Run the following commands. This installs 11ty, the luxon date formatter and the rss plugin

npm init -y
npm install @11ty/eleventy
npm install luxon
npm install @11ty/eleventy-plugin-rss

Create these folders

md src
md src\assets
md src\css
md src\_data
md src\_includes
md src\_includes\layouts
md _site

Create an .eleventy.js file and add the following

module.exports = function(eleventyConfig) {

// passhtrough folders
  eleventyConfig.addPassthroughCopy("src/assets/");
  eleventyConfig.addPassthroughCopy("src/css/");
  eleventyConfig.addPassthroughCopy("src/.well-known/");

  // passhtrough files
  eleventyConfig.addPassthroughCopy("src/*.txt");
  eleventyConfig.addPassthroughCopy("src/*.xml");

  // folder to watch during builds
  eleventyConfig.addWatchTarget("src/css");

  return {
    dir: {
      input: "src",
      includes: "_includes",
      output: "_site",
    },
    templateFormats: ["md", "njk", "html"],
    markdownTemplateEngine: "njk",
    dataTemplateEngine: "njk",
  };
};

Other Tools that Help

Quick Start | Hygen - Hygen is a tool that lets you use templates to build posts

🌻Garden Home