-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Don't set main README.md file as 'introduction' on the index #476
Comments
I agree that there should be a way to use another file than README as introduction to the book. |
Problem is mostly with the fact that's being used as the first page, where it should be the cover (that's not being used when generating a PDF or a HTML site, by the way). I think that the first entry point on the PDF index (the first "chapter") should point to the first page (the cover or the readme, both are ok) but instead of being called "introduction" it should be called with the book title. I think this was working some weeks before, and in fact it was being showed as "chapter 0"... |
In my forked repo,I add another choice to specify it in the config file like this
If there is a introduction attribute in config.json,use it as first page,the SUMMARY.md only specify the chapter files. |
@codepiano does it allow to only define the introduction title, or it's necesary to define the path too? |
Ok, I've searched a bit and found the source of the problem. As you can see, when parsing the summary, it looks for the first entry and if it's not a link to the book main README.md file, it add one with a hardcoded 'Introduction' name, that's not only a very few flexible mechanism (it force to use the README.md as the first page, while you wouldn't want to use it at all) but also a problem for non-english books. I think that by the moment the only workaround is to define explicitly a link on top of SUMMARY.md pointing to README.md but using a custom title, but this should be fixed. @codeplano seems a good solution, would you be able to do a pull-request? |
Oh, and of course, the hardcoded default 'Introduction' string should be localized to the book language... :-D |
@piranna
it is necessary to define the path,but the official gitbook don't support this,I fork to my own repo and change the behavior |
Yes @codepiano, that was the workaround that I said :-P |
@piranna I will try to send a pr,but I'm not quite sure it will be merged. |
I don't understand why the README.md file is required and why it is automatically included as the first item in the Table of Contents with the string "Introduction". I think it would be better that the README.md file is not included by default. It is very easy for authors to include it in the SUMMARY.md file if they want the README.md file included in some way. Much more flexible too. |
+1 to @petermichaux |
+1 to this feature, maybe an option inside |
See also #392. |
I've found this problem also affect the Glossary, being it shown in english while the other entries of my table of contents are in spanish... |
Just add |
Oh, great, thank you! :-) |
README.md is added automatically, that not something so bad, but it's also added on the index as an introduction, that maybe it's not what you want, for example when using it to show info about how to generate the book. In my case (a degree thesis) I have a separate introduction chapter, so having it twice on the index looks ugly.
The text was updated successfully, but these errors were encountered: