-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Renamed getHeaders()
to getHeadings()
#1107
Conversation
❌ Deploy Preview for astro-docs-2 failed.
|
Whoops, looks like there are some merge conflicts still. I'll take a stab at resolving these soon. |
#### `getHeaders()` | ||
|
||
An async function that returns the headers of the Markdown file. The response follows this type: `{ depth: number; slug: string; text: string }[]`. | ||
:::caution[Deprecated] | ||
The `getHeaders()` function has been renamed to `getHeadings()`. Please update your code to use `getHeadings()`. |
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.
The `getHeaders()` function has been renamed to `getHeadings()`. Please update your code to use `getHeadings()`. | |
The `getHeaders()` function has been renamed. To update an older project, please use `getHeadings()` instead. |
Just a suggestion to be more explicit about which one to use. Similarly, a note about this should end up in the migration guide. (You could probably use this as-is there.)
Adding a note that |
@natemoo-re I was easily able to resolve the conflict here, so I did, FYI. Looks like now it's |
A lot of these changes to site code have already been handled, so I’m going to close this and raise a new PR with just the docs content changes. |
What kind of changes does this PR include?
Description
This PR deprecates
tag. MDN also uses headings to refer the tags.getHeaders()
documentation in favor ofgetHeadings()
. According to the HTML spec, these are headings. The only part of the spec where the word "headers" appear is in the context ofDepends on withastro/astro#4031