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 { eleventyImageTransformPlugin } from "@11ty/eleventy-img";
|
||||||
|
|
||||||
import { collectionByTag } from "./config/collections/index.js";
|
import { collectionByTag } from "./config/collections/index.js";
|
||||||
|
|
||||||
import filters from "./config/filters/index.js";
|
import filters from "./config/filters/index.js";
|
||||||
import markdown from "./config/plugins/markdown.js";
|
import markdown from "./config/plugins/markdown.js";
|
||||||
import shortcodes from "./config/shortcodes/index.js";
|
import shortcodes from "./config/shortcodes/index.js";
|
||||||
import transforms from "./config/transforms/index.js";
|
import transforms from "./config/transforms/index.js";
|
||||||
|
|
||||||
export default function (eleventyConfig) {
|
export default function (eleventyConfig) {
|
||||||
|
// --------------------- Watch Targets -----------------------
|
||||||
eleventyConfig.addWatchTarget("./src/css");
|
eleventyConfig.addWatchTarget("./src/css");
|
||||||
|
|
||||||
// --------------------- Plugins ---------------------
|
// --------------------- Passthrough File Copy -----------------------
|
||||||
eleventyConfig.addPlugin(pluginNoRobots);
|
["src/assets/fonts/", "src/assets/images"].forEach((path) =>
|
||||||
|
eleventyConfig.addPassthroughCopy(path),
|
||||||
|
);
|
||||||
|
|
||||||
// --------------------- Custom Collections -----------------------
|
// --------------------- Markdown -----------------------
|
||||||
|
eleventyConfig.setLibrary("md", markdown);
|
||||||
|
|
||||||
|
// --------------------- Collections -----------------------
|
||||||
eleventyConfig.addCollection("postsByTag", (collection) =>
|
eleventyConfig.addCollection("postsByTag", (collection) =>
|
||||||
collectionByTag(collection, "post"),
|
collectionByTag(collection, "post"),
|
||||||
);
|
);
|
||||||
|
@ -31,18 +35,22 @@ export default function (eleventyConfig) {
|
||||||
collectionByTag(collection, "movie"),
|
collectionByTag(collection, "movie"),
|
||||||
);
|
);
|
||||||
|
|
||||||
// --------------------- Custom Filters -----------------------
|
// --------------------- Filters -----------------------
|
||||||
Object.keys(filters).forEach((filterName) => {
|
Object.keys(filters).forEach((filterName) => {
|
||||||
eleventyConfig.addFilter(filterName, filters[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) => {
|
Object.keys(transforms).forEach((transform) => {
|
||||||
eleventyConfig.addPlugin(transforms[transform]);
|
eleventyConfig.addPlugin(transforms[transform]);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Image Transforms
|
// --------------------- Image Transform --------------------
|
||||||
// Works with any <img> tag in output files.
|
|
||||||
eleventyConfig.addPlugin(eleventyImageTransformPlugin, {
|
eleventyConfig.addPlugin(eleventyImageTransformPlugin, {
|
||||||
extensions: "html",
|
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 {
|
return {
|
||||||
// Optional (default is set): If your site deploys to a subdirectory, change `pathPrefix`, for example with with GitHub pages
|
// Optional (default is set): If your site deploys to a subdirectory, change `pathPrefix`, for example with with GitHub pages
|
||||||
pathPrefix: "/",
|
pathPrefix: "/",
|
||||||
|
|
|
@ -20,7 +20,6 @@
|
||||||
"cssnano": "^6.0.3",
|
"cssnano": "^6.0.3",
|
||||||
"dayjs": "^1.11.10",
|
"dayjs": "^1.11.10",
|
||||||
"dotenv": "^16.4.5",
|
"dotenv": "^16.4.5",
|
||||||
"eleventy-plugin-no-robots": "^1.0.1",
|
|
||||||
"html-minifier-terser": "^7.2.0",
|
"html-minifier-terser": "^7.2.0",
|
||||||
"jsdom": "^26.0.0",
|
"jsdom": "^26.0.0",
|
||||||
"markdown-it": "^14.0.0",
|
"markdown-it": "^14.0.0",
|
||||||
|
|
|
@ -26,7 +26,6 @@
|
||||||
<style>{{ css | postcss | safe }}</style>
|
<style>{{ css | postcss | safe }}</style>
|
||||||
</head>
|
</head>
|
||||||
<body class="flex-col">
|
<body class="flex-col">
|
||||||
{% noRobots %}
|
|
||||||
{% include "partials/header.html" %}
|
{% include "partials/header.html" %}
|
||||||
<main id="main" class="flow flex-1 wrapper" tabindex="-1">
|
<main id="main" class="flow flex-1 wrapper" tabindex="-1">
|
||||||
{{ content | safe }}
|
{{ content | safe }}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue