mirror of
https://github.com/estruyf/vscode-front-matter.git
synced 2026-08-07 01:13:08 +02:00
#634 - Process relative public folders
This commit is contained in:
@@ -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">
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user