-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Add anchor for automation section in documentation #5327
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
base: current
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for esphome ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
WalkthroughInserted an anchor shortcode {{< anchor "automation" >}} immediately after the YAML front matter in content/automations/_index.md, adding an "automation" page anchor. Added a blank line following the anchor. No other content modifications. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Suggested labels
Suggested reviewers
✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
content/automations/_index.md
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**
⚙️ CodeRabbit configuration file
- Do not generate or add any sequence diagrams
Files:
content/automations/_index.md
🔇 Additional comments (1)
content/automations/_index.md (1)
10-11
: LGTM: anchor restores a stable target for “Automation” references.Placing
{{< anchor "automation" >}}
right after the front matter is appropriate and should fix links that intend to point to the top of this page.
{{< anchor "automation" >}} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Verify shortcode syntax and inbound references resolve to #automation
.
Please confirm:
- The repo already uses the same
anchor
shortcode (with quotes) elsewhere. - All “on_xxx (Automation)” references expect
.../automations/#automation
(exact fragment).
You can run:
🏁 Script executed:
#!/bin/bash
# 1) Survey existing anchor shortcode usage
rg -nC2 $'{{<\\s*anchor\\b' content
# 2) Find inbound references that might need to match the new fragment
rg -nP -C2 '\(Automation\)|#automation\b|/automations/?#' content
# 3) Optional: check for accidental links to Modbus from "(Automation)" mentions
rg -nP -C2 '\(Automation\).*modbus' content
Length of output: 116075
🏁 Script executed:
#!/bin/bash
# 1) List all anchor shortcode usages across the content directory
echo "=== All anchor shortcode usages ==="
rg -nC2 '\{\{<\s*anchor' content
# 2) Detect any anchor shortcode usages without quoted name (possible missing quotes)
echo "=== Anchor usages without quotes ==="
rg -nP '\{\{<\s*anchor\s+[^"]' -n content
Length of output: 270099
Replace page-local “Automation” links with explicit /automations/#automation (or a docref/ref shortcode).
Anchor exists at content/automations/_index.md:10 ({{< anchor "automation" >}}). Many pages (e.g. files under content/components/*) use Automation which is a page-local fragment and will not resolve to the automations page — update those links to /automations/#automation or use the repo's docref/ref shortcode.
🤖 Prompt for AI Agents
In content/automations/_index.md around lines 10-11, the anchor {{< anchor
"automation" >}} is correct but many pages link to it using page-local fragment
links like [Automation](#automation) which won't resolve across pages; update
those references (e.g., files under content/components/* and any other content
using #automation) to use an absolute path or the repo shortcode — either
/automations/#automation or the docref/ref shortcode — so cross-page links
correctly target this anchor.
I did it this way so no need to modify all the pages |
Description:
This fixes links in properties where it says on_xxx (Automation): blah blah, the Automation link is going to a modbus page which is not the intended place, this fixes it so it works again like the sphinx version
Related issue (if applicable): fixes
Pull request in esphome with YAML changes (if applicable):
Checklist:
I am merging into
next
because this is new documentation that has a matching pull-request in esphome as linked above.or
I am merging into
current
because this is a fix, change and/or adjustment in the current documentation and is not for a new component or feature.Link added in
/components/index.rst
when creating new documents for new components or cookbook.New Component Images
If you are adding a new component to ESPHome, you can automatically generate a standardized black and white component name image for the documentation.
To generate a component image:
Comment on this pull request with the following command, replacing
COMPONENT_NAME
with your component name in UPPER_CASE format with underscores (e.g.,BME280
,SHT3X
,DALLAS_TEMP
):The ESPHome bot will respond with a downloadable ZIP file containing the SVG image.
Extract the SVG file and place it in the
images/
folder of this repository.Use the image in your component's index table entry in
/components/index.rst
.Example: For a component called "DHT22 Temperature Sensor", use: