Compare commits

...

7 Commits

Author SHA1 Message Date
Elio
17150a53bc 7.3.4 2022-06-13 10:23:57 +02:00
Elio
fbf1990045 Update version in changelog 2022-06-13 10:23:51 +02:00
Elio
c5881d7905 Update changelog 2022-06-13 10:20:47 +02:00
Elio
b83f7beb30 #354 - Windows file parsing fix 2022-06-13 10:19:20 +02:00
Elio Struyf
7a2b45f031 Fix double pages on contents dashboard 2022-06-11 20:02:35 +02:00
Elio Struyf
8ed64691c4 7.3.3 2022-06-11 20:00:16 +02:00
Elio Struyf
844971cdd9 Fix card render 2022-06-11 20:00:03 +02:00
6 changed files with 29 additions and 6 deletions

View File

@@ -1,5 +1,18 @@
# Change Log
## [7.3.4] - 2022-06-13
### 🐞 Fixes
- [#354](https://github.com/estruyf/vscode-front-matter/issues/354): Fix Windows file path parsing for inserting media files
## [7.3.3] - 2022-06-11
### 🐞 Fixes
- Card render when taxonomy is not an array value
- Double pages on contents dashboard
## [7.3.2] - 2022-06-01
### 🐞 Fixes

2
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{
"name": "vscode-front-matter-beta",
"version": "7.3.2",
"version": "7.3.4",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@@ -3,7 +3,7 @@
"displayName": "Front Matter",
"description": "Front Matter is a CMS that runs within Visual Studio Code. It gives you the power and control of a full-blown CMS while also providing you the flexibility and speed of the static site generator of your choice like: Hugo, Jekyll, Hexo, NextJs, Gatsby, and many more...",
"icon": "assets/frontmatter-teal-128x128.png",
"version": "7.3.2",
"version": "7.3.4",
"preview": false,
"publisher": "eliostruyf",
"galleryBanner": {

View File

@@ -30,7 +30,13 @@ export const Item: React.FunctionComponent<IItemProps> = ({ fmFilePath, date, ti
}
const tagField = settings.dashboardState.contents.tags;
return pageData[tagField] || [];
const tagsValue = pageData[tagField] || [];
if (Array.isArray(tagsValue)) {
return tagsValue;
}
return [tagsValue];
}, [settings, pageData]);
if (view === DashboardViewType.Grid) {

View File

@@ -61,10 +61,14 @@ export const Item: React.FunctionComponent<IItemProps> = ({media}: React.PropsWi
const getRelPath = () => {
let relPath: string | undefined = "";
if (settings?.wsFolder && media.fsPath) {
relPath = media.fsPath.split(settings.wsFolder).pop();
const wsFolderParsed = parseWinPath(settings.wsFolder);
const mediaParsed = parseWinPath(media.fsPath);
relPath = mediaParsed.split(wsFolderParsed).pop();
if (settings.staticFolder && relPath) {
relPath = relPath.split(settings.staticFolder).pop();
const staticFolderParsed = parseWinPath(settings.staticFolder);
relPath = relPath.split(staticFolderParsed).pop();
}
}
return relPath;

View File

@@ -169,7 +169,7 @@ export class PagesListener extends BaseListener {
try {
const page = this.processPageContent(file.filePath, file.mtime, file.fileName, folder.title);
if (page) {
if (page && !pages.find(p => p.fmFilePath === page.fmFilePath)) {
pages.push(page);
}