Skip to content

[work in progress] Add products frontmatter, update applies_to as needed #1336

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 9 commits into
base: main
Choose a base branch
from

Conversation

colleenmcginnis
Copy link
Contributor

Related to elastic/docs-builder#1200

Adds new products frontmatter, which will be used to generate metadata during the build process that the web team will use in the search experience (so users can filter by product). It also checks applies_to and adds additional items based on the products that are covered on the page.

Here's the process:

  • Map AsciiDoc/v3 products: @KOTungseth created a list of all AsciiDoc books mapped to:
    • Product names (including the format of the name)
    • applies_to badges associated with the products covered in that book
  • Add frontmatter: Then I wrote a script that uses Kaarina's list to look at each Markdown file and:
    • Assign products associated with the AsciiDoc book(s) included in mapped_pages.
    • Check the existing list of applies_to badges for that page and compare it to the list of all applies_to badges mapped to the AsciiDoc book(s) included in that page's mapped_pages.
      • If there are missing applies_to badges, it adds them.
      • If there are additional existing applies_to badges that aren't associated with the mapped_pages, it preserves them (no existing badges should be deleted).
  • Format frontmatter: I standardized the order and format of the frontmatter items.
  • Validate frontmatter: I created frontmatter.config.yml and checked against it to make sure all frontmatter keys and product values are valid. (Note: I haven't checked that all the values of deployment and serverless options are valid/correctly formatted.)

cc @KOTungseth @reakaleek

@Mpdreamz
Copy link
Member

Mpdreamz commented May 2, 2025

Drive by notes:

  • Can we ensure docs-builder validates this?
  • Use kebab-case for all products names e.g ECS Logging .NET => ecs-logging-dotnet

@colleenmcginnis
Copy link
Contributor Author

colleenmcginnis commented May 2, 2025

Can we ensure docs-builder validates this?

Yes! elastic/docs-builder#1200 (comment)

Use kebab-case for all products names e.g ECS Logging .NET => ecs-logging-dotnet

Sure. Would we transform the kebab case version to the formatted text version in docs-builder when adding the meta tag to the HTML? Or should we ask the web team to transform it in the search experience?

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.

2 participants