resolves #925 partial fix for ePub Validation and Google Books failure. #932
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In general, there are 3 parts:
xhtml filename for chapters are messed up.
This is because asciidoctor assume a chapter title is level-0 heading while it is actually level-1 in ProGit for now. Instead of changing ProGit chapter title to level-1, I instructed a change of leveloffset in the spine "progit.asc". Besides, chapter 4, 9 and the three appendix chapters don't have a explicit ID declaration. I added based on the title (it seems asciidoctor won't do automatic ID generation for level-1 chapter title). To be clear, the current status actually doesn't follow asciidoctor-epubs rule 1 (main chapter files being under the root directory) and rule 2 (chapter title being level-0 and ID matching filename).
Cross reference breaks
asciidoctor requires cross references follow the format <<chapter-id#chapter-id or section id>> while ProGit has <> for now. This leads to "invalid reference to unknown local anchor (or valid bibref)" errors from asciidoctor-epubs and "Fragment identifier is not defined" from epub validator. All xrefs should have been fixed.
ID collisions
Asciidoctor automatically creates an anchor for every section and discrete heading. These anchors may be the same as the one explicitly declared. There are three cases: "_git_p4" in client-p4.asc, "_task_lists" in 2-contributing.asc and "_audit_log" in 4-managing-organization.
asciidoctor-epubs fix its own bug recently. To make things work, I used "1.5.0.alpha.8.dev" instead of any releases. As I tested myself, the epub generated from "1.5.0.alpha.8.dev" should be able to pass EPUB Validator and should be able to be loaded onto Google Books.