documentation: add anchors to MyFirstContribution
commit5ef811ac5d60f9f6aa4300606d85ff780d2f402a
authorEmily Shaffer <emilyshaffer@google.com>
Fri, 17 May 2019 19:07:04 +0000 (17 12:07 -0700)
committerJunio C Hamano <gitster@pobox.com>
Sun, 19 May 2019 02:01:24 +0000 (19 11:01 +0900)
tree19ed43a5c584f44265d0268ab65bf32627463029
parent76644e3268b09605b7a181f06a10a53095993ab0
documentation: add anchors to MyFirstContribution

During the course of review for MyFirstContribution.txt, the suggestion
came up to include anchors to make it easier for veteran contributors to
link specific sections of this documents to newbies. To make life easier
for reviewers, add these anchors in their own commit. See review context
here: https://public-inbox.org/git/20190507195938.GD220818@google.com/

AsciiDoc does not support :sectanchors: and the anchors are not
discoverable, but they are referenceable. So a link to
"foo.com/MyFirstContribution.html#prerequisites" will still work if that
file was generated with AsciiDoc. The inclusion of :sectanchors: does
not create warnings or errors while compiling directly with `asciidoc -b
html5 Documentation/MyFirstContribution.txt` or while compiling with
`make doc`.

AsciiDoctor does support :sectanchors: and displays a paragraph link on
mouseover. When the anchor is included above or inline with a section
(as in this change), the link provided points to the custom ID contained
within [[]] instead of to an autogenerated ID. Practically speaking,
this means we have .../MyFirstContribution.html#summary instead of
.../MyFirstContribution.html#_summary. In addition to being prettier,
the custom IDs also enable anchor linking to work with
asciidoc-generated pages. This change compiles with no warnings using
`asciidoctor -b html5 Documentation/MyFirstContribution.txt`.

Signed-off-by: Emily Shaffer <emilyshaffer@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/MyFirstContribution.txt