mirror of
https://github.com/apophenia-news/apophenia.news.git
synced 2026-10-29 06:44:56 +00:00
Feat: Host the NSA article's header image next to the article
Relative header_image paths (./img.webp) now resolve to /<slug>/img.webp, and article assets also ship unhashed so og:image and JSON-LD URLs resolve. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -63,6 +63,8 @@ const run = async () => {
|
||||
|
||||
articles.push({
|
||||
...data,
|
||||
// "./img.webp" points at a file next to index.md, which gets copied to /<slug>/
|
||||
header_image: data.header_image?.replace(/^\.\//, `/${data.slug}/`),
|
||||
sourceFile: file,
|
||||
markdown: md,
|
||||
isUnlisted: unlisted.has(data.slug),
|
||||
|
||||
@@ -98,7 +98,7 @@ export const renderArticle = (article, dates = articleDates(article)) => `
|
||||
${shellHead({
|
||||
title: `${article.title} — apophenia.news`,
|
||||
desc: article.description,
|
||||
image: article.header_image,
|
||||
image: absUrl(article.header_image),
|
||||
url: `${SITE_URL}/${article.slug}/`,
|
||||
type: "article",
|
||||
...dates,
|
||||
|
||||
Reference in New Issue
Block a user