honkit / honkit

:book: HonKit is building beautiful books using Markdown - Fork of GitBook

Home Page:https://honkit.netlify.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error show and invalid navigation if a summary item has no reference

lindeer opened this issue · comments

Summary

Sometimes, a summary item without a reference is only a container of sub items, this case result in error showing and invalid navigation.

  • HonKit version: 4.0.4

Step to reproduce

  1. create a SUMMARY.md like below, make sure references are valid.
  2. run honkit serve
  • Link to code example:
# Summary

* [Introduction](README.md)

## Volume I

* Chapter One

  * [section1](chapter1/section1.md)

  * [section2](chapter1/section2.md)

* Chapter Two

  * [section1](chapter2/section1.md)

  * [section2](chapter2/section2.md)

## Volume II

Expected results

Show 'Chapter One' and 'Chapter Two'

Actual results

'Chapter One' show 'section1', 'Chapter Two' show 'section2', and navigation is invalid when go to 'Chapter One' page.

error