- 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
23 lines
576 B
JavaScript
23 lines
576 B
JavaScript
import markdownit from 'markdown-it';
|
|
import { convert } from 'html-to-text';
|
|
const md = markdownit({html: true})
|
|
|
|
class SearchIndex {
|
|
data() {
|
|
return {eleventyExcludeFromCollections:["episode"], layout: null}
|
|
}
|
|
|
|
render (data) {
|
|
const documents = data.collections.episode.map((episode)=>{
|
|
return {
|
|
url:`${this.url(episode.url)}`,
|
|
title: episode.data.title,
|
|
text: convert (episode.content),
|
|
season: episode.data.season,
|
|
episode: episode.data.episode
|
|
}})
|
|
return JSON.stringify(documents);
|
|
}
|
|
}
|
|
|
|
export default SearchIndex |