feat: remove no-robots plugin
This commit is contained in:
parent
ae2622c339
commit
21e49e518b
3 changed files with 17 additions and 24 deletions
|
@ -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 <img> 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: "/",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
<style>{{ css | postcss | safe }}</style>
|
||||
</head>
|
||||
<body class="flex-col">
|
||||
{% noRobots %}
|
||||
{% include "partials/header.html" %}
|
||||
<main id="main" class="flow flex-1 wrapper" tabindex="-1">
|
||||
{{ content | safe }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue