diff --git a/lib/content/generate.ts b/lib/content/generate.ts index 31e4c37..655c933 100644 --- a/lib/content/generate.ts +++ b/lib/content/generate.ts @@ -19,7 +19,9 @@ export async function generateContent(content: Project|Diary, selectedPage?: num async function generateProjectHTML(project: Project): Promise { const resp = await fetch(`/content/projects/${project.name}.adoc`); if (resp.status !== 200) return projectServerErrorHtml; - const adDoc = ad.load(await resp.text(), { attributes: { showtitle: true } }); + const rawAd = await resp.text(); + const pathsCorrected = rawAd.replace(/(image[:]+)(.*\.[a-zA-Z]+)\[/g, `$1/content/projects/data_${project.name}/$2[`); + const adDoc = ad.load(pathsCorrected, { attributes: { showtitle: true } }); return `${adDoc.convert(adDoc).toString()}