diff --git a/CHANGELOG.md b/CHANGELOG.md index aba49433..2ce340f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ - [#628](https://github.com/estruyf/vscode-front-matter/issues/628): Fix path argument and JSON data on custom scripts - [#633](https://github.com/estruyf/vscode-front-matter/issues/633): Fix custom taxonomy used as single value +- [#634](https://github.com/estruyf/vscode-front-matter/issues/634): Fix public folder processing in case of Hexo ## [9.0.0] - 2023-08-21 - [Release notes](https://beta.frontmatter.codes/updates/v9.0.0) diff --git a/src/dashboardWebView/components/Contents/Item.tsx b/src/dashboardWebView/components/Contents/Item.tsx index 1c73e2cf..91912f44 100644 --- a/src/dashboardWebView/components/Contents/Item.tsx +++ b/src/dashboardWebView/components/Contents/Item.tsx @@ -114,6 +114,10 @@ export const Item: React.FunctionComponent = ({ return cardFields && (cardFields.state || cardFields.date); }, [cardFields]); + if (pageData.slug === `Top-10-Pens-of-Jon-Kantner`) { + console.log(pageData) + } + if (view === DashboardViewType.Grid) { return (
  • diff --git a/src/helpers/FrameworkDetector.ts b/src/helpers/FrameworkDetector.ts index 708f8a3e..1e7ab105 100644 --- a/src/helpers/FrameworkDetector.ts +++ b/src/helpers/FrameworkDetector.ts @@ -122,14 +122,7 @@ export class FrameworkDetector { relAssetPath = relAssetPath.substring(1); } } - // Support for HEXO image folder - else if (frameworkId === 'hexo') { - relAssetPath = parseWinPath(relAssetPath); - if (relAssetPath.startsWith('/')) { - relAssetPath = relAssetPath.substring(1); - } - } - // Support for the Astro assets folder + // Support for the Astro assets folder or when you need relative paths else if ( staticFolder && staticFolderValue && @@ -147,6 +140,13 @@ export class FrameworkDetector { relAssetPath = relative(fileDir, assetDir); relAssetPath = join(relAssetPath, `${fileName.name}${fileName.ext}`); } + // Support for HEXO image folder + else if (frameworkId === 'hexo') { + relAssetPath = parseWinPath(relAssetPath); + if (relAssetPath.startsWith('/')) { + relAssetPath = relAssetPath.substring(1); + } + } return parseWinPath(relAssetPath); }