@@ -89,7 +89,7 @@ fetch("specs/opencon.yaml")
8989 // navLi.classList.add("heading");
9090 const navLink = document . createElement ( "a" ) ;
9191 navLink . classList . add ( "nav-a" ) ;
92- navLink . href = `#article${ index + 1 } ` ;
92+ navArticleId = navLink . href = `#article${ index + 1 } ` ;
9393 navLink . textContent = article . title ;
9494 navLi . appendChild ( navLink ) ;
9595 navUl . appendChild ( navLi ) ;
@@ -113,7 +113,7 @@ fetch("specs/opencon.yaml")
113113 navSectionSubLi . classList . add ( "nav-list" ) ;
114114 const navSectionSubLink = document . createElement ( "a" ) ;
115115 navSectionSubLink . classList . add ( "nav-a" ) ;
116- navSectionSubLink . href = `#article ${ article . id } - section${ index + 1 } ` ;
116+ navSectionSubLink . href = `${ navArticleId } / section${ index + 1 } ` ;
117117 navSectionSubLink . textContent = `${ index + 1 } . ${ section . title } ` ;
118118 navSectionSubLi . appendChild ( navSectionSubLink ) ;
119119 navSectionUl . appendChild ( navSectionSubLi ) ;
@@ -160,7 +160,7 @@ fetch("specs/opencon.yaml")
160160 articleContainer . classList . add ( "article-container" ) ;
161161 containerMainContentArticle . appendChild ( articleContainer ) ;
162162 const articleContainerH2 = document . createElement ( "h2" ) ;
163- articleContainerH2 . id = `article${ index + 1 } ` ;
163+ const articleId = ( articleContainerH2 . id = `article${ index + 1 } ` ) ;
164164 articleContainerH2 . classList . add ( "heading-secondary" ) ;
165165 articleContainerH2 . textContent = `${ index + 1 } . ${ article . title } ` ;
166166 articleContainer . appendChild ( articleContainerH2 ) ;
@@ -175,7 +175,7 @@ fetch("specs/opencon.yaml")
175175 articleContainer . appendChild ( sectionContainer ) ;
176176 sections . forEach ( ( section , index ) => {
177177 const sectionContainerH3 = document . createElement ( "h3" ) ;
178- sectionContainerH3 . id = `article ${ article . id } - section${ index + 1 } ` ;
178+ sectionContainerH3 . id = `${ articleId } / section${ index + 1 } ` ;
179179 sectionContainerH3 . classList . add ( "heading-secondary" ) ;
180180 sectionContainerH3 . textContent = `${ index + 1 } . ${ section . title } ` ;
181181 sectionContainer . appendChild ( sectionContainerH3 ) ;
0 commit comments