Skip to content

Use component and platform for link id in configuration blocks #40123

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

Merged
merged 1 commit into from
Jul 24, 2025

Conversation

wendevlin
Copy link
Contributor

Proposed change

  • A configuration block always had the heading id configuration-variables. With this change it prefixes component and platform if available to generate more unique ids.

Type of change

  • Spelling, grammar or other readability improvements (current branch).
  • Adjusted missing or incorrect information in the current documentation (current branch).
  • Added documentation for a new integration I'm adding to Home Assistant (next branch).
  • Added documentation for a new feature I'm adding to Home Assistant (next branch).
  • Removed stale or deprecated documentation.

Additional information

  • Link to parent pull request in the codebase:
  • Link to parent pull request in the Brands repository:
  • This PR fixes or closes issue: fixes #

Checklist

  • This PR uses the correct branch, based on one of the following:
    • I made a change to the existing documentation and used the current branch.
    • I made a change that is related to an upcoming version of Home Assistant and used the next branch.
  • The documentation follows the Home Assistant documentation standards.

@Copilot Copilot AI review requested due to automatic review settings July 24, 2025 10:01
@wendevlin wendevlin requested a review from a team as a code owner July 24, 2025 10:01
@home-assistant home-assistant bot added the current This PR goes into the current branch label Jul 24, 2025
Copy link

netlify bot commented Jul 24, 2025

Deploy Preview for home-assistant-docs ready!

Name Link
🔨 Latest commit 71eb01b
🔍 Latest deploy log https://app.netlify.com/projects/home-assistant-docs/deploys/68820479dde52a000873710f
😎 Deploy Preview https://deploy-preview-40123--home-assistant-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances the uniqueness of configuration block anchor links by prefixing them with component and platform identifiers. Instead of all configuration blocks having the generic ID configuration-variables, they now include component and platform names when available, creating more specific and unique anchor links throughout the documentation.

  • Updates all configuration block calls in the template integration documentation to include specific identifiers
  • Modifies the configuration plugin to generate unique link IDs by combining component, platform, and 'configuration-variables'
  • Ensures better navigation and linking within documentation pages that contain multiple configuration sections

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
source/_integrations/template.markdown Updates configuration block tags to include specific component/platform identifiers for unique anchor generation
plugins/configuration.rb Modifies link ID generation logic to create unique anchors using component and platform prefixes
Comments suppressed due to low confidence (1)

Copy link
Contributor

@c0ffeeca7 c0ffeeca7 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, @wendevlin 👍

@c0ffeeca7 c0ffeeca7 marked this pull request as draft July 24, 2025 10:30
@c0ffeeca7 c0ffeeca7 marked this pull request as ready for review July 24, 2025 10:36
@c0ffeeca7 c0ffeeca7 merged commit 63597f5 into current Jul 24, 2025
9 checks passed
@c0ffeeca7 c0ffeeca7 deleted the custom-configuration-link-id branch July 24, 2025 10:36
@github-actions github-actions bot locked and limited conversation to collaborators Jul 25, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
current This PR goes into the current branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants