#634 - Process relative public folders

This commit is contained in:
Elio Struyf
2023-08-25 11:41:06 +02:00
parent a6c0685184
commit 16762a5fa5
3 changed files with 13 additions and 8 deletions
+1
View File
@@ -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)
@@ -114,6 +114,10 @@ export const Item: React.FunctionComponent<IItemProps> = ({
return cardFields && (cardFields.state || cardFields.date);
}, [cardFields]);
if (pageData.slug === `Top-10-Pens-of-Jon-Kantner`) {
console.log(pageData)
}
if (view === DashboardViewType.Grid) {
return (
<li className="relative">
+8 -8
View File
@@ -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);
}