Skip to content
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

Expand Section Links documentation and add a section for Custom Anchors #33531

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

dodexahedron
Copy link

@dodexahedron dodexahedron commented Jun 17, 2024

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:

  • 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.
  • For content changes, I have completed the self-review checklist.

Copy link

welcome bot commented Jun 17, 2024

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.

Copy link
Contributor

github-actions bot commented Jun 17, 2024

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.13 3.12 3.11 3.10 3.9
fpt
ghec
ghes@ 3.13 3.12 3.11 3.10 3.9
repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-readmes.md fpt
ghec
ghes@ 3.13 3.12 3.11 3.10 3.9
fpt
ghec
ghes@ 3.13 3.12 3.11 3.10 3.9
from reusable

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

@dodexahedron
Copy link
Author

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
Copy link
Author

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

@dodexahedron dodexahedron force-pushed the dodexahedron-section-links-and-custom-links-expansion branch from ff2e392 to 04a9003 Compare June 17, 2024 08:22
@dodexahedron
Copy link
Author

Once more, with feeling...

@dodexahedron dodexahedron marked this pull request as ready for review June 17, 2024 08:34
@dodexahedron
Copy link
Author

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
Copy link
Author

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 dodexahedron force-pushed the dodexahedron-section-links-and-custom-links-expansion branch from 04a9003 to 49d4159 Compare June 17, 2024 08:54
@dodexahedron
Copy link
Author

Links are now relative.

Let's see how this goes...

@dodexahedron
Copy link
Author

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

Correction coming up.

@dodexahedron
Copy link
Author

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:

#33530 (comment)

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.

@nguyenalex836 nguyenalex836 added content This issue or pull request belongs to the Docs Content team waiting for review Issue/PR is waiting for a writer's review get started Content related to "Getting Started" doc set and removed triage Do not begin working on this issue until triaged by the team labels Jun 18, 2024
@nguyenalex836
Copy link
Contributor

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

@dodexahedron
Copy link
Author

My pleasure.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content This issue or pull request belongs to the Docs Content team get started Content related to "Getting Started" doc set waiting for review Issue/PR is waiting for a writer's review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add more information on behavior and usage of section links and document custom anchors
2 participants