Switchless TEST

Setup 11ty

# initialise npm
npm init 
# install eleventy 
npm install --save @11ty/eleventy

# install markdown-it-obsidian - to convert obsidian wiki links to md links
npm install markdown-it-obsidian --save

# generate html
npx @11ty/eleventy

# run 11ty service with hot reloading
npx @11ty/eleventy --serve

Modify .eleventy.js

module.exports = function(eleventyConfig) {
  let markdownIt = require("markdown-it");
  let markdownItObsidian = require("markdown-it-obsidian")();
  let markdownItOptions = {
    html: true,
  let markdownLib = markdownIt(markdownItOptions)
  eleventyConfig.setLibrary("md", markdownLib);
    // use <? ?> instead of <% %>
    delimiter: "?"
  return {
    templateFormats: [
      // "njk",
      // "liquid"
    // templateFormats: ["html", "njk", "md", "11ty.js"],
    markdownTemplateEngine: false,
    htmlTemplateEngine: false,
    dataTemplateEngine: false,
    dir: {
      input: ".",
      includes: "_includes",
      data: "_data",
      output: "_site"

Add includes folder

this copies layouts

Add assets folder

this copies semantic and general themes

create gitignore



Default Title and default layout

Create folder _data. create file -layout.js. In that file add module.exports="layout/post.ejs" similar stuff for title as well

ref: https://github.com/11ty/eleventy/issues/380

Ref: https://www.11ty.dev/docs/getting-started/