mirror of
https://github.com/netbirdio/docs.git
synced 2026-04-16 07:26:35 +00:00
add tag
This commit is contained in:
@@ -48,6 +48,7 @@ function collectHeadings(sections, slugify = slugifyWithCounter()) {
|
||||
if (section.tagName === 'h2' || section.tagName === 'h3') {
|
||||
let title = section.title
|
||||
let id = section.id
|
||||
let tag = section.tag
|
||||
if (section.tagName === 'h3') {
|
||||
if (!output[output.length - 1]) {
|
||||
throw new Error(
|
||||
@@ -57,9 +58,10 @@ function collectHeadings(sections, slugify = slugifyWithCounter()) {
|
||||
output[output.length - 1].children.push({
|
||||
id,
|
||||
title,
|
||||
tag,
|
||||
})
|
||||
} else {
|
||||
output.push({ id, title, children: [] })
|
||||
output.push({ id, title, tag, children: [] })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user