-
Notifications
You must be signed in to change notification settings - Fork 30
Closed
Labels
Description
Describe the bug
In the PR docs preview, for a page that includes a snippet, the right-side "On this page" anchors appear to display in the wrong order.
I think this is low priority since there's a workaround: Instead of using one snippet that contains a few anchors, I used one small snippet file for each section in the parent page (see https://github.com/elastic/docs-content/pull/2569/files).
I had to merge my PR, but the parent file had this structure:
# Troubleshoot snapshot and index lifecycle management
## Check status, stop, and restart {{slm-init}}
### Get SLM status
### Stop SLM
### Start SLM
## Check status, stop, and restart ILM
:::{include} /manage-data/_snippets/ilm-status.md
:::
The included file had this structure:
### Get ILM status
### Stop ILM
### Start ILM
In the PR docs preview, the right-side navigation displays out of order (the highlighted entries should be at the bottom):

Expected behavior
In my local docs build preview, the right-side navigation displays as expected:

Steps to reproduce
To reproduce,
- Create a docs md file with a few anchors
- Create a snippet with a few anchors.
- Include the snippet in the middle of the parent .md file using
:::{include} /snippet-file.md
- Open a PR and check how the right-side navigation appears in the docs preview.
Tooling
- docs-builder
- migration tooling
- I'm not sure
- [ ]
Copilot