-
Notifications
You must be signed in to change notification settings - Fork 2k
Rename "Getting Git on a Server" link to reflect the section name #880
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
Conversation
The original asciidoc link name displayed to the reader was "Git on the Server", which is in fact the very name of the chapter, which is somewhat confusing, so change the link name to reflect the actual section name.
Unfortunately, this won't do what you want it to. The anchor name could be "fkjldsafudiosa" and you'd still get "Git on the Server" as the link text. In the print version and when Atlas was doing the building it would put "Section X.Y: The Subtitle" in the link, but Asciidoctor doesn't do that, it seems to just pull the chapter name, so there's no fixing it. |
Uh, no, that's not what it does, it works just fine, at least in my PDF version, and you have that very thing in other places in the book. In Section 1, "basics.asc", you have a link to "<<_undoing>>", which properly displays the name of that section in Chapter 2, "Undoing Things". Not sure what you're seeing, but I actually checked the output of the above before submitting it and it seems fine. |
OK, let's give it a shot. We'll see what happens on git-scm.com. |
Just tested after fetching all the merged content upstream, and it looks good. Would this represent something that has changed with asciidoctor's behaviour? |
Hum, it turns out to not work so well.... |
I thought Ben verified that this works just fine. What's the issue? Saying "it turns out to not work so well" is not particularly informative. |
True. In fact, asciidoctor already automatically assigns ids using the same algorithm. That creates warnings when compiling due to conflicts between hand-made and automatic ids. Now, it seems that the compilation of the book on git-scm is stuck to the version at this commit because that created some inconsistencies in the DB. See for instance the link in It's a bug in the code at git-scm, but anyway, this renaming is conflicting. I'm working on porting the structure of the book to the latest versions of asciidoctor for pdf and ebook generation and all these hand-made ids need to be renamed (https://github.com/progit/progit2-fr/tree/reorder_files) to avoid clashes with automatic names. |
What do we need to do on this repo to help out? Would it make sense to revert this, or keep moving forward? |
For git-scm, it's really a bug that needs to be fixed there. But you have to bear in mind that one output of the changes here is the publishing on git-scm.com, which makes some special processings. Changes here can trigger bugs there. Then, for the rework, I need to set up the compilation script at git-scm.com to take into account the new structure of the files (basically, stop using atlas.json and really rely on progit.asc). For this repo, I can propose the rework of the structure:
All this is explained at https://github.com/asciidoctor/asciidoctor-epub3#structuring-your-manuscript |
The original asciidoc link name displayed to the reader was
"Git on the Server", which is in fact the very name of the
chapter, which is somewhat confusing, so change the link name
to reflect the actual section name.