Skip to content

Add initial support for page level annotations for product support - #103

Merged
Mpdreamz merged 6 commits into
mainfrom
feature/page-level-constraints
Dec 13, 2024
Merged

Mpdreamz merged 6 commits into
mainfrom
feature/page-level-constraints

Conversation

@Mpdreamz

@Mpdreamz Mpdreamz commented Dec 12, 2024 •

Copy link
Copy Markdown
Member

This adds product lifecycle annotations to the front matter yaml parser as requested in #95

Quick overview:

title: Elastic Docs v3
applies:
  stack: ga 8.1
  serverless: tech-preview
  hosted: beta 8.1.1
  eck: beta 3.0.2
  ece: unavailable

Its syntax is

 <product>: <lifecycle> [version]

Where version is optional.

all and empty string mean generally available for all active versions

applies:
  stack: 
  serverless: all

all and empty string can also be specified at a version level

applies:
  stack: beta all
  serverless: beta

Are equivalent, note all just means we won't be rendering the version portion in the html.

image

@colleenmcginnis

colleenmcginnis commented Dec 12, 2024 •

Copy link
Copy Markdown
Contributor

@lcawl do you think ess should be hosted instead?

@Mpdreamz

Copy link
Copy Markdown
Member Author

It should @colleenmcginnis I completely read over the fka in the new chart!

@bmorelli25

Copy link
Copy Markdown
Member

I talked with @colleenmcginnis about this today. A couple thoughts:

  1. The shorthand of option one is convenient but we worry that it might be confusing to new or irregular contributors. Option two is more verbose, but perhaps that is actually a good thing as theres a higher likelyhood that folks can see the frontmatter and understand the 1:1 correlation between frontmatter and the badges that appear at the top of a page.

  2. The other topic we discussed relates to this excerpt from issue Add support for page-level metadata #95

At this moment, we are proposing that the page-level metadata uses the same deployment type, lifecycle, and version dimensions as described in #94. The assumption being that what is specified at the page-level is applicable to the entire page unless it's overridden by admonitions at the section, page, or line level.

You mentioned that this is a first step towards page level annotations so I imagine further functionality will come in later PRs. Just wanted to make sure you saw this.

@Mpdreamz

Copy link
Copy Markdown
Member Author

Thanks @bmorelli25

I updated the syntax to:

title: Elastic Docs v3
applies:
  stack: ga 8.1
  serverless: tech-preview
  hosted: beta 8.1.1
  eck: beta 3.0.2
  ece: unavailable

Based on your conversation with @colleenmcginnis. More details are in the PR description.

@Mpdreamz

Copy link
Copy Markdown
Member Author

This now also includes an initial html output for these front matter annotations:

image

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.

3 participants