docs icon indicating copy to clipboard operation
docs copied to clipboard

Expand Section Links documentation and add a section for Custom Anchors

Open dodexahedron opened this issue 1 year ago • 15 comments

Why:

The information on section links and how they work doesn't really explain how to use them or how they are made.

Also, custom anchors can be used (and are, in fact, quite common in a lot of Microsoft Learn documents, for precedent), so I added a section for them, as well, in a separate commit.

Closes: #33530

What's being changed (if available, include any code snippets, screenshots, or gifs):

As described in #33530, I have expanded and enhanced the Section links reusable, detailing behavior and usage, as well as added a small section detailing behavior and usage of custom anchor tags.

Check off the following:

  • [x] I have reviewed my changes in staging, available via the View deployment link in this PR's timeline (this link will be available after opening the PR).

    • For content changes, you will also see an automatically generated comment with links directly to pages you've modified. The comment won't appear if your PR only edits files in the data directory.
  • [x] For content changes, I have completed the self-review checklist.

dodexahedron avatar Jun 17 '24 05:06 dodexahedron

Thanks for opening this pull request! A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines.

welcome[bot] avatar Jun 17 '24 05:06 welcome[bot]

Automatically generated comment ℹ️

This comment is automatically generated and will be overwritten every time changes are committed to this branch.

The table contains an overview of files in the content directory that have been changed in this pull request. It's provided to make it easy to review your changes on the staging site. Please note that changes to the data directory will not show up in this table.


Content directory changes

You may find it useful to copy this table into the pull request summary. There you can edit it to share links to important articles or changes and to give a high-level overview of how the changes in your pull request support the overall goals of the pull request.

Source Preview Production What Changed
get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax.md fpt
ghec
ghes@ 3.14 3.13 3.12 3.11 3.10
fpt
ghec
ghes@ 3.14 3.13 3.12 3.11 3.10
repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-readmes.md fpt
ghec
ghes@ 3.14 3.13 3.12 3.11 3.10
fpt
ghec
ghes@ 3.14 3.13 3.12 3.11 3.10

fpt: Free, Pro, Team ghec: GitHub Enterprise Cloud ghes: GitHub Enterprise Server

github-actions[bot] avatar Jun 17 '24 05:06 github-actions[bot]

Re-based on master.

If checks pass and it looks good to me in the preview environment, I'll be ready to submit this for review.

dodexahedron avatar Jun 17 '24 08:06 dodexahedron

Re-pushed from my local environment to sign the commits.

dodexahedron avatar Jun 17 '24 08:06 dodexahedron

Once more, with feeling...

dodexahedron avatar Jun 17 '24 08:06 dodexahedron

Those linter errors for broken links don't have anything to do with my changes, as they're in completely unrelated files. Linter does not throw any errors when run locally as npm run lint-content -- --paths .\content\get-started\writing-on-github\getting-started-with-writing-and-formatting-on-github\basic-writing-and-formatting-syntax.md

Here are the previews for the modified and added documentation:

https://docs-33531-114a4a.preview.ghdocs.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#section-links

https://docs-33531-114a4a.preview.ghdocs.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#custom-anchors

This is ready for review.

dodexahedron avatar Jun 17 '24 08:06 dodexahedron

Hm. I should probably make the section link I added to the #headings section a relative link rather than just an anchor target.

Stand by...

dodexahedron avatar Jun 17 '24 08:06 dodexahedron

Links are now relative.

Let's see how this goes...

dodexahedron avatar Jun 17 '24 08:06 dodexahedron

Bah. Checks pass, but I accidentally mixed up a link.

Correction coming up.

dodexahedron avatar Jun 17 '24 09:06 dodexahedron

Change made and it now looks and behaves as intended.

I also made the following comment in the associated issue, #33530, but I'll paste/quote it here, as well, for visibility:

https://github.com/github/docs/issues/33530#issuecomment-2172797129

One thought I had, while going through the style guide, is that the links section, both before these changes, but now especially after them, would match the style guide better if there were a section ToC, as well as if h3 an h4 headers were used. I opted not to implement that guideline, however, as the rest of the containing document does not follow that guideline, either, so it seemed better to conform to the document's de facto style, instead.

dodexahedron avatar Jun 17 '24 09:06 dodexahedron

@dodexahedron Thanks so much for opening a PR! I'll get this triaged for review ✨

nguyenalex836 avatar Jun 18 '24 17:06 nguyenalex836

My pleasure.

Any requests/thoughts/ideas/rude commentary, just let me know!

dodexahedron avatar Jun 22 '24 03:06 dodexahedron

Thanks for coming back to it, regardless!

I am just now going through my inbox, so I am just seeing this now and will read it over shortly and address any remaining feedback as soon as I can. 🙂

dodexahedron avatar Aug 19 '24 04:08 dodexahedron

Support please..

Mdanowe avatar Aug 19 '24 05:08 Mdanowe

@dodexahedron and @janbrasna - thanks for this PR and the interesting discussions ✨

@dodexahedron - I'm not sure if you have the time or desire to wade through all the comments and update your PR or not. Let me know if you want me to have a go. I'm out of the office next week, but would be happy to update the PR when I'm back.

felicitymay avatar Aug 22 '24 11:08 felicitymay

Apologies. It fell off my radar, but I'll take a look later this evening, if there's still anything outstanding.

dodexahedron avatar Sep 16 '24 22:09 dodexahedron

Thanks very much for contributing! Your pull request has been merged 🎉 You should see your changes appear on the site in approximately 24 hours. If you're looking for your next contribution, check out our help wanted issues :zap:

github-actions[bot] avatar Sep 23 '24 08:09 github-actions[bot]