How to Upload an Audio Companion to Ghost From iOS Voice Memos and Obsidian
- Record voice memo
- AirDrop it to Mac
- Drag it into Obsidian Attachments folder
- Rename any special characters
- Publish using Obsidian Ghost plugin
- Manually upload audio on web dashboard
- Delete uploaded (2nd file)
- Done! Now the Obsidian audio is locally "linked" to the content uploaded to Ghost servers
- Note
/content/media/${year}/${month}
is coded to be taken care of with yaml keysghost-images-month
andghost-images-year
const content = data.content.replace(
/!*\[\[(.*?)\]\]/g,
(match: any, p1: string) => {
if (
...
) {
...
} else if (
p1.toLowerCase().includes(".m4a") ||
p1.toLowerCase().includes(".mp3") ||
p1.toLowerCase().includes(".wav")
) {
let year;
let month;
if (frontmatter.imagesYear && frontmatter.imagesMonth) {
year = frontmatter.imagesYear;
month = frontmatter.imagesMonth;
if (month < 10) {
month = `0${month}`;
}
} else {
// get the year
year = new Date().getFullYear();
// get the month
const monthNum = new Date().getMonth() + 1;
month = monthNum.toString();
if (monthNum < 10) {
month = `0${monthNum}`;
}
}
return `<div class="kg-card kg-audio-card">
<div class="kg-audio-player-container"><audio src="${BASE_URL}/content/media/${year}/${month}/${p1
.replace(/ /g, "-")
.replace(
/%20/g,
"-"
)}" preload="metadata"></audio><div class="kg-audio-title">${p1
.replace(".m4a", "")
.replace(".wav", "")
.replace(
".mp3",
""
)}</div></div></div>`;
}
...
}
);
bramadams.dev is a reader-supported published Zettelkasten. Both free and paid subscriptions are available. If you want to support my work, the best way is by taking out a paid subscription.