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
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+58-5Lines changed: 58 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -78,18 +78,71 @@ The topics in this repository use Markdown. Here is a good overview of [Markdow
78
78
79
79
## Topic Metadata
80
80
81
-
Topic metadata enables certain functionalities for the topics such as table of contents order, topic descriptions, and online search optimization as well as aiding Microsoft in evaluating the effectiveness of the content.
81
+
Topic metadata enables certain functionalities for the topics such as topic description and online search optimization.
82
+
83
+
The page title is taken from the first H1 heading in the topic.
82
84
83
-
***Order** - This is the order that is used in the left rail TOC, the page is left out of the TOC if this is blank.
84
-
***Area** - General area within VS Code. Corresponds to the high-level Table of Contents (TOC) node.
85
-
***TOCTitle** - The title used in the left rail Table of Contents for this page.
86
-
***PageTitle** - The title used in the HTML title for the page and in search results.
87
85
***ContentId** - A GUID that uniquely identifies the topic to DevDiv doc reporting.
88
86
***DateApproved** - The date of the most recent update or review. It is displayed at the bottom of an article to indicate freshness. The date should be updated in a significant PR.
89
87
***MetaDescription** - The meta description for this page, which helps for search. Use sentence structure limited to 300 characters.
90
88
***MetaSocialImage** - Optional. Used for og:image in page header for sharing on social media. Should be 1024 x 512 .png.
91
89
***MetaTags** - Optional. Further tags for this page again for search.
92
90
91
+
## Table of contents
92
+
93
+
The table of contents (TOC) is defined in the `/docs/toc.yml` file. The TOC is used to generate the left rail navigation for the documentation. If a topic is not listed in the `/docs/toc.yml` file, it will not be included in the left rail navigation.
94
+
95
+
To add a new topic to the TOC, add a new entry in the `topics` attribute of the appropriate section in the `/docs/toc.yml` file. The TOC is organized into sections, each with a name and an area. The area is used to group related topics together.
96
+
97
+
The order in which the topics are listed in the `/docs/toc.yml` file determines the order in which they are displayed in the left rail navigation.
98
+
99
+
Each topic in the TOC has two attributes:
100
+
101
+
* TOC title: the title that is displayed in the left rail navigation.
102
+
* File name: the relative path to the topic file in the format `/docs/<subfolder>/<filename-without-md>`.
103
+
104
+
The following example shows a `Getting Started` section that has two topics.
To create a subsection within a section, add a subsection entry to the `topics` attribute. A subsection entry has the following attributes:
118
+
119
+
* TOC Title: empty string
120
+
* File name: empty string
121
+
* Subsection: a subsection entry with the same format as a section entry. It has a `name` attribute, an `area` attribute, and a `topics` attribute.
122
+
123
+
The following example shows a `Guides` subsection with two topics, within the `GitHub Copilot` section.
124
+
125
+
```yaml
126
+
{
127
+
"name": "GitHub Copilot",
128
+
"area": "copilot",
129
+
"topics": [
130
+
["Overview", "/docs/copilot/overview"],
131
+
["Setup", "/docs/copilot/setup"],
132
+
["", "", {
133
+
"name": "Guides",
134
+
"area": "copilot/guides",
135
+
"topics": [
136
+
["Test with Copilot", "/docs/copilot/guides/test-with-copilot"],
137
+
["Debug with Copilot", "/docs/copilot/guides/debug-with-copilot"]
138
+
]
139
+
}
140
+
],
141
+
["FAQ", "/docs/copilot/faq"]
142
+
]
143
+
},
144
+
```
145
+
93
146
## Product name
94
147
95
148
Use the full product name "Visual Studio Code" in the topic MetaDescription and the first use in a topic. You can use the shortened "VS Code" after that throughout the rest of the content. Do not use "VSCode" (no space) or "Code".
0 commit comments