Hotfix Collections

This commit is contained in:
OctoSpacc 2024-04-14 00:40:11 +02:00
parent f111057a2b
commit bbcfa01659
1 changed files with 1 additions and 2 deletions

View File

@ -184,7 +184,6 @@
if (!postUrl || !postUrl.startsWith('../Posts/') || postUrl === '../Posts/index.html') { if (!postUrl || !postUrl.startsWith('../Posts/') || postUrl === '../Posts/index.html') {
continue; continue;
} }
postUrl = postUrl.split('/').slice(1).join('/');
if (!postsData[postUrl]) { if (!postsData[postUrl]) {
postsData[postUrl] = { postsData[postUrl] = {
url: (extra.href + postUrl), url: (extra.href + postUrl),
@ -192,7 +191,7 @@
date: isoToUnixWithZone((postElem.querySelector('time') || {}).textContent || ''), date: isoToUnixWithZone((postElem.querySelector('time') || {}).textContent || ''),
image: (postElem.dataset.image image: (postElem.dataset.image
? postElem.dataset.image.replace('[staticoso:CustomPath:Assets]', extra.staticosoAssetsRoot).replace('[staticoso:Folder:Assets:AbsoluteRoot]', extra.staticosoAssetsRoot) ? postElem.dataset.image.replace('[staticoso:CustomPath:Assets]', extra.staticosoAssetsRoot).replace('[staticoso:Folder:Assets:AbsoluteRoot]', extra.staticosoAssetsRoot)
: (doc.querySelector(`div.staticoso-HtmlSearch-Pages > div.staticoso-HtmlSearch-Page[data-staticoso-htmlsearch-href="${postUrl}"] img[src]`) || {}).src : (doc.querySelector(`div.staticoso-HtmlSearch-Pages > div.staticoso-HtmlSearch-Page[data-staticoso-htmlsearch-href="${postUrl.slice(3)}"] img[src]`) || {}).src
), ),
categories: [] }; categories: [] };
} }