From f1ae60f280b6a93c834d7aa4e81e85a15c1c2ce7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 20 Jun 2025 12:46:44 +0000 Subject: [PATCH 2/9] Fix variable frontmatter error - handle both string and object formats for preview image fields Co-authored-by: estruyf <2900833+estruyf@users.noreply.github.com> --- src/services/PagesParser.ts | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/src/services/PagesParser.ts b/src/services/PagesParser.ts index bd2e339f..87d7fc33 100644 --- a/src/services/PagesParser.ts +++ b/src/services/PagesParser.ts @@ -333,19 +333,32 @@ export class PagesParser { // Revalidate as the array could have been empty if (fieldValue) { - // Check if the value already starts with https - if that is the case, it is an external image - if (fieldValue.startsWith('http')) { - page.fmPreviewImage = fieldValue; + // Handle both string and object formats for the field value + let imageValue: string; + if (typeof fieldValue === 'string') { + imageValue = fieldValue; + } else if (typeof fieldValue === 'object' && fieldValue.src) { + // Handle object format like { src: "filename.jpg", title: "title" } + imageValue = fieldValue.src; } else { - let staticPath = join(wsFolder.fsPath, staticFolder || '', fieldValue); + // Skip processing if the value is neither a string nor an object with src + imageValue = null; + } - if (staticFolder === STATIC_FOLDER_PLACEHOLDER.hexo.placeholder) { - const crntFilePath = parseWinPath(filePath); - const pathWithoutExtension = crntFilePath.replace(extname(crntFilePath), ''); - staticPath = join(pathWithoutExtension, fieldValue); - } + if (imageValue) { + // Check if the value already starts with https - if that is the case, it is an external image + if (imageValue.startsWith('http')) { + page.fmPreviewImage = imageValue; + } else { + let staticPath = join(wsFolder.fsPath, staticFolder || '', imageValue); - const contentFolderPath = join(dirname(filePath), fieldValue); + if (staticFolder === STATIC_FOLDER_PLACEHOLDER.hexo.placeholder) { + const crntFilePath = parseWinPath(filePath); + const pathWithoutExtension = crntFilePath.replace(extname(crntFilePath), ''); + staticPath = join(pathWithoutExtension, imageValue); + } + + const contentFolderPath = join(dirname(filePath), imageValue); let previewUri = null; if (await existsAsync(staticPath)) { @@ -367,6 +380,7 @@ export class PagesParser { page['fmPreviewImage'] = previewPath || ''; } } + } } } } From a387d5eb891d9627d8a6e4374ff554c420e0602e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 20 Jun 2025 12:48:08 +0000 Subject: [PATCH 3/9] Fix ContentType validation to handle non-string/non-array field values safely Co-authored-by: estruyf <2900833+estruyf@users.noreply.github.com> --- src/helpers/ContentType.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/helpers/ContentType.ts b/src/helpers/ContentType.ts index 14438c26..2eec9fe1 100644 --- a/src/helpers/ContentType.ts +++ b/src/helpers/ContentType.ts @@ -408,7 +408,7 @@ export class ContentType { * @param parents * @returns */ - public static getFieldValue(data: any, parents: string[]): string | string[] { + public static getFieldValue(data: any, parents: string[]): any { let fieldValue = []; let crntPageData = data; @@ -575,7 +575,8 @@ export class ContentType { fieldValue === null || fieldValue === undefined || fieldValue === '' || - fieldValue.length === 0 || + (Array.isArray(fieldValue) && fieldValue.length === 0) || + (typeof fieldValue === 'string' && fieldValue.length === 0) || fieldValue === DefaultFieldValues.faultyCustomPlaceholder ) { emptyFields.push(fields); From 2af6c57a4954b44add19306eee93c6212cfe2ae9 Mon Sep 17 00:00:00 2001 From: Elio Struyf Date: Mon, 26 Jan 2026 14:20:48 +0100 Subject: [PATCH 4/9] Update README.md with 2026 Open Source Priorities and content improvements --- README.md | 136 +++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 105 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index 45fc04ad..43945c64 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,28 @@ -

Front Matter a CMS running straight in Visual Studio Code

+

Front Matter - A Headless CMS for Visual Studio Code

+ +> **📢 2026 Open Source Priorities Update** +> +> I love working with and creating open source products, but after careful +> evaluation and working with a coach, I've decided to prioritize monetizing the +> tools I've built. While I'm grateful for all the support and sponsors I've +> received, I need to focus my time and effort more strategically. +> +> **Front Matter CMS will continue to be maintained** as I use it daily. +> However, major changes will only happen if there's a personal reason, a +> company commitment, or significant community support. Feature requests may +> take longer to be addressed. +> +> I'm shifting focus to open source projects that I can learn from or that have +> different outcomes—like **Demo Time**, which I use when presenting at +> conferences. If you or your company would like to sponsor my work on Front +> Matter CMS or other projects, I'd love to discuss how we can collaborate to +> make it even better! +> +> This is not about Front Matter CMS going away, but rather about managing +> expectations around feature development timelines.

@@ -28,11 +49,17 @@ ## ❓ What is Front Matter? -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. Jump right into editing and creating content with Front Matter and be able to preview it straight in VS Code. +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. Jump right into editing +and creating content with Front Matter and be able to preview it straight in VS +Code. -The extension supports various static-site generators and frameworks like Hugo, Jekyll, Hexo, NextJs, Gatsby, and more. +The extension supports various static-site generators and frameworks like Hugo, +Jekyll, Hexo, NextJs, Gatsby, and more. -A couple of our extension highlights that hopefully get you interested in giving Front Matter a try: +A couple of our extension highlights that hopefully get you interested in giving +Front Matter a try: - Content, data, and media management - Search, filter, sort, etc. all your content @@ -41,30 +68,40 @@ A couple of our extension highlights that hopefully get you interested in giving - Preview your site/content straight in Visual Studio Code - SEO checks for title, description, and keywords - Extensibility - - As we know, we cannot support all use cases. We provide a way to extend the functionality of the extension to your needs + - As we know, we cannot support all use cases. We provide a way to extend the + functionality of the extension to your needs - and many more features ... -> Missing something? Let us know by opening an issue on the [GitHub repository](https://github.com/estruyf/vscode-front-matter/issues/new/choose) +> Missing something? Let us know by opening an issue on the +> [GitHub repository](https://github.com/estruyf/vscode-front-matter/issues/new/choose)

Site preview

-> If you see something missing in your article creation flow, please feel free to reach out. +> If you see something missing in your article creation flow, please feel free +> to reach out. **Version 10** -In version 10, we introduced the new i18n/multilingual support for your content. You can now manage your content in multiple languages, more information can be found in the [multilingual](https://frontmatter.codes/docs/content-creation/multilingual) section of our documentation. +In version 10, we introduced the new i18n/multilingual support for your content. +You can now manage your content in multiple languages, more information can be +found in the +[multilingual](https://frontmatter.codes/docs/content-creation/multilingual) +section of our documentation. ![Multilingual support](https://beta.frontmatter.codes/releases/v10.0.0/multilingual-content.png) **Version 9** -The extension is now available in multiple languages: English, German, and Japanese. Want to add your language? Check out the [localization the extension](https://frontmatter.codes/docs/contributing#translating-the-extension). +The extension is now available in multiple languages: English, German, and +Japanese. Want to add your language? Check out the +[localization the extension](https://frontmatter.codes/docs/contributing#translating-the-extension). **Version 8** -The taxonomy dashboard got introduced on which you can manage your tags, categories, and custom taxonomy. +The taxonomy dashboard got introduced on which you can manage your tags, +categories, and custom taxonomy. ![Taxonomy dashboard](https://frontmatter.codes/assets/marketplace/v8.1.0/taxonomy-dashboard.png) @@ -76,17 +113,24 @@ Snippets support for Front Matter has been added! **Version 6** -In this version, we introduced the new data files/folders dashboard. You can find more information about the release in our [v6.0.0 release notes](https://frontmatter.codes/updates/v6.0.0). +In this version, we introduced the new data files/folders dashboard. You can +find more information about the release in our +[v6.0.0 release notes](https://frontmatter.codes/updates/v6.0.0).

Data dashboard

-> Data files/folders are pieces of content that do not belong to any markdown content, but live on their own. Most of the time, these data files are used to store additional information about your project/blog/website that will be used to render the content. +> Data files/folders are pieces of content that do not belong to any markdown +> content, but live on their own. Most of the time, these data files are used to +> store additional information about your project/blog/website that will be used +> to render the content. **Version 5** -The new media dashboard redesign got introduced + support for setting metadata on media files [v5.0.0 release notes](https://frontmatter.codes/updates/v5.0.0). +The new media dashboard redesign got introduced + support for setting metadata +on media files +[v5.0.0 release notes](https://frontmatter.codes/updates/v5.0.0).

Data dashboard @@ -94,15 +138,21 @@ The new media dashboard redesign got introduced + support for setting metadata o **Version 4** -Support for Team level settings, content-types, and image support. Get to know more at: [v4.0.0 release notes](https://frontmatter.codes/updates/v4_0_0). +Support for Team level settings, content-types, and image support. Get to know +more at: [v4.0.0 release notes](https://frontmatter.codes/updates/v4_0_0). **Version 3** -In version v3 we introduced the welcome and dashboard webview. The welcome view allows to get you started using the extension, and the dashboard allows you to manage all your markdown pages in one place. This makes it easy to search, filter, sort, and more. +In version v3 we introduced the welcome and dashboard webview. The welcome view +allows to get you started using the extension, and the dashboard allows you to +manage all your markdown pages in one place. This makes it easy to search, +filter, sort, and more. **Version 2** -In version v2 we released the re-designed sidebar panel with improved SEO support. This extension makes it the only extension to manage your Markdown pages for your static sites in Visual Studio Code. +In version v2 we released the re-designed sidebar panel with improved SEO +support. This extension makes it the only extension to manage your Markdown +pages for your static sites in Visual Studio Code.

@@ -114,33 +164,47 @@ In version v2 we released the re-designed sidebar panel with improved SEO suppor You can get the extension via: -- The VS Code marketplace: [VS Code Marketplace - Front Matter](https://marketplace.visualstudio.com/items?itemName=eliostruyf.vscode-front-matter). +- The VS Code marketplace: + [VS Code Marketplace - Front Matter](https://marketplace.visualstudio.com/items?itemName=eliostruyf.vscode-front-matter). - The extension CLI: `ext install eliostruyf.vscode-front-matter` -- Or by clicking on the following link: open extension in VS Code +- Or by clicking on the following link: open + extension in VS Code -> **Info**: The docs can be found on [frontmatter.codes](https://frontmatter.codes). +> **Info**: The docs can be found on +> [frontmatter.codes](https://frontmatter.codes). ### 🧪 Beta version -If you have the courage to test out the beta features, we made available a beta version as well. You can install this via: +If you have the courage to test out the beta features, we made available a beta +version as well. You can install this via: - Uninstall the main Front Matter version - Install the beta version - - VS Code marketplace: [VS Code Marketplace - Front Matter BETA](https://marketplace.visualstudio.com/items?itemName=eliostruyf.vscode-front-matter-beta). + - VS Code marketplace: + [VS Code Marketplace - Front Matter BETA](https://marketplace.visualstudio.com/items?itemName=eliostruyf.vscode-front-matter-beta). - The extension CLI: `ext install eliostruyf.vscode-front-matter-beta` - - Or by clicking on the following link: open extension in VS Code + - Or by clicking on the following link: open + extension in VS Code -> **Info**: The BETA docs can be found on [beta.frontmatter.codes](https://beta.frontmatter.codes). +> **Info**: The BETA docs can be found on +> [beta.frontmatter.codes](https://beta.frontmatter.codes). ## 📖 Documentation -All documentation can be found on [frontmatter.codes](https://frontmatter.codes). +All documentation can be found on +[frontmatter.codes](https://frontmatter.codes). -Documentation repository: [GitHub - Front Matter DOCs](https://github.com/FrontMatter/web-documentation-nextjs) +Documentation repository: +[GitHub - Front Matter DOCs](https://github.com/FrontMatter/web-documentation-nextjs) ## 💪 Contributing -Pull requests are welcome. Please open an issue first to discuss what you would like to change, or which problem you would like to fix. This makes it easier for us to follow-up and plan for future releases. +Pull requests are welcome. Please open an issue first to discuss what you would +like to change, or which problem you would like to fix. This makes it easier for +us to follow-up and plan for future releases. You can always help us improve the extension in varous ways like: @@ -153,7 +217,8 @@ You can always help us improve the extension in varous ways like: - Tutorials - etc. -Eager to start contributing? Great 🤩, you can contribute to the following projects: +Eager to start contributing? Great 🤩, you can contribute to the following +projects: - [Extension](https://github.com/estruyf/vscode-front-matter) - [Documentation](https://github.com/FrontMatter/web-documentation-nextjs) @@ -161,13 +226,16 @@ Eager to start contributing? Great 🤩, you can contribute to the following pro ## 👀 Show the work you are using Front Matter -Are you using Front Matter and are you interested in showing for which websites you use it? You can show your work by opening a [showcase issue](https://github.com/estruyf/vscode-front-matter/issues/new?assignees=&labels=&template=showcase.md&title=Showcase%3A+). +Are you using Front Matter and are you interested in showing for which websites +you use it? You can show your work by opening a +[showcase issue](https://github.com/estruyf/vscode-front-matter/issues/new?assignees=&labels=&template=showcase.md&title=Showcase%3A+). You can open showcase issues for the following things: - Show the website for which you use Front Matter; - Share an article/video/webcast/... that explains how you use Front Matter; -- Got something else to share? Open an issue and we can see where it fits on our website. +- Got something else to share? Open an issue and we can see where it fits on our + website. ## 👉 Contributors 🤘 @@ -209,9 +277,15 @@ You can open showcase issues for the following things: ## 📊 Telemetry -The Front Matter CMS extension only uses telemetry on application crashes. The extension respects the `telemetry.enableTelemetry` setting which you can learn more about in the [Visual Studio Code FAQ](https://aka.ms/vscode-remote/telemetry). +The Front Matter CMS extension only uses telemetry on application crashes. The +extension respects the `telemetry.enableTelemetry` setting which you can learn +more about in the +[Visual Studio Code FAQ](https://aka.ms/vscode-remote/telemetry). -For crash reports in the webviews, we make use of Sentry to help us understand what went wrong. This data is only used to fix issues and improve the extension. You can find more information about the Sentry implementation in the following files: +For crash reports in the webviews, we make use of Sentry to help us understand +what went wrong. This data is only used to fix issues and improve the extension. +You can find more information about the Sentry implementation in the following +files: - [Sentry config](https://github.com/estruyf/vscode-front-matter/blob/63e296d62f11be73ac86d9e823084247952a7ddc/src/utils/sentryInit.ts) From e6ef7555e322e60f85ccdde7c5e0a57e0e9d11b0 Mon Sep 17 00:00:00 2001 From: Elio Struyf Date: Mon, 26 Jan 2026 14:23:09 +0100 Subject: [PATCH 5/9] Update README.md to clarify focus on sustainable revenue for open source projects --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 43945c64..b69fb114 100644 --- a/README.md +++ b/README.md @@ -9,9 +9,10 @@ > **📢 2026 Open Source Priorities Update** > > I love working with and creating open source products, but after careful -> evaluation and working with a coach, I've decided to prioritize monetizing the -> tools I've built. While I'm grateful for all the support and sponsors I've -> received, I need to focus my time and effort more strategically. +> evaluation and working with a coach, I've decided to focus my efforts on +> creating a better revenue stream. As open-source isn't providing me a +> sustainable income, I need to focus my time and effort more strategically on +> how to make my work sustainable. > > **Front Matter CMS will continue to be maintained** as I use it daily. > However, major changes will only happen if there's a personal reason, a @@ -19,7 +20,7 @@ > take longer to be addressed. > > I'm shifting focus to open source projects that I can learn from or that have -> different outcomes—like **Demo Time**, which I use when presenting at +> different outcomes, like **Demo Time**, which I use when presenting at > conferences. If you or your company would like to sponsor my work on Front > Matter CMS or other projects, I'd love to discuss how we can collaborate to > make it even better! From 829c5c6e6446194f6b954e44c91db5fa6883dd7d Mon Sep 17 00:00:00 2001 From: Elio Struyf Date: Mon, 26 Jan 2026 14:30:33 +0100 Subject: [PATCH 6/9] Remove run.events sponsorship section from README.md --- README.md | 8 -------- 1 file changed, 8 deletions(-) diff --git a/README.md b/README.md index b69fb114..d8da15fb 100644 --- a/README.md +++ b/README.md @@ -254,14 +254,6 @@ You can open showcase issues for the following things:
-

- - run.events - Event Management Platform - -

- -
-

Deploys by Netlify From 3b65bb3cd78af099e625a6163c720afbaae6a5db Mon Sep 17 00:00:00 2001 From: Elio Struyf Date: Mon, 26 Jan 2026 14:30:51 +0100 Subject: [PATCH 7/9] Remove BEJS Community sponsorship section from README.md --- README.md | 8 -------- 1 file changed, 8 deletions(-) diff --git a/README.md b/README.md index d8da15fb..60430c36 100644 --- a/README.md +++ b/README.md @@ -260,14 +260,6 @@ You can open showcase issues for the following things:

-
- -

- - Supported by the BEJS Community - -

- ## 📊 Telemetry The Front Matter CMS extension only uses telemetry on application crashes. The From bdb2179e3e5feaf7194439c00dd97435aebb6a1b Mon Sep 17 00:00:00 2001 From: Elio Struyf Date: Sat, 14 Mar 2026 11:16:37 +0100 Subject: [PATCH 8/9] Revert "Fix variable frontmatter error - handle both string and object formats for preview image fields" --- src/helpers/ContentType.ts | 5 ++--- src/services/PagesParser.ts | 34 ++++++++++------------------------ 2 files changed, 12 insertions(+), 27 deletions(-) diff --git a/src/helpers/ContentType.ts b/src/helpers/ContentType.ts index 2eec9fe1..14438c26 100644 --- a/src/helpers/ContentType.ts +++ b/src/helpers/ContentType.ts @@ -408,7 +408,7 @@ export class ContentType { * @param parents * @returns */ - public static getFieldValue(data: any, parents: string[]): any { + public static getFieldValue(data: any, parents: string[]): string | string[] { let fieldValue = []; let crntPageData = data; @@ -575,8 +575,7 @@ export class ContentType { fieldValue === null || fieldValue === undefined || fieldValue === '' || - (Array.isArray(fieldValue) && fieldValue.length === 0) || - (typeof fieldValue === 'string' && fieldValue.length === 0) || + fieldValue.length === 0 || fieldValue === DefaultFieldValues.faultyCustomPlaceholder ) { emptyFields.push(fields); diff --git a/src/services/PagesParser.ts b/src/services/PagesParser.ts index 87d7fc33..bd2e339f 100644 --- a/src/services/PagesParser.ts +++ b/src/services/PagesParser.ts @@ -333,32 +333,19 @@ export class PagesParser { // Revalidate as the array could have been empty if (fieldValue) { - // Handle both string and object formats for the field value - let imageValue: string; - if (typeof fieldValue === 'string') { - imageValue = fieldValue; - } else if (typeof fieldValue === 'object' && fieldValue.src) { - // Handle object format like { src: "filename.jpg", title: "title" } - imageValue = fieldValue.src; + // Check if the value already starts with https - if that is the case, it is an external image + if (fieldValue.startsWith('http')) { + page.fmPreviewImage = fieldValue; } else { - // Skip processing if the value is neither a string nor an object with src - imageValue = null; - } + let staticPath = join(wsFolder.fsPath, staticFolder || '', fieldValue); - if (imageValue) { - // Check if the value already starts with https - if that is the case, it is an external image - if (imageValue.startsWith('http')) { - page.fmPreviewImage = imageValue; - } else { - let staticPath = join(wsFolder.fsPath, staticFolder || '', imageValue); + if (staticFolder === STATIC_FOLDER_PLACEHOLDER.hexo.placeholder) { + const crntFilePath = parseWinPath(filePath); + const pathWithoutExtension = crntFilePath.replace(extname(crntFilePath), ''); + staticPath = join(pathWithoutExtension, fieldValue); + } - if (staticFolder === STATIC_FOLDER_PLACEHOLDER.hexo.placeholder) { - const crntFilePath = parseWinPath(filePath); - const pathWithoutExtension = crntFilePath.replace(extname(crntFilePath), ''); - staticPath = join(pathWithoutExtension, imageValue); - } - - const contentFolderPath = join(dirname(filePath), imageValue); + const contentFolderPath = join(dirname(filePath), fieldValue); let previewUri = null; if (await existsAsync(staticPath)) { @@ -380,7 +367,6 @@ export class PagesParser { page['fmPreviewImage'] = previewPath || ''; } } - } } } } From d75dc9aff7e92840e9863e20aedcc2e9ef17ec3b Mon Sep 17 00:00:00 2001 From: Matt Van Horn <455140+mvanhorn@users.noreply.github.com> Date: Mon, 23 Mar 2026 01:12:26 -0700 Subject: [PATCH 9/9] fix: hide dot-prefixed folders in media panel Filter out directories starting with '.' when listing folders in the media panel. These hidden folders (like .git, .hidden) were appearing in the media browser unexpectedly. Added !dir.name.startsWith('.') to three readdirAsync filter chains in MediaHelpers.ts: selectedFolder scan (line 217), content folder scan (line 228), and static folder scan (line 246). Fixes #509 Co-Authored-By: Claude Opus 4.6 --- src/helpers/MediaHelpers.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/helpers/MediaHelpers.ts b/src/helpers/MediaHelpers.ts index e95f221f..6417ab90 100644 --- a/src/helpers/MediaHelpers.ts +++ b/src/helpers/MediaHelpers.ts @@ -214,7 +214,7 @@ export class MediaHelpers { if (selectedFolder) { if (await existsAsync(selectedFolder)) { foldersFromSelection = (await readdirAsync(selectedFolder, { withFileTypes: true })) - .filter((dir) => dir.isDirectory()) + .filter((dir) => dir.isDirectory() && !dir.name.startsWith('.')) .map((dir) => parseWinPath(join(selectedFolder, dir.name))); } } @@ -225,7 +225,7 @@ export class MediaHelpers { const contentPath = contentFolder.path; if (contentPath && (await existsAsync(contentPath))) { const subFolders = (await readdirAsync(contentPath, { withFileTypes: true })) - .filter((dir) => dir.isDirectory()) + .filter((dir) => dir.isDirectory() && !dir.name.startsWith('.')) .map((dir) => parseWinPath(join(contentPath, dir.name))); allContentFolders = [...allContentFolders, ...subFolders]; } @@ -243,7 +243,7 @@ export class MediaHelpers { if (staticPath && (await existsAsync(staticPath))) { allFolders = (await readdirAsync(staticPath, { withFileTypes: true })) - .filter((dir) => dir.isDirectory()) + .filter((dir) => dir.isDirectory() && !dir.name.startsWith('.')) .map((dir) => parseWinPath(join(staticPath, dir.name))); }