docs-v2/layouts
Jason Stirnaman 8035366677
refactor: replace URL-parsing in shortcodes with cascade product data (#6883)
* chore: add .worktrees to gitignore

* refactor: replace URL-parsing in shortcodes with cascade product data

Replace duplicated URL-parsing logic across 28 shortcodes with Hugo's
cascade frontmatter. Each product section's _index.md now cascades
`product` (data key) and `version` (URL segment) to all descendants.

Key changes:
- Add cascade frontmatter to 15 product _index.md files
- Create layouts/partials/product/get-data.html shared partial
- Refactor 28 shortcodes to use the partial instead of parsing URLs
- Add version_label, limits, and distributed_architecture metadata
  to data/products.yml to eliminate hardcoded dicts in shortcodes
- Fix lefthook lint-markdown-instructions glob format (YAML array)
- Fix pre-existing Vale exclamation point errors in cloud and v2

* fix: prevent remark-lint from escaping Hugo template syntax in shortcodes

Lefthook's glob option only triggers whether a command runs — it does
not filter {staged_files}. This caused remark-lint to process .md
shortcode files in layouts/, escaping underscores, brackets, and
parentheses that are valid Hugo template syntax.

Add layouts/ exclusion to the existing content/ filter in the
lint-markdown-instructions run command. Also fix the 3 shortcode files
that were damaged by remark-lint in the previous commit.

* test: add E2E tests for cascade product shortcodes

Add Cypress tests validating all refactored shortcodes across 14
product/version combos (82 tests). Test expectations are derived
from products.yml at runtime via cy.task('getData').

Fix the product links test to iterate actual home page links
instead of all products.yml entries.

Create _test/shortcodes.md pages in each product section
exercising product-name, product-key, current-version,
influxdb/host, and InfluxDB3-specific shortcodes.

* test: expand E2E coverage to 27 of 28 cascade shortcodes

Add shortcode invocations to all 14 test pages and corresponding
Cypress assertions for version lookups, namespace URLs, product
name text, placeholder_host, version visibility, CTA links, and
site-level data.

Add shortcodes-real-pages.cy.js for 6 shortcodes that require real
page context (cli/mapped, children, flux/list-all-functions,
telegraf/plugins, html-diagram/sso-auth-flow, cli/influxd-flags).

Suppress Vale on test pages — they contain only shortcode syntax,
not prose.

163 tests total, all passing.

* refactor(test): rename _test dirs to __tests__ and add noindex

Rename test page directories from _test to __tests__ to align with
JS testing conventions. Add noindex: true to all 14 test page
frontmatter to prevent search engine indexing in production.
Update Cypress URL pattern to match new paths.
2026-02-27 09:46:57 -06:00
..
_default feat(feature-boards): embed product feature boards in the docs (#6767) 2026-01-30 12:41:02 -07:00
partials refactor: replace URL-parsing in shortcodes with cascade product data (#6883) 2026-02-27 09:46:57 -06:00
section Feature: Generate documentation in LLM-friendly Markdown (#6555) 2025-12-01 12:32:28 -06:00
shortcodes refactor: replace URL-parsing in shortcodes with cascade product data (#6883) 2026-02-27 09:46:57 -06:00
404.html Initial Kapa.ai chat integration. 2025-02-12 13:48:29 -06:00
index.html updated explorer messaging from beta to ga (#6152) 2025-06-26 11:36:55 -05:00
index.llmstxt.txt Feature: Generate documentation in LLM-friendly Markdown (#6555) 2025-12-01 12:32:28 -06:00
robots.txt chore(robots): Add a sitemap declaration for robots 2025-10-09 12:16:38 -05:00
sitemap.xml add JSON page lists for use in the v3 UI (#5363) 2024-03-14 09:32:04 -06:00