How to Upload an Audio Companion to Ghost From iOS Voice Memos and Obsidian

How can audio locally linked to content uploaded to Ghost servers?

How to Upload an Audio Companion to Ghost From iOS Voice Memos and Obsidian
  1. Record voice memo
  2. AirDrop it to Mac
  3. Drag it into Obsidian Attachments folder
  4. Rename any special characters
  5. Publish using Obsidian Ghost plugin
  6. Manually upload audio on web dashboard
  7. Delete uploaded (2nd file)
  8. Done! Now the Obsidian audio is locally "linked" to the content uploaded to Ghost servers
  9. Note /content/media/${year}/${month} is coded to be taken care of with yaml keys ghost-images-month and ghost-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.