Skip to content
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

[editorial] Hugo front matter title and other fixes #1820

Merged

Conversation

chalin
Copy link
Contributor

@chalin chalin commented Jan 25, 2025

  • Upholds Consistent page title form and capitalization #169
  • Prep for [editorial] Inline Hugo front matter #1821
  • Fixes the Hugo front matter for all doc pages
  • Consistently:
    • Uses Title Case for titles
    • Uses Sentence case for linkTitles (sidenav on OTel.io)
    • Ensures that the linkTitle corresponds to the title. There were a few instance where these did not match.
  • Removes **...** bolding from one of the titles.
  • Adds and/or fixes path_base_for_github_subdir to ensure that OTel.io users can navigate to the page source
  • Drops empty <!--- Hugo front matter ... ---> comments

/cc @trask @open-telemetry/docs-maintainers

@chalin chalin requested review from a team as code owners January 25, 2025 18:29
Copy link
Contributor

@noahfalk noahfalk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me. I'm happy to defer to maintainers on the styling.

Copy link
Member

@joaopgrassi joaopgrassi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for working on this! I left a few questions I wasn't sure about.

docs/azure/events.md Show resolved Hide resolved
docs/database/database-spans.md Show resolved Hide resolved
docs/gen-ai/gen-ai-spans.md Outdated Show resolved Hide resolved
docs/messaging/azure-messaging.md Show resolved Hide resolved
docs/non-normative/code-generation.md Show resolved Hide resolved
@joaopgrassi joaopgrassi added Skip Changelog Label to skip the changelog check editorial Editorial changes only (typos, changelog, ...). No content-related changes of any kind. labels Jan 27, 2025
@chalin chalin force-pushed the chalin-im-hugo-front-matter-2025-01-25 branch from ee52d01 to 4afa447 Compare January 27, 2025 14:17
Copy link
Member

@trask trask left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for this!

I left a few non-blocking suggestions if they make sense

docs/gen-ai/azure-ai-inference.md Outdated Show resolved Hide resolved
docs/gen-ai/gen-ai-metrics.md Outdated Show resolved Hide resolved
docs/gen-ai/openai.md Outdated Show resolved Hide resolved
docs/general/session.md Show resolved Hide resolved
docs/messaging/gcp-pubsub.md Outdated Show resolved Hide resolved
docs/messaging/messaging-metrics.md Outdated Show resolved Hide resolved
docs/resource/cloud-provider/README.md Outdated Show resolved Hide resolved
@chalin chalin force-pushed the chalin-im-hugo-front-matter-2025-01-25 branch 2 times, most recently from 88ce8ba to b2e7539 Compare January 27, 2025 16:51
@chalin chalin force-pushed the chalin-im-hugo-front-matter-2025-01-25 branch from b2e7539 to 118d137 Compare January 27, 2025 16:54
Copy link
Contributor

@lmolkova lmolkova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for doing this!

I hope we could do better in semconv and either automate or at least catch some of these during review.

A few things that could help:

  1. Is there a crash course on hugo (in the context of otel.io)? E.g.

    • we have <!--- Hugo front matter used to generate the website version of this page: ---> in some cases we have it in some other cases we don't - why?
    • Is there a good link we could add to contributing.md to help contributors with incantations like path_base_for_github_subdir ?
    • How to rename/move files keeping website links
  2. Could we come up with some guidance on how to do things in semconv?
    E.g.

    • linkTitle is a short thing that does not include semconv name, just the sub-area within it. It should usually be Spans, Metrics, Resources, etc. It's in 'Sentence case'
    • Headings should use 'Title Case' (TBH I'd default to `Sentence case' everywhere)

I'm happy to follow up on this, but would probably need help with Hugo part

@trask
Copy link
Member

trask commented Jan 27, 2025

@chalin do you think we need to fix our CI check to accommodate this change? if so, is it possible to split that out into a separate issue so we can go ahead and merge this PR?

diff --git a/docs/attributes-registry/README.md b/docs/attributes-registry/README.md
index 0fe77dd5..fbb3f279 100644
--- a/docs/attributes-registry/README.md
+++ b/docs/attributes-registry/README.md
@@ -1,10 +1,9 @@
 <!--- Hugo front matter used to generate the website version of this page:
 linkTitle: Registry
-weight: -2
-auto_gen: below
 path_base_for_github_subdir:
   from: tmp/semconv/docs/attributes-registry/_index.md
   to: attributes-registry/README.md
+weight: -2
 --->

@chalin
Copy link
Contributor Author

chalin commented Jan 27, 2025

@chalin do you think we need to fix our CI check to accommodate this change?

Yes, done.

@chalin
Copy link
Contributor Author

chalin commented Jan 27, 2025

  • Headings should use 'Title Case' (TBH I'd default to `Sentence case' everywhere)

@lmolkova - sentence case is my preference as well, and what Google recommends in it's style guide, see Headings:

Use sentence case for headings and titles.

I'd like to land this PR. I can switch to title case if you prefer in a followup PR. In this way both title and link-title will match in their use of letter case. Let me know what you think.

As for your other questions, I'll need to get back to you. Maybe we can track that via a separate issue. (Edit: short answer is that we can certainly document conventions and actually automate some checks.)

@lmolkova
Copy link
Contributor

@chalin sure, let's go ahead with this PR - I created #1834 to track follow ups

@chalin
Copy link
Contributor Author

chalin commented Jan 27, 2025

@trask @lmolkova - Ok, this PR is ready for a final review and approval. All raised concerns have been addressed.

@trask trask merged commit 0dd3f86 into open-telemetry:main Jan 27, 2025
14 checks passed
@chalin chalin deleted the chalin-im-hugo-front-matter-2025-01-25 branch January 27, 2025 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editorial Editorial changes only (typos, changelog, ...). No content-related changes of any kind. Skip Changelog Label to skip the changelog check
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants