diff --git a/CHANGELOG.md b/CHANGELOG.md index a1a739d2..0741c512 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,12 @@ - [#768](https://github.com/estruyf/vscode-front-matter/issues/768): Update broken link to the documentation +## [10.0.2] - 2024-03-01 + +### 🐞 Fixes + +- [#769](https://github.com/estruyf/vscode-front-matter/issues/769): Fix to remove internal properties for content folders + ## [10.0.1] - 2024-02-28 ### 🐞 Fixes diff --git a/package-lock.json b/package-lock.json index 22cdabfe..81801084 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2931,8 +2931,7 @@ "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.17.tgz", "integrity": "sha512-/cpVNRLSfhOtcGflT13P2794gVSgmPgTR+erw5ifnMLZb0UnSlkK4tquLmkd3BhA+nLo5tX8Cu0upUsGKvKbmg==", "dev": true, - "funding": [ - { + "funding": [{ "type": "opencollective", "url": "https://opencollective.com/postcss/" }, @@ -3112,8 +3111,7 @@ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.3.tgz", "integrity": "sha512-UAp55yfwNv0klWNapjs/ktHoguxuQNGnOzxYmfnXIS+8AsRDZkSDxg7R1AX3GKzn078SBI5dzwzj/Yx0Or0e3A==", "dev": true, - "funding": [ - { + "funding": [{ "type": "opencollective", "url": "https://opencollective.com/browserslist" }, @@ -3207,8 +3205,7 @@ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001583.tgz", "integrity": "sha512-acWTYaha8xfhA/Du/z4sNZjHUWjkiuoAi2LM+T/aL+kemKQgPT1xBb/YKjlQ0Qo8gvbHsGNplrEJ+9G3gL7i4Q==", "dev": true, - "funding": [ - { + "funding": [{ "type": "opencollective", "url": "https://opencollective.com/browserslist" }, @@ -3321,12 +3318,10 @@ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], + "funding": [{ + "type": "individual", + "url": "https://paulmillr.com/funding/" + }], "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", @@ -3984,12 +3979,10 @@ "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ] + "funding": [{ + "type": "github", + "url": "https://github.com/sponsors/fb55" + }] }, "node_modules/domhandler": { "version": "5.0.3", @@ -4850,12 +4843,10 @@ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==", "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" - } - ], + "funding": [{ + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + }], "engines": { "node": ">=4.0" }, @@ -5432,8 +5423,7 @@ "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-2.4.0.tgz", "integrity": "sha512-igBTJcNNNhvZFRtm8uA6xMY6xYleeDwn3PeBCkDz7tHttv4F2hsDI2aPgNERWzvRcNYHNT3ymRaQzllmXj4YsQ==", "dev": true, - "funding": [ - { + "funding": [{ "type": "github", "url": "https://github.com/sponsors/mdevils" }, @@ -6008,8 +5998,7 @@ "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", "dev": true, - "funding": [ - { + "funding": [{ "type": "github", "url": "https://github.com/sponsors/feross" }, @@ -7040,8 +7029,7 @@ "resolved": "https://registry.npmjs.org/micromark/-/micromark-3.2.0.tgz", "integrity": "sha512-uD66tJj54JLYq0De10AhWycZWGQNUvDI55xPgk2sQM5kn1JYlhbCMTtEeT27+vAhW2FBQxLlOmS3pmA7/2z4aA==", "dev": true, - "funding": [ - { + "funding": [{ "type": "GitHub Sponsors", "url": "https://github.com/sponsors/unifiedjs" }, @@ -7075,8 +7063,7 @@ "resolved": "https://registry.npmjs.org/micromark-core-commonmark/-/micromark-core-commonmark-1.1.0.tgz", "integrity": "sha512-BgHO1aRbolh2hcrzL2d1La37V0Aoz73ymF8rAcKnohLy93titmv62E0gP8Hrx9PKcKrqCZ1BbLGbP3bEhoXYlw==", "dev": true, - "funding": [ - { + "funding": [{ "type": "GitHub Sponsors", "url": "https://github.com/sponsors/unifiedjs" }, @@ -7230,8 +7217,7 @@ "resolved": "https://registry.npmjs.org/micromark-factory-destination/-/micromark-factory-destination-1.1.0.tgz", "integrity": "sha512-XaNDROBgx9SgSChd69pjiGKbV+nfHGDPVYFs5dOoDd7ZnMAE+Cuu91BCpsY8RT2NP9vo/B8pds2VQNCLiu0zhg==", "dev": true, - "funding": [ - { + "funding": [{ "type": "GitHub Sponsors", "url": "https://github.com/sponsors/unifiedjs" }, @@ -7251,8 +7237,7 @@ "resolved": "https://registry.npmjs.org/micromark-factory-label/-/micromark-factory-label-1.1.0.tgz", "integrity": "sha512-OLtyez4vZo/1NjxGhcpDSbHQ+m0IIGnT8BoPamh+7jVlzLJBH98zzuCoUeMxvM6WsNeh8wx8cKvqLiPHEACn0w==", "dev": true, - "funding": [ - { + "funding": [{ "type": "GitHub Sponsors", "url": "https://github.com/sponsors/unifiedjs" }, @@ -7273,8 +7258,7 @@ "resolved": "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-1.1.0.tgz", "integrity": "sha512-cRzEj7c0OL4Mw2v6nwzttyOZe8XY/Z8G0rzmWQZTBi/jjwyw/U4uqKtUORXQrR5bAZZnbTI/feRV/R7hc4jQYQ==", "dev": true, - "funding": [ - { + "funding": [{ "type": "GitHub Sponsors", "url": "https://github.com/sponsors/unifiedjs" }, @@ -7293,8 +7277,7 @@ "resolved": "https://registry.npmjs.org/micromark-factory-title/-/micromark-factory-title-1.1.0.tgz", "integrity": "sha512-J7n9R3vMmgjDOCY8NPw55jiyaQnH5kBdV2/UXCtZIpnHH3P6nHUKaH7XXEYuWwx/xUJcawa8plLBEjMPU24HzQ==", "dev": true, - "funding": [ - { + "funding": [{ "type": "GitHub Sponsors", "url": "https://github.com/sponsors/unifiedjs" }, @@ -7315,8 +7298,7 @@ "resolved": "https://registry.npmjs.org/micromark-factory-whitespace/-/micromark-factory-whitespace-1.1.0.tgz", "integrity": "sha512-v2WlmiymVSp5oMg+1Q0N1Lxmt6pMhIHD457whWM7/GUlEks1hI9xj5w3zbc4uuMKXGisksZk8DzP2UyGbGqNsQ==", "dev": true, - "funding": [ - { + "funding": [{ "type": "GitHub Sponsors", "url": "https://github.com/sponsors/unifiedjs" }, @@ -7337,8 +7319,7 @@ "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-1.2.0.tgz", "integrity": "sha512-lXraTwcX3yH/vMDaFWCQJP1uIszLVebzUa3ZHdrgxr7KEU/9mL4mVgCpGbyhvNLNlauROiNUq7WN5u7ndbY6xg==", "dev": true, - "funding": [ - { + "funding": [{ "type": "GitHub Sponsors", "url": "https://github.com/sponsors/unifiedjs" }, @@ -7357,8 +7338,7 @@ "resolved": "https://registry.npmjs.org/micromark-util-chunked/-/micromark-util-chunked-1.1.0.tgz", "integrity": "sha512-Ye01HXpkZPNcV6FiyoW2fGZDUw4Yc7vT0E9Sad83+bEDiCJ1uXu0S3mr8WLpsz3HaG3x2q0HM6CTuPdcZcluFQ==", "dev": true, - "funding": [ - { + "funding": [{ "type": "GitHub Sponsors", "url": "https://github.com/sponsors/unifiedjs" }, @@ -7376,8 +7356,7 @@ "resolved": "https://registry.npmjs.org/micromark-util-classify-character/-/micromark-util-classify-character-1.1.0.tgz", "integrity": "sha512-SL0wLxtKSnklKSUplok1WQFoGhUdWYKggKUiqhX+Swala+BtptGCu5iPRc+xvzJ4PXE/hwM3FNXsfEVgoZsWbw==", "dev": true, - "funding": [ - { + "funding": [{ "type": "GitHub Sponsors", "url": "https://github.com/sponsors/unifiedjs" }, @@ -7397,8 +7376,7 @@ "resolved": "https://registry.npmjs.org/micromark-util-combine-extensions/-/micromark-util-combine-extensions-1.1.0.tgz", "integrity": "sha512-Q20sp4mfNf9yEqDL50WwuWZHUrCO4fEyeDCnMGmG5Pr0Cz15Uo7KBs6jq+dq0EgX4DPwwrh9m0X+zPV1ypFvUA==", "dev": true, - "funding": [ - { + "funding": [{ "type": "GitHub Sponsors", "url": "https://github.com/sponsors/unifiedjs" }, @@ -7417,8 +7395,7 @@ "resolved": "https://registry.npmjs.org/micromark-util-decode-numeric-character-reference/-/micromark-util-decode-numeric-character-reference-1.1.0.tgz", "integrity": "sha512-m9V0ExGv0jB1OT21mrWcuf4QhP46pH1KkfWy9ZEezqHKAxkj4mPCy3nIH1rkbdMlChLHX531eOrymlwyZIf2iw==", "dev": true, - "funding": [ - { + "funding": [{ "type": "GitHub Sponsors", "url": "https://github.com/sponsors/unifiedjs" }, @@ -7436,8 +7413,7 @@ "resolved": "https://registry.npmjs.org/micromark-util-decode-string/-/micromark-util-decode-string-1.1.0.tgz", "integrity": "sha512-YphLGCK8gM1tG1bd54azwyrQRjCFcmgj2S2GoJDNnh4vYtnL38JS8M4gpxzOPNyHdNEpheyWXCTnnTDY3N+NVQ==", "dev": true, - "funding": [ - { + "funding": [{ "type": "GitHub Sponsors", "url": "https://github.com/sponsors/unifiedjs" }, @@ -7458,8 +7434,7 @@ "resolved": "https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-1.1.0.tgz", "integrity": "sha512-EuEzTWSTAj9PA5GOAs992GzNh2dGQO52UvAbtSOMvXTxv3Criqb6IOzJUBCmEqrrXSblJIJBbFFv6zPxpreiJw==", "dev": true, - "funding": [ - { + "funding": [{ "type": "GitHub Sponsors", "url": "https://github.com/sponsors/unifiedjs" }, @@ -7474,8 +7449,7 @@ "resolved": "https://registry.npmjs.org/micromark-util-html-tag-name/-/micromark-util-html-tag-name-1.2.0.tgz", "integrity": "sha512-VTQzcuQgFUD7yYztuQFKXT49KghjtETQ+Wv/zUjGSGBioZnkA4P1XXZPT1FHeJA6RwRXSF47yvJ1tsJdoxwO+Q==", "dev": true, - "funding": [ - { + "funding": [{ "type": "GitHub Sponsors", "url": "https://github.com/sponsors/unifiedjs" }, @@ -7490,8 +7464,7 @@ "resolved": "https://registry.npmjs.org/micromark-util-normalize-identifier/-/micromark-util-normalize-identifier-1.1.0.tgz", "integrity": "sha512-N+w5vhqrBihhjdpM8+5Xsxy71QWqGn7HYNUvch71iV2PM7+E3uWGox1Qp90loa1ephtCxG2ftRV/Conitc6P2Q==", "dev": true, - "funding": [ - { + "funding": [{ "type": "GitHub Sponsors", "url": "https://github.com/sponsors/unifiedjs" }, @@ -7509,8 +7482,7 @@ "resolved": "https://registry.npmjs.org/micromark-util-resolve-all/-/micromark-util-resolve-all-1.1.0.tgz", "integrity": "sha512-b/G6BTMSg+bX+xVCshPTPyAu2tmA0E4X98NSR7eIbeC6ycCqCeE7wjfDIgzEbkzdEVJXRtOG4FbEm/uGbCRouA==", "dev": true, - "funding": [ - { + "funding": [{ "type": "GitHub Sponsors", "url": "https://github.com/sponsors/unifiedjs" }, @@ -7528,8 +7500,7 @@ "resolved": "https://registry.npmjs.org/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-1.2.0.tgz", "integrity": "sha512-QO4GXv0XZfWey4pYFndLUKEAktKkG5kZTdUNaTAkzbuJxn2tNBOr+QtxR2XpWaMhbImT2dPzyLrPXLlPhph34A==", "dev": true, - "funding": [ - { + "funding": [{ "type": "GitHub Sponsors", "url": "https://github.com/sponsors/unifiedjs" }, @@ -7549,8 +7520,7 @@ "resolved": "https://registry.npmjs.org/micromark-util-subtokenize/-/micromark-util-subtokenize-1.1.0.tgz", "integrity": "sha512-kUQHyzRoxvZO2PuLzMt2P/dwVsTiivCK8icYTeR+3WgbuPqfHgPPy7nFKbeqRivBvn/3N3GBiNC+JRTMSxEC7A==", "dev": true, - "funding": [ - { + "funding": [{ "type": "GitHub Sponsors", "url": "https://github.com/sponsors/unifiedjs" }, @@ -7571,8 +7541,7 @@ "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-1.1.0.tgz", "integrity": "sha512-uEjpEYY6KMs1g7QfJ2eX1SQEV+ZT4rUD3UcF6l57acZvLNK7PBZL+ty82Z1qhK1/yXIY4bdx04FKMgR0g4IAag==", "dev": true, - "funding": [ - { + "funding": [{ "type": "GitHub Sponsors", "url": "https://github.com/sponsors/unifiedjs" }, @@ -7587,8 +7556,7 @@ "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-1.1.0.tgz", "integrity": "sha512-ukRBgie8TIAcacscVHSiddHjO4k/q3pnedmzMQ4iwDcK0FtFCohKOlFbaOL/mPgfnPsL3C1ZyxJa4sbWrBl3jg==", "dev": true, - "funding": [ - { + "funding": [{ "type": "GitHub Sponsors", "url": "https://github.com/sponsors/unifiedjs" }, @@ -7770,12 +7738,10 @@ "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], + "funding": [{ + "type": "github", + "url": "https://github.com/sponsors/ai" + }], "bin": { "nanoid": "bin/nanoid.cjs" }, @@ -8653,8 +8619,7 @@ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.33.tgz", "integrity": "sha512-Kkpbhhdjw2qQs2O2DGX+8m5OVqEcbB9HRBvuYM9pgrjEFUg30A9LmXNlTAUj4S9kgtGyrMbTzVjH7E+s5Re2yg==", "dev": true, - "funding": [ - { + "funding": [{ "type": "opencollective", "url": "https://opencollective.com/postcss/" }, @@ -8717,8 +8682,7 @@ "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-4.0.2.tgz", "integrity": "sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ==", "dev": true, - "funding": [ - { + "funding": [{ "type": "opencollective", "url": "https://opencollective.com/postcss/" }, @@ -9075,8 +9039,7 @@ "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true, - "funding": [ - { + "funding": [{ "type": "github", "url": "https://github.com/sponsors/feross" }, @@ -10519,8 +10482,7 @@ "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", "dev": true, - "funding": [ - { + "funding": [{ "type": "github", "url": "https://github.com/sponsors/feross" }, @@ -10578,8 +10540,7 @@ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "dev": true, - "funding": [ - { + "funding": [{ "type": "github", "url": "https://github.com/sponsors/feross" }, @@ -12164,8 +12125,7 @@ "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", "dev": true, - "funding": [ - { + "funding": [{ "type": "opencollective", "url": "https://opencollective.com/browserslist" }, @@ -13032,4 +12992,4 @@ } } } -} +} \ No newline at end of file diff --git a/package.json b/package.json index 538d2952..9f765e18 100644 --- a/package.json +++ b/package.json @@ -10,8 +10,7 @@ "color": "#0e131f", "theme": "dark" }, - "badges": [ - { + "badges": [{ "description": "version", "url": "https://img.shields.io/github/package-json/v/estruyf/vscode-front-matter?color=green&label=vscode-front-matter&style=flat-square", "href": "https://github.com/estruyf/vscode-front-matter" @@ -71,8 +70,7 @@ "**/.frontmatter/config/*.json": "jsonc" } }, - "keybindings": [ - { + "keybindings": [{ "command": "frontMatter.dashboard", "key": "alt+d" }, @@ -90,23 +88,19 @@ } ], "viewsContainers": { - "activitybar": [ - { - "id": "frontmatter-explorer", - "title": "FM", - "icon": "$(fm-logo)" - } - ] + "activitybar": [{ + "id": "frontmatter-explorer", + "title": "FM", + "icon": "$(fm-logo)" + }] }, "views": { - "frontmatter-explorer": [ - { - "id": "frontMatter.explorer", - "name": "Front Matter", - "icon": "$(fm-logo)", - "type": "webview" - } - ] + "frontmatter-explorer": [{ + "id": "frontMatter.explorer", + "name": "Front Matter", + "icon": "$(fm-logo)", + "type": "webview" + }] }, "configuration": { "title": "%settings.configuration.title%", @@ -174,8 +168,7 @@ "frontMatter.content.defaultFileType": { "type": "string", "default": "md", - "oneOf": [ - { + "oneOf": [{ "enum": [ "md", "mdx" @@ -191,8 +184,7 @@ "frontMatter.content.defaultSorting": { "type": "string", "default": "", - "oneOf": [ - { + "oneOf": [{ "enum": [ "LastModifiedAsc", "LastModifiedDesc", @@ -540,8 +532,7 @@ "categories" ], "markdownDescription": "%setting.frontMatter.content.filters.markdownDescription%", - "items": [ - { + "items": [{ "type": "string", "enum": [ "contentFolders", @@ -614,8 +605,7 @@ "command": { "$id": "#scriptCommand", "type": "string", - "anyOf": [ - { + "anyOf": [{ "enum": [ "node", "bash", @@ -811,8 +801,7 @@ "title", "file" ], - "anyOf": [ - { + "anyOf": [{ "required": [ "schema" ] @@ -866,8 +855,7 @@ "id", "path" ], - "anyOf": [ - { + "anyOf": [{ "required": [ "schema" ] @@ -1108,29 +1096,26 @@ } } }, - "default": [ - { - "name": "default", - "fileTypes": null, - "fields": [ - { - "title": "Title", - "name": "title", - "type": "string" - }, - { - "title": "Caption", - "name": "caption", - "type": "string" - }, - { - "title": "Alt text", - "name": "alt", - "type": "string" - } - ] - } - ], + "default": [{ + "name": "default", + "fileTypes": null, + "fields": [{ + "title": "Title", + "name": "title", + "type": "string" + }, + { + "title": "Caption", + "name": "caption", + "type": "string" + }, + { + "title": "Alt text", + "name": "alt", + "type": "string" + } + ] + }], "scope": "Media" }, "frontMatter.media.supportedMimeTypes": { @@ -1360,8 +1345,7 @@ "default": "", "description": "%setting.frontMatter.taxonomy.contentTypes.items.properties.fields.items.properties.taxonomyId.description%", "not": { - "anyOf": [ - { + "anyOf": [{ "const": "" }, { @@ -1555,8 +1539,7 @@ "type", "name" ], - "allOf": [ - { + "allOf": [{ "if": { "properties": { "type": { @@ -1764,51 +1747,48 @@ "fields" ] }, - "default": [ - { - "name": "default", - "pageBundle": false, - "fields": [ - { - "title": "Title", - "name": "title", - "type": "string" - }, - { - "title": "Description", - "name": "description", - "type": "string" - }, - { - "title": "Publishing date", - "name": "date", - "type": "datetime", - "default": "{{now}}", - "isPublishDate": true - }, - { - "title": "Content preview", - "name": "preview", - "type": "image" - }, - { - "title": "Is in draft", - "name": "draft", - "type": "boolean" - }, - { - "title": "Tags", - "name": "tags", - "type": "tags" - }, - { - "title": "Categories", - "name": "categories", - "type": "categories" - } - ] - } - ], + "default": [{ + "name": "default", + "pageBundle": false, + "fields": [{ + "title": "Title", + "name": "title", + "type": "string" + }, + { + "title": "Description", + "name": "description", + "type": "string" + }, + { + "title": "Publishing date", + "name": "date", + "type": "datetime", + "default": "{{now}}", + "isPublishDate": true + }, + { + "title": "Content preview", + "name": "preview", + "type": "image" + }, + { + "title": "Is in draft", + "name": "draft", + "type": "boolean" + }, + { + "title": "Tags", + "name": "tags", + "type": "tags" + }, + { + "title": "Categories", + "name": "categories", + "type": "categories" + } + ] + }], "scope": "Taxonomy" }, "frontMatter.taxonomy.customTaxonomy": { @@ -1821,8 +1801,7 @@ "type": "string", "description": "%setting.frontMatter.taxonomy.customTaxonomy.items.properties.id.description%", "not": { - "anyOf": [ - { + "anyOf": [{ "const": "" }, { @@ -2007,8 +1986,7 @@ } } }, - "commands": [ - { + "commands": [{ "command": "frontMatter.project.switch", "title": "%command.frontMatter.project.switch%", "category": "Front Matter", @@ -2334,21 +2312,16 @@ } } ], - "submenus": [ - { - "id": "frontmatter.submenu", - "label": "Front Matter" - } - ], + "submenus": [{ + "id": "frontmatter.submenu", + "label": "Front Matter" + }], "menus": { - "webview/context": [ - { - "command": "workbench.action.webview.openDeveloperTools", - "when": "frontMatter:isDevelopment" - } - ], - "editor/title": [ - { + "webview/context": [{ + "command": "workbench.action.webview.openDeveloperTools", + "when": "frontMatter:isDevelopment" + }], + "editor/title": [{ "command": "frontMatter.markup.heading", "group": "navigation@-133", "when": "frontMatter:file:isValid == true && frontMatter:markdown:wysiwyg" @@ -2434,14 +2407,11 @@ "when": "resourceFilename == 'frontmatter.json'" } ], - "explorer/context": [ - { - "submenu": "frontmatter.submenu", - "group": "frontmatter@1" - } - ], - "frontmatter.submenu": [ - { + "explorer/context": [{ + "submenu": "frontmatter.submenu", + "group": "frontmatter@1" + }], + "frontmatter.submenu": [{ "command": "frontMatter.createFromTemplate", "when": "explorerResourceIsFolder", "group": "frontmatter@1" @@ -2457,8 +2427,7 @@ "group": "frontmatter@3" } ], - "commandPalette": [ - { + "commandPalette": [{ "command": "frontMatter.init", "when": "frontMatterCanInit" }, @@ -2635,8 +2604,7 @@ "when": "frontMatter:file:isValid == true" } ], - "view/title": [ - { + "view/title": [{ "command": "frontMatter.chatbot", "group": "navigation@0", "when": "view == frontMatter.explorer" @@ -2668,57 +2636,52 @@ } ] }, - "grammars": [ - { - "path": "./syntaxes/hugo.tmLanguage.json", - "scopeName": "frontmatter.markdown.hugo", - "injectTo": [ - "text.html.markdown" - ] - } - ], - "walkthroughs": [ - { - "id": "frontmatter.welcome", - "title": "Get started with Front Matter", - "description": "Discover the features of Front Matter and learn how to use the CMS for your SSG or static site.", - "steps": [ - { - "id": "frontmatter.welcome.init", - "title": "Get started", - "description": "Initial steps to get started.\n[Open dashboard](command:frontMatter.dashboard)", - "media": { - "markdown": "assets/walkthrough/get-started.md" - }, - "completionEvents": [ - "onContext:frontMatterInitialized" - ] + "grammars": [{ + "path": "./syntaxes/hugo.tmLanguage.json", + "scopeName": "frontmatter.markdown.hugo", + "injectTo": [ + "text.html.markdown" + ] + }], + "walkthroughs": [{ + "id": "frontmatter.welcome", + "title": "Get started with Front Matter", + "description": "Discover the features of Front Matter and learn how to use the CMS for your SSG or static site.", + "steps": [{ + "id": "frontmatter.welcome.init", + "title": "Get started", + "description": "Initial steps to get started.\n[Open dashboard](command:frontMatter.dashboard)", + "media": { + "markdown": "assets/walkthrough/get-started.md" }, - { - "id": "frontmatter.welcome.documentation", - "title": "Documentation", - "description": "Check out the documentation for Front Matter.\n[View our documentation](https://frontmatter.codes/docs)", - "media": { - "markdown": "assets/walkthrough/documentation.md" - }, - "completionEvents": [ - "onLink:https://frontmatter.codes/docs" - ] + "completionEvents": [ + "onContext:frontMatterInitialized" + ] + }, + { + "id": "frontmatter.welcome.documentation", + "title": "Documentation", + "description": "Check out the documentation for Front Matter.\n[View our documentation](https://frontmatter.codes/docs)", + "media": { + "markdown": "assets/walkthrough/documentation.md" }, - { - "id": "frontmatter.welcome.supporter", - "title": "Support the project", - "description": "Become a supporter.\n[Support the project](https://github.com/sponsors/estruyf)", - "media": { - "markdown": "assets/walkthrough/support-the-project.md" - }, - "completionEvents": [ - "onLink:https://github.com/sponsors/estruyf" - ] - } - ] - } - ] + "completionEvents": [ + "onLink:https://frontmatter.codes/docs" + ] + }, + { + "id": "frontmatter.welcome.supporter", + "title": "Support the project", + "description": "Become a supporter.\n[Support the project](https://github.com/sponsors/estruyf)", + "media": { + "markdown": "assets/walkthrough/support-the-project.md" + }, + "completionEvents": [ + "onLink:https://github.com/sponsors/estruyf" + ] + } + ] + }] }, "scripts": { "dev:ext": "npm run clean && npm run localization:generate && npm-run-all --parallel watch:*", @@ -2847,4 +2810,4 @@ "dependencies": { "@radix-ui/react-dropdown-menu": "^2.0.6" } -} +} \ No newline at end of file diff --git a/src/commands/Folders.ts b/src/commands/Folders.ts index 21b3410a..4493374d 100644 --- a/src/commands/Folders.ts +++ b/src/commands/Folders.ts @@ -405,8 +405,13 @@ export class Folders { * @param folders */ public static async update(folders: ContentFolder[]) { + const originalFolders = Settings.get(SETTING_CONTENT_PAGE_FOLDERS) as ContentFolder[]; const wsFolder = Folders.getWorkspaceFolder(); + // Filter out the locale folders + folders = folders.filter((folder) => !folder.locale || folder.locale === folder.defaultLocale); + + // Remove the internal FM properties const folderDetails = folders .map((folder) => { const detail = { @@ -418,6 +423,19 @@ export class Folders { return null; } + if (detail.locale && detail.locale === detail.defaultLocale) { + // Check if the folder was on the original list + const originalFolder = originalFolders.find((f) => f.path === folder.originalPath); + + if (originalFolder && !originalFolder.locales && folder.locales) { + delete detail.locales; + } + + delete detail.localeSourcePath; + delete detail.localeTitle; + } + + delete detail.locale; delete detail.originalPath; return detail; diff --git a/src/helpers/Extension.ts b/src/helpers/Extension.ts index 968adb8f..a6e22a31 100644 --- a/src/helpers/Extension.ts +++ b/src/helpers/Extension.ts @@ -10,7 +10,7 @@ import { DiagnosticCollection, languages } from 'vscode'; -import { Folders } from '../commands/Folders'; +import { Folders, WORKSPACE_PLACEHOLDER } from '../commands/Folders'; import { Template } from '../commands/Template'; import { EXTENSION_NAME, @@ -30,6 +30,7 @@ import { TaxonomyHelper } from './TaxonomyHelper'; import { Cache } from '../commands/Cache'; import * as l10n from '@vscode/l10n'; import { LocalizationKey } from '../localization'; +import { parseWinPath } from './parseWinPath'; export class Extension { private static instance: Extension; @@ -243,6 +244,31 @@ export class Extension { } } + if (major === 10 && minor === 0 && patch < 2) { + let folders = Settings.get(SETTING_CONTENT_PAGE_FOLDERS) || []; + folders = folders + .filter((f) => !f.locale || f.locale === f.defaultLocale) + .map((f) => { + delete f.locale; + delete f.localeTitle; + + if (f.localeSourcePath) { + const wsFolder = Folders.getWorkspaceFolder(); + if (wsFolder) { + const localPath = parseWinPath(f.localeSourcePath).replace( + parseWinPath(wsFolder.fsPath), + WORKSPACE_PLACEHOLDER + ); + f.path = localPath; + } + delete f.localeSourcePath; + } + + return f; + }); + await Settings.update(SETTING_CONTENT_PAGE_FOLDERS, folders, true); + } + // The tags and categories settings need to be moved to the database const tags = Settings.get(SETTING_TAXONOMY_TAGS) || []; const categories = Settings.get(SETTING_TAXONOMY_CATEGORIES) || []; diff --git a/src/models/ContentFolder.ts b/src/models/ContentFolder.ts index 646fe5e0..66bb39d9 100644 --- a/src/models/ContentFolder.ts +++ b/src/models/ContentFolder.ts @@ -17,5 +17,5 @@ export interface ContentFolder { localeTitle?: string; localeSourcePath?: string; defaultLocale?: string; - locales: I18nConfig[]; + locales?: I18nConfig[]; }