Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/docs/templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ This template will be used to create the note text. You can use the following sy
- `{{date}}`: The publish date of the podcast episode.
- You can use `{{date:format}}` to specify a custom [Moment.js](https://momentjs.com) format. E.g. `{{date:YYYY-MM-DD}}`.
- `{{artwork}}`: The URL of the podcast artwork. If no artwork is found, an empty string will be used.
- `{{stream}}`: The URL of the podcast audio file for the episode.
2 changes: 1 addition & 1 deletion src/TemplateEngine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export function NoteTemplateEngine(template: string, episode: Episode) {
return htmlToMarkdown(episode.content);
});
addTag("safetitle", replaceIllegalFileNameCharactersInString(episode.title));
addTag("stream", episode.streamUrl);
addTag("stream", episode.streamUrl ?? "");
addTag("url", episode.url);
addTag("date", (format?: string) =>
episode.episodeDate
Expand Down
2 changes: 2 additions & 0 deletions src/ui/settings/PodNotesSettingsTab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,8 @@ export class PodNotesSettingsTab extends PluginSettingTab {
"\nPublishDate:: {{date:YYYY-MM-DD}}" +
"\n### Description" +
"\n> {{description}}",
"\n### Audio File URL" +
"\n> {{stream}}",
);
});

Expand Down