Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

structure.readme configuration is ignored when README.md exists #287

Open
naokiri opened this issue Aug 26, 2022 · 0 comments
Open

structure.readme configuration is ignored when README.md exists #287

naokiri opened this issue Aug 26, 2022 · 0 comments
Labels
Type: Bug Bug or Bug fixes

Comments

@naokiri
Copy link

naokiri commented Aug 26, 2022

Summary

Even when you specify structure.readme to other filename, README.md is used to generate the introduction.

  • HonKit version: 3.7.5

Step to reproduce

  1. Setup a new honkit project.
  2. Add README.md and README.other.md to the root of the project.
  3. In book.json, add an entry like this
{ 
    "structure": {
        "readme": "README.other.md"
    }
}
  1. Run npm run build

Expected results

The content of README.other.md is used for index page

Actual results

The content of README.md is used for index page

The debug log shows that both files are used for index page, and README.md seems to be overwriting the index page.

This is very unlikely expected when you set the "structure.readme" configuration.

info: 5 plugins are installed 
info: 5 explicitly listed 
info: plugin "highlight" is loaded
info: plugin "search" is loaded
info: plugin "lunr" is loaded
info: plugin "fontsettings" is loaded
info: plugin "theme-default" is loaded
info: found 2 pages 
info: found 2 asset files 
debug: calling hook "config" 
debug: calling hook "init" 
debug: copy assets from theme /home/OMIT/node_modules/@honkit/honkit-plugin-theme-default/_assets/website 
debug: copy resources from plugin /home/OMIT/node_modules/gitbook-plugin-fontsettings/assets 
debug: copy resources from plugin /home/OMIT/node_modules/gitbook-plugin-lunr/assets 
debug: copy resources from plugin /home/OMIT/node_modules/gitbook-plugin-search/assets 
debug: copy resources from plugin /home/OMIT/node_modules/@honkit/honkit-plugin-highlight/css 
debug: copy asset ".gitignore" 
debug: calling hook "page:before" 
debug: calling hook "page:before" 
debug: calling hook "page" 
debug: calling hook "page" 
debug: index page README.other.md 
debug: index page README.md 
debug: calling hook "finish:before" 
debug: calling hook "finish" 
debug: write search index 

Workaround

Add README.md in .bookignore file.

@azu azu added the Type: Bug Bug or Bug fixes label Aug 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Bug or Bug fixes
Projects
None yet
Development

No branches or pull requests

2 participants