Put CSS and JS files to be bundled into its own folder

This commit is contained in:
Helen Chong 2024-07-19 08:35:56 +08:00
parent 5c727cb349
commit 4f6959e4fa
6 changed files with 5 additions and 5 deletions

View File

@ -27,7 +27,7 @@ export default function (eleventyConfig) {
// Eleventy bundle plugin
eleventyConfig.addBundle("css");
eleventyConfig.addBundle("js");
eleventyConfig.addBundle("js", { toFileDirectory: "assets/js" });
// Add content categories to a collection
eleventyConfig.addCollection("categories", function(collectionApi) {

View File

@ -5,10 +5,10 @@ eleventyNavigation:
eleventyComputed:
desc: Leave a message for {{ sitemeta.siteAuthor.name }}.
---
{%- css %}{% include "src/assets/css/comments.css" %}{%- endcss %}
{%- js %}{% include "src/assets/js/svgIconControl.js" %}{%- endjs %}
{%- js %}{% include "src/assets/js/googleSheetsReaderGizmo.js" %}{%- endjs %}
{%- js %}{% include "src/assets/js/comments.js" %}{%- endjs %}
{%- css %}{% include "src/_bundle/css/comments.css" %}{%- endcss %}
{%- js %}{% include "src/_bundle/js/svgIconControl.js" %}{%- endjs %}
{%- js %}{% include "src/_bundle/js/googleSheetsReaderGizmo.js" %}{%- endjs %}
{%- js %}{% include "src/_bundle/js/comments.js" %}{%- endjs %}
<p class="center-text">Guestbook Archive: <a href="https://web.archive.org/web/20240528231121/https%3A%2F%2Fleilukin.123guestbook.com%2F">123Guestbook</a></p>