From 21e49e518b99f53f7a4d43b91aa33e281efb0082 Mon Sep 17 00:00:00 2001 From: Devin Haska <2636402+wonderfulfrog@users.noreply.github.com> Date: Fri, 4 Apr 2025 14:09:41 -0700 Subject: [PATCH] feat: remove no-robots plugin --- eleventy.config.js | 39 +++++++++++++++------------------- package.json | 1 - src/includes/layouts/base.html | 1 - 3 files changed, 17 insertions(+), 24 deletions(-) diff --git a/eleventy.config.js b/eleventy.config.js index da6cf37..9a71962 100644 --- a/eleventy.config.js +++ b/eleventy.config.js @@ -1,20 +1,24 @@ -import pluginNoRobots from "eleventy-plugin-no-robots"; import { eleventyImageTransformPlugin } from "@11ty/eleventy-img"; import { collectionByTag } from "./config/collections/index.js"; - import filters from "./config/filters/index.js"; import markdown from "./config/plugins/markdown.js"; import shortcodes from "./config/shortcodes/index.js"; import transforms from "./config/transforms/index.js"; export default function (eleventyConfig) { + // --------------------- Watch Targets ----------------------- eleventyConfig.addWatchTarget("./src/css"); - // --------------------- Plugins --------------------- - eleventyConfig.addPlugin(pluginNoRobots); + // --------------------- Passthrough File Copy ----------------------- + ["src/assets/fonts/", "src/assets/images"].forEach((path) => + eleventyConfig.addPassthroughCopy(path), + ); - // --------------------- Custom Collections ----------------------- + // --------------------- Markdown ----------------------- + eleventyConfig.setLibrary("md", markdown); + + // --------------------- Collections ----------------------- eleventyConfig.addCollection("postsByTag", (collection) => collectionByTag(collection, "post"), ); @@ -31,18 +35,22 @@ export default function (eleventyConfig) { collectionByTag(collection, "movie"), ); - // --------------------- Custom Filters ----------------------- + // --------------------- Filters ----------------------- Object.keys(filters).forEach((filterName) => { eleventyConfig.addFilter(filterName, filters[filterName]); }); - // --------------------- Custom Transforms ----------------------- + // --------------------- Shortcodes ----------------------- + Object.keys(shortcodes).forEach((shortcode) => { + eleventyConfig.addShortcode(shortcode, shortcodes[shortcode]); + }); + + // --------------------- Transforms ----------------------- Object.keys(transforms).forEach((transform) => { eleventyConfig.addPlugin(transforms[transform]); }); - // Image Transforms - // Works with any tag in output files. + // --------------------- Image Transform -------------------- eleventyConfig.addPlugin(eleventyImageTransformPlugin, { extensions: "html", @@ -66,19 +74,6 @@ export default function (eleventyConfig) { }, }); - // --------------------- Passthrough File Copy ----------------------- - ["src/assets/fonts/", "src/assets/images"].forEach((path) => - eleventyConfig.addPassthroughCopy(path), - ); - - // --------------------- Markdown ----------------------- - eleventyConfig.setLibrary("md", markdown); - - // --------------------- Shortcodes ----------------------- - Object.keys(shortcodes).forEach((shortcode) => { - eleventyConfig.addShortcode(shortcode, shortcodes[shortcode]); - }); - return { // Optional (default is set): If your site deploys to a subdirectory, change `pathPrefix`, for example with with GitHub pages pathPrefix: "/", diff --git a/package.json b/package.json index 1be007c..cde2459 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,6 @@ "cssnano": "^6.0.3", "dayjs": "^1.11.10", "dotenv": "^16.4.5", - "eleventy-plugin-no-robots": "^1.0.1", "html-minifier-terser": "^7.2.0", "jsdom": "^26.0.0", "markdown-it": "^14.0.0", diff --git a/src/includes/layouts/base.html b/src/includes/layouts/base.html index 0fa8c82..2f2357f 100644 --- a/src/includes/layouts/base.html +++ b/src/includes/layouts/base.html @@ -26,7 +26,6 @@ - {% noRobots %} {% include "partials/header.html" %}
{{ content | safe }}