You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you create an internal link, you can use the AUOTITLE keyword to generate an article's title in the rendered link. See the [markup reference](../contributing/content-markup-reference.md#internal-links-with-autotitle) for details.
363
+
360
364
### Linking to the current article in a different version of the docs
361
365
362
366
Sometimes you may want to link from an article to the same article in a different product version. For example:
Copy file name to clipboardExpand all lines: contributing/content-markup-reference.md
+15
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,7 @@
16
16
-[Usage](#usage-5)
17
17
-[Reusable and variable strings of text](#reusable-and-variable-strings-of-text)
18
18
-[Tables with codeblocks](#tables-with-codeblocks)
19
+
-[Internal links with AUTOTITLE](#internal-links-with-autotitle)
19
20
20
21
## Writing in Markdown
21
22
@@ -254,3 +255,17 @@ If this happens, add the following CSS style to the `<table>` HTML tag:
254
255
```
255
256
256
257
For a current example of this usage, see the [GitHub Actions examples workflow library](https://docs.github.com/en/actions/examples).
258
+
259
+
## Internal links with AUTOTITLE
260
+
261
+
When linking to another GitHub docs page, use standard Markdown syntax like `[]()` but type `AUTOTITLE` instead of the page title. The application will replace `AUTOTITLE` with the title of the linked page during rendering. This special keyword is case-sensitive, so take care with your typing or the replacement will not work.
262
+
263
+
### Usage
264
+
265
+
-`For more information, see "[AUTOTITLE](/path/to/page)."`
266
+
-`For more information, see "[AUTOTITLE](/path/to/page#section-link)."`
267
+
-`For more information, see the TOOLNAME documentation in "[AUTOTITLE](/path/to/page?tool=TOOLNAME)."`
268
+
269
+
Note that **same-page section links do not work** with this keyword. Type out the full header text instead.
270
+
271
+
Read more about links in the [content style guide](./content-style-guide.md#links).
Copy file name to clipboardExpand all lines: contributing/content-style-guide.md
+16-7
Original file line number
Diff line number
Diff line change
@@ -332,17 +332,26 @@ For plain text, use linebreaks to separate paragraphs in the source (two consecu
332
332
333
333
## Links
334
334
335
-
Introduce links consistently using a standard format that clearly indicates where we’re linking.
335
+
Introduce links consistently using a standard format that clearly indicates where we're linking.
336
336
337
-
- For links to other articles in the GitHub docs: `For more information, see "[Page or article title]()."`
338
-
- For links to another section in the same article: `For more information, see "[Header text]()."`
339
-
- For links to specific sections in other articles in the GitHub docs: `For more information, see "[Article title]()."`
340
-
- For links to an article with a specific tool selected: `For more information, see the TOOLNAME documentation in "[ARTICLE TITLE](/PATH/TO/ARTICLE?tool=TOOLNAME).`
341
-
- For links to external documentation: `For more information, see [Page or article title]() in the X documentation.`
337
+
For any link that points to another GitHub docs page, use the special keyword `AUTOTITLE`. See details in the [content markup reference](./content-markup-reference.md#internal-links-with-autotitle).
338
+
339
+
Usage examples:
340
+
341
+
- For links to other pages: `For more information, see "[AUTOTITLE](/path/to/page)."`
342
+
- For links to sections in other pages: `For more information, see "[AUTOTITLE](/path/to/page#section-link)."`
343
+
- For links to a page with a tool selected: `For more information, see the TOOLNAME documentation in "[AUTOTITLE](/path/to/page?tool=TOOLNAME).`
344
+
345
+
Same-page section links do **not** work with `AUTOTITLE`. Instead, type out the full header text: `For more information, see "[Header text](#section-link)."`
346
+
347
+
For links to external documentation, type out the full article name: `For more information, see [Page or article title](https://some-docs.com/path/to/page) in the X documentation.`
342
348
343
349
Do not include quotation marks within a hyperlink.
344
350
345
-
Links should be meaningful and provide high value to the user’s journey - link out carefully. Move links that are helpful but not necessary to an article’s further reading section. Do not repeat the same link more than once in the same article or under the same H2 header.
351
+
Some best practices for using links:
352
+
- Links should be meaningful and provide high value to the user’s journey—link out carefully.
353
+
- Move links that are helpful but not necessary to an article’s further reading section.
354
+
- Do not repeat the same link more than once in the same article or under the same H2 header.
346
355
347
356
For accessibility and readability, avoid inline or midsentence links.
348
357
-**Use:** OAuth2 tokens can be acquired programmatically for applications that are not websites. For more information, see "[Setting up and registering OAuth Apps](https://developer.github.com/apps/building-integrations/setting-up-and-registering-oauth-apps/)" and "[Create a new authorization](https://docs.github.com/en/enterprise-server@2.22/rest/reference/oauth-authorizations/#create-a-new-authorization)."
0 commit comments