Skip to content

Commit 47c9b7a

Browse files
committed
minor: add relevant ids to Heading
Signed-off-by: Devansu <[email protected]>
1 parent 0502adc commit 47c9b7a

File tree

2 files changed

+6
-2
lines changed
  • packages/docusaurus-theme-classic/src/theme

2 files changed

+6
-2
lines changed

packages/docusaurus-theme-classic/src/theme/BlogArchivePage/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ type YearProp = {
2121
function Year({year, posts}: YearProp) {
2222
return (
2323
<>
24-
<Heading as="h3">{year}</Heading>
24+
<Heading as="h3" id={year}>
25+
{year}
26+
</Heading>
2527
<ul>
2628
{posts.map((post) => (
2729
<li key={post.metadata.date}>

packages/docusaurus-theme-classic/src/theme/TagsListByLetter/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ import styles from './styles.module.css';
1515
function TagLetterEntryItem({letterEntry}: {letterEntry: TagLetterEntry}) {
1616
return (
1717
<article>
18-
<Heading as="h2">{letterEntry.letter}</Heading>
18+
<Heading as="h2" id={letterEntry.letter}>
19+
{letterEntry.letter}
20+
</Heading>
1921
<ul className="padding--none">
2022
{letterEntry.tags.map((tag) => (
2123
<li key={tag.permalink} className={styles.tag}>

0 commit comments

Comments
 (0)