@dogsbay/docs-layout 0.2.0-beta.33 → 0.2.0-beta.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dogsbay/docs-layout",
3
- "version": "0.2.0-beta.33",
3
+ "version": "0.2.0-beta.35",
4
4
  "description": "Standard documentation layout components for Dogsbay",
5
5
  "type": "module",
6
6
  "exports": {
@@ -29,8 +29,8 @@
29
29
  "./json-ld": "./src/json-ld.ts"
30
30
  },
31
31
  "dependencies": {
32
- "@dogsbay/ui": "0.2.0-beta.33",
33
- "@dogsbay/primitives": "0.2.0-beta.33"
32
+ "@dogsbay/ui": "0.2.0-beta.35",
33
+ "@dogsbay/primitives": "0.2.0-beta.35"
34
34
  },
35
35
  "devDependencies": {
36
36
  "vitest": "^3.0.0"
@@ -792,9 +792,30 @@ const siteIcon = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"
792
792
  the actual page content. Filter elements live in here
793
793
  now to stay inside that scope.
794
794
  */}
795
- {Array.isArray(tags) && tags.map((tag) => (
796
- <div hidden data-pagefind-filter={`tag:${tag}`}></div>
797
- ))}
795
+ {/*
796
+ Slash-nested tags whose prefix is declared in
797
+ `taxonomies.tags.prefixes` emit as per-prefix filter
798
+ divs so each prefix becomes its own Pagefind facet
799
+ column (Difficulty, Topic, Persona, …) instead of
800
+ pooling under a single "Tag" column.
801
+
802
+ Plain tags and tags whose prefix isn't declared fall
803
+ back to the pooled `tag:` filter — backward-compatible
804
+ for sites that haven't declared prefixes.
805
+
806
+ See plans/per-prefix-search-facets.md.
807
+ */}
808
+ {Array.isArray(tags) && tags.map((tag) => {
809
+ const slash = tag.indexOf("/");
810
+ if (slash > 0) {
811
+ const prefix = tag.slice(0, slash);
812
+ const leaf = tag.slice(slash + 1);
813
+ if (tagPrefixes && tagPrefixes[prefix]) {
814
+ return <div hidden data-pagefind-filter={`${prefix}:${leaf}`}></div>;
815
+ }
816
+ }
817
+ return <div hidden data-pagefind-filter={`tag:${tag}`}></div>;
818
+ })}
798
819
  {Array.isArray(audience) && audience.map((value) => (
799
820
  <div hidden data-pagefind-filter={`audience:${value}`}></div>
800
821
  ))}