@@ -123,16 +123,16 @@ func newDeletePreNext() *cobra.Command {
123123}
124124
125125func addPreNext () {
126- // Chpater one add pre-next
127- addPreNextLabel ( chapterOneFileOrder , [] string {}, [] int {}, "" , "ChapterOne" , "ChapterTwo" )
128- // Chpater two add pre-next
129- addPreNextLabel ( chapterTwoFileOrder , chapterOneFileOrder , [] int {}, "ChapterOne" , "ChapterTwo" , "ChapterThree" )
130- // Chpater three add pre-next
131- addPreNextLabel (chapterThreeFileOrder , chapterTwoFileOrder , []int {}, "ChapterTwo " , "ChapterThree " , "ChapterFour " )
132- // Chpater four add pre-next
133- //fmt.Printf("%v\n ", getChapterFourFileOrder() )
134- chapterFourFileOrder , solutionIds := getChapterFourFileOrder ()
135- addPreNextLabel (chapterFourFileOrder , chapterThreeFileOrder , solutionIds , "ChapterThree" , "ChapterFour" , "" )
126+ // 上/下页导航已改由 Hugo 主题在渲染时动态生成
127+ // (themes/book/layouts/partials/docs/inject/content-after.html),
128+ // 不再把导航 HTML 写进 markdown,避免与主题渲染的导航重复。
129+ // 如需恢复写入 markdown 的旧行为,取消下面的注释即可。
130+ //
131+ // addPreNextLabel(chapterOneFileOrder, []string{} , []int{}, "", "ChapterOne ", "ChapterTwo ")
132+ // addPreNextLabel(chapterTwoFileOrder, chapterOneFileOrder, []int{}, "ChapterOne", "ChapterTwo", "ChapterThree")
133+ // addPreNextLabel(chapterThreeFileOrder, chapterTwoFileOrder, []int{}, "ChapterTwo ", "ChapterThree", "ChapterFour" )
134+ // chapterFourFileOrder, solutionIds := getChapterFourFileOrder()
135+ // addPreNextLabel(chapterFourFileOrder, chapterThreeFileOrder, solutionIds, "ChapterThree", "ChapterFour", "")
136136}
137137
138138func addPreNextLabel (order , preOrder []string , chapterFourIds []int , preChapter , chapter , nextChapter string ) {
0 commit comments