Skip to content

Lint required frontmatter fields #249

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ptgott
Copy link
Contributor

@ptgott ptgott commented Jun 25, 2025

Require a product field and type field. We will use this to ensure that every docs page specifies the Teleport product it belongs to (e.g., Identity Governance) and the kind of guide it is (e.g., how-to guide). We plan to use these fields to create custom views of pages in the docs that match a particular category or combination of categories.

@ptgott ptgott marked this pull request as draft June 25, 2025 14:28
@ptgott
Copy link
Contributor Author

ptgott commented Jun 25, 2025

Putting this in draft while I get all docs content to pass the linter in this PR:

Copy link

github-actions bot commented Jun 25, 2025

Amplify deployment status

Branch Commit Job ID Status Preview Updated (UTC)
paul.gottschling/2025-06-25-lint-frontmatter 7658ee1 11 ✅SUCCEED paul-gottschling-2025-06-25-lint-frontmatter 2025-07-09 19:58:56

@ptgott ptgott force-pushed the paul.gottschling/2025-06-25-lint-frontmatter branch from 8282179 to 418bb30 Compare June 25, 2025 14:36
ptgott added a commit to gravitational/teleport that referenced this pull request Jun 25, 2025
We are rolling out standard `product` and `type` frontmatter fields for
each docs page, letting us use this metadata to perform operations on
pages that fall under a certain type or product. For example, we could
generate product-specific landing pages using the `product` field.

This change acts in tandem with gravitational/docs-website#249, which
lints the frontmatter of each docs page to enforce the `product` and
`type` fields.

Note that some guides have "Reference" in the title but are really more
like conceptual guides, providing information about how aspects of
Teleport work instead of a comprehensive reference of possible inputs.

Note that this change marks category index pages as having type `other`.
It might make sense to add a type for `index`, but this is something we
can modify when we need to perform operations on category index pages.
@ptgott ptgott requested a review from roraback July 2, 2025 14:48
ptgott added a commit to gravitational/teleport that referenced this pull request Jul 9, 2025
We are rolling out standard `product` and `type` frontmatter fields for
each docs page, letting us use this metadata to perform operations on
pages that fall under a certain type or product. For example, we could
generate product-specific landing pages using the `product` field.

This change acts in tandem with gravitational/docs-website#249, which
lints the frontmatter of each docs page to enforce the `product` and
`type` fields.

Note that some guides have "Reference" in the title but are really more
like conceptual guides, providing information about how aspects of
Teleport work instead of a comprehensive reference of possible inputs.

Note that this change marks category index pages as having type `other`.
It might make sense to add a type for `index`, but this is something we
can modify when we need to perform operations on category index pages.
Require a `product` field and `type` field. We will use this to ensure
that every docs page specifies the Teleport product it belongs to (e.g.,
Identity Governance) and the kind of guide it is (e.g., how-to guide).
We plan to use these fields to create custom views of pages in the docs
that match a particular category or combination of categories.
ptgott added a commit to gravitational/teleport that referenced this pull request Jul 9, 2025
We are rolling out standard `product` and `type` frontmatter fields for
each docs page, letting us use this metadata to perform operations on
pages that fall under a certain type or product. For example, we could
generate product-specific landing pages using the `product` field.

This change acts in tandem with gravitational/docs-website#249, which
lints the frontmatter of each docs page to enforce the `product` and
`type` fields.

Note that some guides have "Reference" in the title but are really more
like conceptual guides, providing information about how aspects of
Teleport work instead of a comprehensive reference of possible inputs.

Note that this change marks category index pages as having type `other`.
It might make sense to add a type for `index`, but this is something we
can modify when we need to perform operations on category index pages.
@ptgott ptgott force-pushed the paul.gottschling/2025-06-25-lint-frontmatter branch from 26e11fb to 104853d Compare July 9, 2025 18:58
@ptgott ptgott temporarily deployed to docs-amplify July 9, 2025 18:58 — with GitHub Actions Inactive
- Expect there to be a `labels` frontmatter key with a list of values.
  One value must be a product name and one value must be a guide type.
  Arbitrary additional values are allowed..
- Don't allow arbitrary label values: label values must be within an
  approved list.
- Allow guides to omit a product or type label, e.g., if no label is
  applicable.
- Allow multiple label values for product and guide type.
@ptgott ptgott force-pushed the paul.gottschling/2025-06-25-lint-frontmatter branch from 104853d to 7658ee1 Compare July 9, 2025 19:39
@ptgott ptgott temporarily deployed to docs-amplify July 9, 2025 19:39 — with GitHub Actions Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant