generated from 11ty/eleventy-base-blog
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eleventy.js
26 lines (22 loc) · 859 Bytes
/
.eleventy.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
const fs = require("fs");
const eleventyNavigationPlugin = require("@11ty/eleventy-navigation");
const { EleventyRenderPlugin } = require("@11ty/eleventy");
const metagen = require('eleventy-plugin-metagen');
const pluginRss = require("@11ty/eleventy-plugin-rss");
module.exports = function(eleventyConfig) {
eleventyConfig.addPassthroughCopy("assets/img");
eleventyConfig.addPlugin(eleventyNavigationPlugin);
eleventyConfig.addPlugin(EleventyRenderPlugin);
eleventyConfig.addPlugin(metagen);
eleventyConfig.addPlugin(pluginRss);
eleventyConfig.setBrowserSyncConfig({
middleware: [
function(req, res, next) {
if (/^[^.]+$/.test(req.url)) {
res.setHeader('Content-Type', 'text/html; charset=utf-8');
}
next();
}
]
});
};