feat: enhance podcast functionality and build pipeline
- 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
This commit is contained in:
23
content/episodes/search-index.11ty.js
Normal file
23
content/episodes/search-index.11ty.js
Normal file
@@ -0,0 +1,23 @@
|
||||
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
|
||||
Reference in New Issue
Block a user