From 5fe613215a8fc1a92ea2eef5b8e927b798add648 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Wed, 29 Oct 2025 12:51:45 -0400 Subject: [PATCH 1/2] Boost dataset_description up in search results and changelog and glossary down Immediate usecase came with @asmacdo finding GeneratedBy in glossary but without connection to datataset_description.json and thus not being certain if that is the location for it. Overall, I think that glossary and changelog (even lower) is good to search (so we must not exclude) but should be closer to the bottom of the list of the hits since they would take longer to load, and would be "too generic" of hits. Lowering changelog below glossary though did not bring desired effect for me and changelog comes still above glossary when searching for GeneratedBy. --- src/CHANGES.md | 5 +++++ src/glossary.md | 5 +++++ src/modality-agnostic-files/dataset-description.md | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/src/CHANGES.md b/src/CHANGES.md index c5a9f36951..cc879477e9 100644 --- a/src/CHANGES.md +++ b/src/CHANGES.md @@ -1,3 +1,8 @@ +--- +search: + boost: -5 +--- + # Changelog ## [v1.10.1](https://bids-specification.readthedocs.io/en/v1.10.1/) (2025-09-03) diff --git a/src/glossary.md b/src/glossary.md index 07ac5824c4..f4128a5d48 100644 --- a/src/glossary.md +++ b/src/glossary.md @@ -1,3 +1,8 @@ +--- +search: + boost: -2 +--- + # Glossary of schema objects This section compiles the object definitions in the schema. diff --git a/src/modality-agnostic-files/dataset-description.md b/src/modality-agnostic-files/dataset-description.md index 79d75264c3..47b5767b74 100644 --- a/src/modality-agnostic-files/dataset-description.md +++ b/src/modality-agnostic-files/dataset-description.md @@ -1,3 +1,8 @@ +--- +search: + boost: 5 +--- + # Dataset description Templates: From 82d78af2beda61a2a8068d8c404995af7dc0adf7 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Wed, 29 Oct 2025 15:37:56 -0400 Subject: [PATCH 2/2] Add remark-frontmatter to allow for frontmatter settings per .md --- .remarkrc | 1 + package-lock.json | 81 ++++++++++++++++++++++++++++++++++++++++++++++- package.json | 1 + 3 files changed, 82 insertions(+), 1 deletion(-) diff --git a/.remarkrc b/.remarkrc index 5f10c62bdf..11e5398b27 100644 --- a/.remarkrc +++ b/.remarkrc @@ -1,5 +1,6 @@ { "plugins": [ + "remark-frontmatter", "preset-lint-markdown-style-guide", "preset-lint-recommended", "remark-gfm", diff --git a/package-lock.json b/package-lock.json index 7c93750d59..3087d59d7d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "specification", + "name": "bids-specification", "lockfileVersion": 3, "requires": true, "packages": { @@ -8,6 +8,7 @@ "all-contributors-cli": "^6.26.1", "prettier": "^3.6.2", "remark-cli": "^12.0.1", + "remark-frontmatter": "^5.0.0", "remark-gfm": "^4.0.1", "remark-lint-no-trailing-spaces": "^3.0.2", "remark-preset-lint-markdown-style-guide": "^6.0.1", @@ -875,6 +876,18 @@ "node": ">=4" } }, + "node_modules/fault": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fault/-/fault-2.0.1.tgz", + "integrity": "sha512-WtySTkS4OKev5JtpHXnib4Gxiurzh5NCGvWrFaZ34m6JehfTUhKZvn9njTfw48t6JumVQOmrKqpmGcdwxnhqBQ==", + "dependencies": { + "format": "^0.2.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/figures": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", @@ -943,6 +956,14 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/format": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/format/-/format-0.2.2.tgz", + "integrity": "sha512-wzsgA6WOq+09wrU1tsJ09udeR/YZRaeArL9e1wPbFg3GG2yDnC2ldKpxs4xunpFF9DgqCqOIra3bc1HWrJ37Ww==", + "engines": { + "node": ">=0.4.x" + } + }, "node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", @@ -1436,6 +1457,34 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/mdast-util-frontmatter": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/mdast-util-frontmatter/-/mdast-util-frontmatter-2.0.1.tgz", + "integrity": "sha512-LRqI9+wdgC25P0URIJY9vwocIzCcksduHQ9OF2joxQoyTNVduwLAFUzjoopuRJbJAReaKrNQKAZKL3uCMugWJA==", + "dependencies": { + "@types/mdast": "^4.0.0", + "devlop": "^1.0.0", + "escape-string-regexp": "^5.0.0", + "mdast-util-from-markdown": "^2.0.0", + "mdast-util-to-markdown": "^2.0.0", + "micromark-extension-frontmatter": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-frontmatter/node_modules/escape-string-regexp": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", + "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/mdast-util-gfm": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/mdast-util-gfm/-/mdast-util-gfm-3.1.0.tgz", @@ -1744,6 +1793,21 @@ "micromark-util-types": "^2.0.0" } }, + "node_modules/micromark-extension-frontmatter": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-extension-frontmatter/-/micromark-extension-frontmatter-2.0.0.tgz", + "integrity": "sha512-C4AkuM3dA58cgZha7zVnuVxBhDsbttIMiytjgsM2XbHAB2faRVaHRle40558FBN+DJcrLNCoqG5mlrpdU4cRtg==", + "dependencies": { + "fault": "^2.0.0", + "micromark-util-character": "^2.0.0", + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/micromark-extension-gfm": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/micromark-extension-gfm/-/micromark-extension-gfm-3.0.0.tgz", @@ -2735,6 +2799,21 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/remark-frontmatter": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/remark-frontmatter/-/remark-frontmatter-5.0.0.tgz", + "integrity": "sha512-XTFYvNASMe5iPN0719nPrdItC9aU0ssC4v14mH1BCi1u0n1gAocqcujWUrByftZTbLhRtiKRyjYTSIOcr69UVQ==", + "dependencies": { + "@types/mdast": "^4.0.0", + "mdast-util-frontmatter": "^2.0.0", + "micromark-extension-frontmatter": "^2.0.0", + "unified": "^11.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/remark-gfm": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/remark-gfm/-/remark-gfm-4.0.1.tgz", diff --git a/package.json b/package.json index 340bb81385..f1570cfd33 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "dependencies": { "remark-cli": "^12.0.1", "remark-gfm": "^4.0.1", + "remark-frontmatter": "^5.0.0", "remark-lint-no-trailing-spaces": "^3.0.2", "remark-preset-lint-markdown-style-guide": "^6.0.1", "remark-preset-lint-recommended": "^7.0.1",