From b32dd75892083fa51adb7c5bac123f1adde2f0cc Mon Sep 17 00:00:00 2001 From: Josefine Hansson Date: Mon, 27 Jun 2022 10:02:23 +0200 Subject: [PATCH 1/7] test folder --- .../02.hero/boards/uno-rev3/tutorials/test_folder/content.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 content/hardware/02.hero/boards/uno-rev3/tutorials/test_folder/content.md diff --git a/content/hardware/02.hero/boards/uno-rev3/tutorials/test_folder/content.md b/content/hardware/02.hero/boards/uno-rev3/tutorials/test_folder/content.md new file mode 100644 index 0000000000..057bd18415 --- /dev/null +++ b/content/hardware/02.hero/boards/uno-rev3/tutorials/test_folder/content.md @@ -0,0 +1 @@ +this is a test folder to see if the linter catches the underscore in the folder name \ No newline at end of file From 7da0324affb05075fd9da462a2c7d2f2a8bb1d75 Mon Sep 17 00:00:00 2001 From: Josefine Hansson Date: Mon, 27 Jun 2022 10:16:37 +0200 Subject: [PATCH 2/7] added metadata --- .../boards/uno-rev3/tutorials/test_folder/content.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/content/hardware/02.hero/boards/uno-rev3/tutorials/test_folder/content.md b/content/hardware/02.hero/boards/uno-rev3/tutorials/test_folder/content.md index 057bd18415..53d7be2270 100644 --- a/content/hardware/02.hero/boards/uno-rev3/tutorials/test_folder/content.md +++ b/content/hardware/02.hero/boards/uno-rev3/tutorials/test_folder/content.md @@ -1 +1,8 @@ +--- +title: test +tags: [test] +description: test +author: me +--- + this is a test folder to see if the linter catches the underscore in the folder name \ No newline at end of file From 48db597b82e56e8dd45c9989585e015933823d27 Mon Sep 17 00:00:00 2001 From: Sebastian Romero Date: Tue, 28 Jun 2022 23:41:43 +0200 Subject: [PATCH 3/7] Enable folder validation --- scripts/validation/validate.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/validation/validate.js b/scripts/validation/validate.js index 7f188a07b9..fa896c2e99 100644 --- a/scripts/validation/validate.js +++ b/scripts/validation/validate.js @@ -8,6 +8,7 @@ import { validateImageDescriptions, validateImagePaths, validateReferencedAssets import { validateSyntaxSpecifiers } from 'content-lint'; import { validateNestedLists } from 'content-lint'; import { validateBrokenLinks } from 'content-lint'; +import { validateFolderName } from '../validations/naming.js'; import { ConfigManager } from 'content-lint'; const configManager = new ConfigManager(); @@ -55,6 +56,9 @@ if(configManager.options.checkBrokenLinks){ validator.addValidation(allArticles, validateBrokenLinks, configManager.getConfig("generic").brokenLinkExcludePatterns, configManager.getConfig("generic").baseURL, configManager.options.verbose); }; +// Verify if articles contain discouraged foldernames (which translate into URLs) +validator.addValidation(allArticles, validateFolderName); + // Verify that all files in the assets folder are referenced validator.addValidation(allArticles, validateReferencedAssets); From f41083cddbecc448c93b9992715cdce84733e458 Mon Sep 17 00:00:00 2001 From: Sebastian Romero Date: Tue, 28 Jun 2022 23:44:51 +0200 Subject: [PATCH 4/7] Fix incorrect import --- scripts/validation/validate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/validation/validate.js b/scripts/validation/validate.js index fa896c2e99..cee5587ecc 100644 --- a/scripts/validation/validate.js +++ b/scripts/validation/validate.js @@ -8,7 +8,7 @@ import { validateImageDescriptions, validateImagePaths, validateReferencedAssets import { validateSyntaxSpecifiers } from 'content-lint'; import { validateNestedLists } from 'content-lint'; import { validateBrokenLinks } from 'content-lint'; -import { validateFolderName } from '../validations/naming.js'; +import { validateFolderName } from 'content-lint'; import { ConfigManager } from 'content-lint'; const configManager = new ConfigManager(); From 1f48bc38af5cb89d0e416d036a524a5e1505b31e Mon Sep 17 00:00:00 2001 From: Sebastian Romero Date: Tue, 28 Jun 2022 23:46:54 +0200 Subject: [PATCH 5/7] Bump required linter version --- scripts/validation/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/validation/package.json b/scripts/validation/package.json index 29c4feb0b8..f46f867282 100644 --- a/scripts/validation/package.json +++ b/scripts/validation/package.json @@ -10,6 +10,6 @@ "author": "Sebastian Romero", "license": "ISC", "dependencies": { - "content-lint": "^1.0.0" + "content-lint": "^1.1.0" } } From 62883172d2ae053113608584157a3d27eb16e378 Mon Sep 17 00:00:00 2001 From: Sebastian Romero Date: Wed, 29 Jun 2022 08:24:27 +0200 Subject: [PATCH 6/7] Bump linter dependency --- scripts/validation/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/validation/package.json b/scripts/validation/package.json index f46f867282..2a206ae217 100644 --- a/scripts/validation/package.json +++ b/scripts/validation/package.json @@ -10,6 +10,6 @@ "author": "Sebastian Romero", "license": "ISC", "dependencies": { - "content-lint": "^1.1.0" + "content-lint": "^1.1.1" } } From c04fadbb8801d52acc51adbf8db3494169f0d4d2 Mon Sep 17 00:00:00 2001 From: Sebastian Romero Date: Wed, 29 Jun 2022 08:26:43 +0200 Subject: [PATCH 7/7] Remove dummy content --- .../boards/uno-rev3/tutorials/test_folder/content.md | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 content/hardware/02.hero/boards/uno-rev3/tutorials/test_folder/content.md diff --git a/content/hardware/02.hero/boards/uno-rev3/tutorials/test_folder/content.md b/content/hardware/02.hero/boards/uno-rev3/tutorials/test_folder/content.md deleted file mode 100644 index 53d7be2270..0000000000 --- a/content/hardware/02.hero/boards/uno-rev3/tutorials/test_folder/content.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -title: test -tags: [test] -description: test -author: me ---- - -this is a test folder to see if the linter catches the underscore in the folder name \ No newline at end of file