- Dynamically resolve image paths for podcast episodes in `episodes.11tydata.js` - Add podcast metadata handling with inferred URLs for MP3 and transcripts - Introduce search functionality with Lunr.js and a search index generator - Update Eleventy path prefix handling to support environment variable override - Add `.mp4` files to `.gitignore` - Expand VSCode settings to include Markdown-Eleventy support and improved terminal history - Add deployment script (`deploy.sh`) with remote rsync-based deployment and permission handling - Adjust episode layout to use dynamic image paths and updated podcast metadata - Add search and members page updates, including new URLs and search integration - Update dependencies to include `html-to-text` and related packages for search indexing
65 lines
2.0 KiB
JavaScript
65 lines
2.0 KiB
JavaScript
const handlebarsPlugin = require("@11ty/eleventy-plugin-handlebars");
|
|
const handlebars = require('handlebars');
|
|
const sass = require("sass");
|
|
const pluginRss = require("@11ty/eleventy-plugin-rss");
|
|
const handlebarsHelpers = require('handlebars-helpers')
|
|
|
|
|
|
const htmlmin = require("html-minifier");
|
|
|
|
const utilsPlugin = require("./utils/plugin");
|
|
require('dotenv').config();
|
|
|
|
module.exports = function(eleventyConfig) {
|
|
// Passthrough episodes directory to include both markdown and audio files
|
|
eleventyConfig.addPassthroughCopy("content/episodes/*/*.mp3");
|
|
eleventyConfig.addPassthroughCopy("content/episodes/**/*.jpg");
|
|
eleventyConfig.addPassthroughCopy("content/episodes/**/*.webp");
|
|
eleventyConfig.addPassthroughCopy("content/episodes/**/*.png");
|
|
eleventyConfig.addPassthroughCopy("content/images");
|
|
eleventyConfig.addPassthroughCopy("content/feeds/*.jpg");
|
|
eleventyConfig.addPlugin(utilsPlugin, {immediate: true});
|
|
eleventyConfig.addPlugin(handlebarsPlugin);
|
|
eleventyConfig.addPlugin(pluginRss);
|
|
|
|
|
|
handlebarsHelpers({
|
|
handlebars
|
|
})
|
|
|
|
eleventyConfig.addTransform("htmlmin", (content, outputPath) => {
|
|
if (outputPath.endsWith(".html")) {
|
|
return htmlmin.minify(content, {
|
|
collapseWhitespace: true,
|
|
removeComments: true,
|
|
useShortDoctype: true,
|
|
});
|
|
}
|
|
|
|
return content;
|
|
});
|
|
|
|
// Creates the extension for use
|
|
eleventyConfig.addTemplateFormats("scss");
|
|
eleventyConfig.addExtension("scss", {
|
|
outputFileExtension: "css", // optional, default: "html"
|
|
// `compile` is called once per .scss file in the input directory
|
|
compile: async function (inputContent) {
|
|
let result = sass.compileString(inputContent, {
|
|
loadPaths: ["node_modules/bootstrap/scss", ]
|
|
});
|
|
|
|
// This is the render function, `data` is the full data cascade
|
|
return async (data) => result.css;
|
|
},
|
|
});
|
|
|
|
return {
|
|
pathPrefix: process.env.PATH_PREFIX || '/',
|
|
dir: {
|
|
data: "data",
|
|
input: "content",
|
|
includes: "../layouts"
|
|
}
|
|
};
|
|
}; |