Compare commits

..

2 Commits

Author SHA1 Message Date
Helen Chong a05f357e4b Create .htaccess file with Cache-Control 2024-07-28 20:05:50 +08:00
Helen Chong 7d230eb196 Rename copy config file to files 2024-07-28 19:48:35 +08:00
3 changed files with 10 additions and 2 deletions

View File

@ -8,7 +8,7 @@ import pluginTOC from "@uncenter/eleventy-plugin-toc";
// Custom Configurations // Custom Configurations
import markdownItConfig from "./src/_config/markdown-it.js"; import markdownItConfig from "./src/_config/markdown-it.js";
import copyConfig from "./src/_config/copy.js"; import filesConfig from "./src/_config/files.js";
import collectionsConfig from "./src/_config/collections.js"; import collectionsConfig from "./src/_config/collections.js";
import filterConfig from "./src/_config/filter.js"; import filterConfig from "./src/_config/filter.js";
import shortCodesConfig from "./src/_config/shortcodes.js"; import shortCodesConfig from "./src/_config/shortcodes.js";
@ -29,7 +29,7 @@ export default function(eleventyConfig) {
// Custom Configurations // Custom Configurations
eleventyConfig.addPlugin(markdownItConfig); eleventyConfig.addPlugin(markdownItConfig);
eleventyConfig.addPlugin(copyConfig); eleventyConfig.addPlugin(filesConfig);
eleventyConfig.addPlugin(collectionsConfig); eleventyConfig.addPlugin(collectionsConfig);
eleventyConfig.addPlugin(filterConfig); eleventyConfig.addPlugin(filterConfig);
eleventyConfig.addPlugin(shortCodesConfig); eleventyConfig.addPlugin(shortCodesConfig);

8
src/.htaccess.njk Normal file
View File

@ -0,0 +1,8 @@
---
permalink: .htaccess
eleventyExcludeFromCollections: true
---
<FilesMatch "\.(ico|svg|avif|jpg|png|gif|js|css|woff2)$">
Header set Cache-Control "max-age=31536000, public"
</FilesMatch>