Skip to content

Commit e4c8301

Browse files
authored
fix: improve the styles and fix typo (#82)
* fix: improve the styles and fix typo * fix: remove all the keys
1 parent 701ae82 commit e4c8301

File tree

8 files changed

+37
-37
lines changed

8 files changed

+37
-37
lines changed

src/content/docs/cpp/language/basics.mdx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
title: Overview
33
sidebar:
44
order: 1
5-
cppdoc:
6-
keys: ["cpp.lang.basic"]
75
---
86

97
import { Revision } from "@components/revision";

src/content/docs/cpp/language/comments.mdx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
---
22
title: Comments
33
description: Auto‑generated from cppreference
4-
cppdoc:
5-
keys: ["cpp.lang.comments"]
64
---
75

86
import { Desc, DescList, DocLink } from '@components/index';

src/content/docs/cpp/language/exceptions.mdx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
---
22
title: Exceptions
3-
cppdoc:
4-
keys: ["cpp.lang.exceptions"]
53
---
64

75
import { Decl, DeclDoc } from "@components/decl-doc";

src/content/docs/cpp/language/main_function.mdx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
---
22
title: Main function
3-
cppdoc:
4-
keys: ["cpp.lang.main"]
53
---
64

75
import Code from "@astrojs/starlight/components";

src/content/docs/cpp/language/preprocessor.mdx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
---
2-
title: preprocessor
3-
cppdoc:
4-
keys: ["cpp.lang.preprocessor"]
2+
title: Preprocessor
53
---
64

75
import { Desc, DescList, DocLink } from '@components/index';

src/content/docs/cpp/language/templates.mdx

Lines changed: 36 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
---
22
title: Templates
3-
cppdoc:
4-
keys: ["cpp.lang.templates"]
53
---
64

75
import { Decl, DeclDoc } from "@components/decl-doc";
@@ -38,25 +36,25 @@ The definition of a class template must be visible at the point of implicit inst
3836

3937
<DeclDoc>
4038
<Decl slot="decl">
41-
```cpp
42-
template <parameter-list> requires-clause(optional)</span> declaration
39+
```cpp cxx-mark
40+
template </*$s:parameter-list*/> /*$s:requires-clause*//*$opt*//*$s:declaration*/
4341
```
4442
</Decl>
4543
</DeclDoc>
4644

4745
<DeclDoc>
4846
<Decl slot="decl">
49-
```cpp
50-
export template <parameter-list> declaration
47+
```cpp cxx-mark
48+
export template </*$s:parameter-list*/> /*$s:requires-clause*//*$opt*//*$s:declaration*/
5149
```
5250
</Decl>
5351
<Revision until="C++11"></Revision>
5452
</DeclDoc>
5553

5654
<DeclDoc>
5755
<Decl slot="decl">
58-
```cpp
59-
template <parameter-list> concept concept-name = constraint-expression;
56+
```cpp cxx-mark
57+
template </*$s:parameter-list*/> concept /*$s:concept-name*/ = /*$s:constraint-expression*/;
6058
```
6159
</Decl>
6260
<Revision since="C++20"></Revision>
@@ -65,18 +63,15 @@ The definition of a class template must be visible at the point of implicit inst
6563

6664
<ParamDocList>
6765
<ParamDoc name="parameter-list">
68-
a non-empty comma-separated list of the template parameters, each of which is either constant parameter, a type parameter, a template parameter, or a parameter pack of any of those(since C++11).
66+
a non-empty comma-separated list of the <DocLink dest="/cpp/language/template_parameters">template parameters</DocLink>, each of which is either <DocLink dest="/cpp/language/template_parameters#Constant_template_parameters">constant parameter</DocLink>, a <DocLink dest="/cpp/language/template_parameters#Type_template_parameters">type parameter</DocLink>, a <DocLink dest="/cpp/language/template_parameters#Template_template_parameters">template parameter</DocLink><Revision since="C++11">, or a <DocLink dest="/cpp/language/parameter_pack">parameter pack</DocLink> of any of those</Revision>.
6967
</ParamDoc>
7068
<ParamDoc name="requires-clause">
71-
(since C++20) a requires-clause that specifies the constraints on the template arguments.
69+
<Revision since="C++20">a <DocLink dest="/cpp/language/constraints#requires-clauses">requires-clause</DocLink> that specifies the <DocLink dest="/cpp/language/constraints">constraints</DocLink> on the template arguments.</Revision>
7270
</ParamDoc>
7371
<ParamDoc name="declaration">
74-
declaration of a class (including struct and union), a member class or member enumeration type, a function or member function, a static data member at namespace scope, a variable or static data member at class scope(since C++14), or an alias template(since C++11). It may also define a template specialization.
72+
declaration of a <DocLink dest="/cpp/language/class_template">class (including struct and union)</DocLink>, a <DocLink dest="/cpp/language/member_template">member class or member enumeration type</DocLink>, a <DocLink dest="/cpp/language/function_template">function</DocLink> or <DocLink dest="/cpp/language/member_template">member function</DocLink>, a static data member at namespace scope<Revision since="C++14">, a <DocLink dest="/cpp/language/variable_template">variable or static data member at class scope</DocLink></Revision>, <Revision since="C++11">or an <DocLink dest="/cpp/language/type_alias">alias template</DocLink></Revision>. It may also define a <DocLink dest="/cpp/language/template_specialization">template specialization</DocLink>.
7573
</ParamDoc>
76-
<ParamDoc name="concept-name">
77-
concept-name
78-
</ParamDoc>
79-
<ParamDoc name="constraint-expression">
74+
<ParamDoc name="concept-name constraint-expression">
8075
see constraints and concepts
8176
</ParamDoc>
8277
</ParamDocList>
@@ -91,41 +86,59 @@ A template identifier has one of the following syntaxes:
9186

9287
<DeclDoc>
9388
<Decl slot="decl">
94-
```cpp
95-
template-name<template-argument-list(optional)>
89+
```cpp cxx-mark
90+
/*$s:template-name*/</*$s:template-argument-list*//*$opt*/>
9691
```
9792
</Decl>
9893

9994
A *simple template identifier*.
10095
</DeclDoc>
10196
<DeclDoc>
10297
<Decl slot="decl">
103-
```cpp
104-
operator op<template-argument-list(optional)>
98+
```cpp cxx-mark
99+
operator /*$s:op*/</*$s:template-argument-list*//*$opt*/>
105100
```
106101
</Decl>
107102

108103
An operator function template identifier.
109104
</DeclDoc>
110105
<DeclDoc>
111106
<Decl slot="decl">
112-
```cpp
113-
operator "" identifier<template-argument-list(optional)>
107+
```cpp cxx-mark
108+
operator "" /*$s:identifier*/</*$s:template-argument-list*//*$opt*/>
114109
```
115110
</Decl>
116111

117112
A literal operator function template identifier. <Revision since="C++11" traits={[{ trait: "deprecated", since:"C++23"}]}></Revision>
118113
</DeclDoc>
119114
<DeclDoc>
120115
<Decl slot="decl">
121-
```cpp
122-
operator user-defined-string-literal<template-argument-list(optional)>
116+
```cpp cxx-mark
117+
operator user-defined-string-literal</*$s:template-argument-list*//*$opt*/>
123118
```
124119
</Decl>
125120

126121
A user-defined string literal operator. <Revision since="C++11"></Revision>
127122
</DeclDoc>
128123

124+
125+
<ParamDocList>
126+
<ParamDoc name="template-name">
127+
an <DocLink dest="/cpp/language/name">identifier</DocLink> that names a template
128+
</ParamDoc>
129+
<ParamDoc name="op">
130+
an <DocLink dest="/cpp/language/operators">overloadable operator</DocLink>
131+
</ParamDoc>
132+
<ParamDoc name="identifier">
133+
an identifier
134+
</ParamDoc>
135+
<ParamDoc name="user-defined-string-literal">
136+
`""` followed by an identifier
137+
</ParamDoc>
138+
</ParamDocList>
139+
140+
141+
129142
A simple template identifier that names a class template specialization names a class.
130143

131144
A template identifier that names an alias template specialization names a type.

src/content/docs/cpp/library/index.mdx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
title: Overview
33
sidebar:
44
order: 1
5-
cppdoc:
6-
keys: ["cpp.library"]
75
---
86

97
import { Card } from "@astrojs/starlight/components";

src/content/docs/cpp/library/utilities/move.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
title: std::move
33
cppdoc:
4-
keys: ["cpp.library.utilities.move"]
54
revision:
65
since: C++11
76
---

0 commit comments

Comments
 (0)