Skip to content

Commit 89bf7a5

Browse files
authored
Merge pull request #40109 from github/repo-sync
Repo sync
2 parents 4c37a8a + 3fbee17 commit 89bf7a5

File tree

4 files changed

+82
-37
lines changed

4 files changed

+82
-37
lines changed

content/billing/concepts/product-billing/github-advanced-security.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,7 @@ There are two different ways to pay for licenses.
9696
* Purchase a specific number of {% data variables.product.prodname_GHAS_cs_or_sp %} licenses that last for a defined period, typically at least a year, see {% ifversion fpt or ghec %}[AUTOTITLE](/billing/how-tos/products/add-advanced-security){% elsif ghes %}[AUTOTITLE](/enterprise-cloud@latest/billing/how-tos/products/add-advanced-security) in the {% data variables.product.prodname_ghe_cloud %} documentation{% endif %}.
9797
* If the usage of {% data variables.product.prodname_AS %} by active committers exceeds the number of licenses purchased, you need to purchase additional licenses to cover this overage usage.
9898

99-
<!-- expires 2025-08-31 -->
100-
<!--This versioning is not needed once the related EDI PR for this article is merged (#57129).-->
101-
{% ifversion fpt or ghec %}To view your current license usage, see [AUTOTITLE](/billing/managing-billing-for-your-products/viewing-your-product-usage).{% endif %}
102-
<!-- end expires 2025-08-31 -->
99+
To view your current license usage, see [AUTOTITLE](/billing/managing-billing-for-your-products/viewing-your-product-usage).
103100

104101
### Understanding usage
105102

content/contributing/style-guide-and-content-model/style-guide.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ For presenting keyboard shortcuts, follow the [Microsoft Style Guide](https://do
551551

552552
### Usage highlights
553553

554-
Below are some usage highlights for how we present keyboard shortcuts in our documentation:
554+
Here are some usage highlights for how we present keyboard shortcuts in our documentation:
555555

556556
* The basic syntax is to show keys with `+` between key combinations, without any spaces.
557557

@@ -592,7 +592,7 @@ Below are some usage highlights for how we present keyboard shortcuts in our doc
592592
593593
Do not create reusables for license attributions. We must use the exact license a project is licensed under, so any attributions must be accurately written for the articles that they appear in.
594594
595-
If you are unsure of the legality of reusing any content, contact legal. If you are adding content with a license that is not listed below, you must receive a legal review before you can publish the content.
595+
If you are unsure of the legality of reusing any content, contact legal. If you are adding content with a license that is not listed here, you must receive a legal review before you can publish the content.
596596
597597
### Attributing MIT-licensed content
598598
@@ -1270,6 +1270,14 @@ To signal to readers that you've added or changed a note, or to indicate the pub
12701270
12711271
To signal that we have removed a release note, add an "Errata" section detailing which note you removed and (if relevant) which version the removed note actually pertains to. See [Writing errata](#writing-errata).
12721272
1273+
## Release references
1274+
1275+
When referring to a range of releases starting from a particular release, use "or later."
1276+
1277+
* **Use:** "release 0.41.0 or later"
1278+
* **Avoid:** "release 0.41.0 or above"
1279+
* **Avoid:** "release 0.41.0 or greater"
1280+
12731281
## Reusables and variables
12741282
12751283
Use reusable strings for individual nouns (e.g. product names) or for complete sentences or paragraphs. Sentence fragments and phrases should not be contained in reusable strings as they can cause problems when content is localized. For more information, see the [data directory](https://github.com/github/docs/tree/main/data) in the [`github/docs`](https://github.com/github/docs) repository, [Creating reusable content](/contributing/writing-for-github-docs/creating-reusable-content), and the [Product names](#product-names) section of this document.

src/dev-toc/generate.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
/**
2+
* Development tool that generates a local Table of Contents (TOC) for the GitHub Docs website.
3+
*
4+
* This script creates static HTML files for each documentation version, renders page titles
5+
* using Liquid templating, and opens the generated TOC in your browser for easy navigation
6+
* during development. Supports command-line options to specify which sections should be
7+
* open by default.
8+
*
9+
* Usage: tsx src/dev-toc/generate.ts [-o product-ids...]
10+
*/
11+
112
import fs from 'fs'
213
import path from 'path'
314
import { execSync } from 'child_process'

src/dev-toc/layout.html

Lines changed: 60 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -24,40 +24,69 @@ <h2 class="mt-3 mb-3"><abbr>TOC</abbr> for {{ allVersions[currentVersion].versio
2424
<button class="btn mb-3 js-expand" type="button">Expand All</button>
2525
<div/>
2626

27+
{% assign maxTocDepth = 5 %}
28+
2729
{% for productPage in currentEnglishTree.childPages %}
28-
{% assign productId = productPage.page.relativePath | replace: "/index.md", "" %}
29-
{% if defaultOpenSections contains productId %}
30-
<details open class="mb-1"><summary>{{productPage.renderedFullTitle}}</summary>
31-
{% else %}
32-
<details class="mb-1"><summary>{{productPage.renderedFullTitle}}</summary>
33-
{% endif %}
34-
<ul class="products-list">
35-
<li title="{{productPage.renderedFullTitle}}" style="margin: 3px 0 0 30px;">
36-
<a title="{{ productPage.page.documentType }}" href="{{ docsRoot }}{{productPage.href}}">{{ productPage.renderedFullTitle }}</a>
37-
{% for categoryPage in productPage.childPages %}
38-
<ul>
39-
<li style="margin: 3px 0 0 30px;">
40-
<a title="{{ categoryPage.page.documentType }}" href="{{ docsRoot }}{{ categoryPage.href }}">{{ categoryPage.renderedFullTitle }}</a>
41-
<ul>
42-
{% for subcategoryPage in categoryPage.childPages %}
30+
{% assign productId = productPage.page.relativePath | replace: "/index.md", "" %}
31+
{% if defaultOpenSections contains productId %}
32+
<details open class="mb-1"><summary>{{productPage.renderedFullTitle}}</summary>
33+
{% else %}
34+
<details class="mb-1"><summary>{{productPage.renderedFullTitle}}</summary>
35+
{% endif %}
36+
37+
<ul class="products-list">
38+
<li title="{{productPage.renderedFullTitle}}" style="margin: 3px 0 0 30px;">
39+
<a title="{{ productPage.page.documentType }}" href="{{ docsRoot }}{{productPage.href}}">{{ productPage.renderedFullTitle }}</a>
40+
41+
{% comment %} Unified nested rendering with depth control {% endcomment %}
42+
{% if productPage.childPages and productPage.childPages.size > 0 %}
43+
<ul>
44+
{% for l1 in productPage.childPages %}
4345
<li style="margin: 3px 0 0 30px;">
44-
<a title="{{ subcategoryPage.page.documentType }}" href="{{ docsRoot }}{{ subcategoryPage.href }}">{{ subcategoryPage.renderedFullTitle }}</a>
45-
<ul>
46-
{% for articlePage in subcategoryPage.childPages %}
47-
<li style="margin: 3px 0 0 30px;">
48-
<a title="{{ articlePage.page.documentType }}" href="{{ docsRoot }}{{ articlePage.href }}">{{ articlePage.renderedFullTitle }}</a>
49-
</li>
50-
{% endfor %}
51-
</ul>
46+
<a title="{{ l1.page.documentType }}" href="{{ docsRoot }}{{ l1.href }}">{{ l1.renderedFullTitle }}</a>
47+
{% if l1.childPages and l1.childPages.size > 0 and maxTocDepth >= 2 %}
48+
<ul>
49+
{% for l2 in l1.childPages %}
50+
<li style="margin: 3px 0 0 30px;">
51+
<a title="{{ l2.page.documentType }}" href="{{ docsRoot }}{{ l2.href }}">{{ l2.renderedFullTitle }}</a>
52+
{% if l2.childPages and l2.childPages.size > 0 and maxTocDepth >= 3 %}
53+
<ul>
54+
{% for l3 in l2.childPages %}
55+
<li style="margin: 3px 0 0 30px;">
56+
<a title="{{ l3.page.documentType }}" href="{{ docsRoot }}{{ l3.href }}">{{ l3.renderedFullTitle }}</a>
57+
{% if l3.childPages and l3.childPages.size > 0 and maxTocDepth >= 4 %}
58+
<ul>
59+
{% for l4 in l3.childPages %}
60+
<li style="margin: 3px 0 0 30px;">
61+
<a title="{{ l4.page.documentType }}" href="{{ docsRoot }}{{ l4.href }}">{{ l4.renderedFullTitle }}</a>
62+
{% if l4.childPages and l4.childPages.size > 0 and maxTocDepth >= 5 %}
63+
<ul>
64+
{% for l5 in l4.childPages %}
65+
<li style="margin: 3px 0 0 30px;">
66+
<a title="{{ l5.page.documentType }}" href="{{ docsRoot }}{{ l5.href }}">{{ l5.renderedFullTitle }}</a>
67+
</li>
68+
{% endfor %}
69+
</ul>
70+
{% endif %}
71+
</li>
72+
{% endfor %}
73+
</ul>
74+
{% endif %}
75+
</li>
76+
{% endfor %}
77+
</ul>
78+
{% endif %}
79+
</li>
80+
{% endfor %}
81+
</ul>
82+
{% endif %}
5283
</li>
53-
{% endfor %}
54-
</ul>
55-
</li>
56-
{% endfor %}
57-
</ul>
58-
</li>
59-
</ul>
60-
</details>
84+
{% endfor %}
85+
</ul>
86+
{% endif %}
87+
</li>
88+
</ul>
89+
</details>
6190
{% endfor %}
6291
{% endif %}
6392

0 commit comments

Comments
 (0)