Commit 3caa69c
committed
fix(seo): prefix sitemap ignorePatterns with /docs/, validate HowTo steps
baseUrl is /docs/, so Docusaurus emits sitemap routes as /docs/tags/...
and /docs/1.0.0/.../docs/2.0.0/... . The previous bare patterns
(/tags/**, /1.0.0/**, /2.0.0/**) couldn't match those, so tag indexes
and the legacy doc versions were quietly slipping into the generated
sitemap despite the noIndex headers elsewhere. Add the prefixed
patterns; keep the bare ones as defence-in-depth in case baseUrl is
ever flattened.
HowTo.js was emitting steps with empty `text` and auto-generated "Step N"
names whenever authors omitted those fields, producing low-quality
HowTo structured data the rich-results test flags. Filter to entries
that carry both `name` and `text`; drop the schema entirely if none
qualify, and render the visible <ol> from the same filtered list so the
markup and JSON-LD stay in sync.
Signed-off-by: Neha Gupta <gneha21@yahoo.in>1 parent b4a077f commit 3caa69c
2 files changed
Lines changed: 29 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
472 | 472 | | |
473 | 473 | | |
474 | 474 | | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
475 | 482 | | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
476 | 486 | | |
477 | 487 | | |
478 | 488 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
45 | 58 | | |
46 | 59 | | |
47 | 60 | | |
48 | 61 | | |
49 | | - | |
| 62 | + | |
50 | 63 | | |
51 | 64 | | |
52 | 65 | | |
53 | | - | |
54 | | - | |
| 66 | + | |
| 67 | + | |
55 | 68 | | |
56 | 69 | | |
57 | 70 | | |
| |||
105 | 118 | | |
106 | 119 | | |
107 | 120 | | |
108 | | - | |
| 121 | + | |
109 | 122 | | |
110 | | - | |
111 | | - | |
| 123 | + | |
| 124 | + | |
112 | 125 | | |
113 | 126 | | |
114 | 127 | | |
| |||
0 commit comments