feat: improve Markdown support and add transcript search functionality

- Add `.cache` to `.gitignore` for temporary build files.
- Introduce Markdown snippets for creating Season 1 and Season 5 show notes in `.vscode/markdown.code-snippets`.
- Update `.vscode/settings.json`:
  - Exclude `node_modules` directory.
  - Adjust quick suggestions to disable them for comments, strings, and others.
- Remove unnecessary `console.log` statements from `episodes.11tydata.js`.
- Add an image file `content/episodes/image.jpg`.
- Implement a transcript search feature:
  - Add `search-transcripts.hbs` to enable searching transcript cues with time markers.
  - Add `transcript-index.11ty.js` to generate a searchable transcript index.
- Update `search-index.11ty.js` to skip processing `<hr>` and `<img>` tags.
- Enhance episode layout with `startAt` query parameter to allow audio playback from a specific time.
- Add a new dependency:
  - `@11ty/eleventy-fetch` for fetching transcripts.
  - `media-captions` for parsing and handling transcript files.
- Update package-lock.json and package.json to include new dependencies.
This commit is contained in:
2024-12-24 12:07:32 -06:00
parent 4350690071
commit 27eb1e634c
13 changed files with 345 additions and 13 deletions

39
.vscode/markdown.code-snippets vendored Normal file
View File

@@ -0,0 +1,39 @@
{
"Season 5 Show Notes": {
"prefix": ";s5",
"body":[
"---",
"title: ${title}",
"date: ${date}",
"---",
"{% prologue %}",
"${newspaperName}",
"===",
"${newspaperTagline}",
"{% timeTag date %}",
"\n## ${newspaperHeadline}",
"${newspaperSubheadline}\n",
"${article}"
"{% endprologue%}",
"\n{% alternateTitles%}",
"\n${alternateTitles}\n",
"{% endalternateTitles%}",
]
},
"Season 1 Show Notes": {
"prefix": ";s1",
"body":[
"---",
"title: ${title}",
"date: ${date}",
"---",
"# Prologue",
"<section class=\"prologue\"><div>",
"\n# Episode {{episode}}",
"\n## ${headline}",
"**${subHeadline}**",
"\n${content}\n",
"</div></section>"
]
}
}

12
.vscode/settings.json vendored
View File

@@ -1,18 +1,22 @@
{
"files.exclude": {
// "dist/": true
"**/.obsidian/": true
"dist/": false,
"**/.obsidian/": true,
"node_modules":true
},
"files.associations": {
"*.md": "markdown-eleventy"
},
"terminal.integrated.env.osx": {
"VSCODE_HISTFILE": "${workspaceFolder}/.vscode/.zsh_history",
},
"[markdown-eleventy]": {
"editor.wordWrap": "on",
"editor.wordWrapColumn": 80, // Optional: Set to your preferred wrap column
"editor.quickSuggestions": false // Optional: Disable suggestions for Markdown
"editor.quickSuggestions": {
"comments": "off",
"strings": "off",
"other": "off"
} // Optional: Disable suggestions for Markdown
}
}