Skip to content

Commit fbc415f

Browse files
Drop ms.topic Metadata Field for all Non-Index Doc Files (#2422)
As requested by the doc team, they now have a script that will add the `ms.topic` field with a value that they determine, so we shouldn't generate `ms.topic` fields.
1 parent 3ce62ce commit fbc415f

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

compiler/qsc_doc_gen/src/generate_docs.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ type ToC = FxHashMap<Rc<str>, Vec<Rc<Metadata>>>;
2929
struct Metadata {
3030
uid: String,
3131
title: String,
32-
topic: String,
3332
kind: MetadataKind,
3433
package: PackageKind,
3534
namespace: Rc<str>,
@@ -60,9 +59,9 @@ description: {}
6059
author: {{AUTHOR}}
6160
ms.author: {{MS_AUTHOR}}
6261
ms.date: {{TIMESTAMP}}
63-
ms.topic: {}
62+
ms.topic: landing-page
6463
---",
65-
self.uid, self.title, self.summary, self.topic,
64+
self.uid, self.title, self.summary,
6665
)
6766
}
6867

@@ -80,7 +79,6 @@ uid: {}
8079
title: {}
8180
description: \"Q# {}: {}\"
8281
ms.date: {{TIMESTAMP}}
83-
ms.topic: {}
8482
qsharp.kind: {}
8583
qsharp.package: {}
8684
qsharp.namespace: {}
@@ -91,7 +89,6 @@ qsharp.summary: \"{}\"
9189
self.title,
9290
self.title,
9391
self.summary,
94-
self.topic,
9592
kind,
9693
self.package,
9794
self.namespace,
@@ -505,7 +502,6 @@ fn generate_index_file(files: &mut FilesWithMetadata, ns: &Rc<str>, items: &mut
505502
let metadata = Metadata {
506503
uid: format!("Qdk.{ns}-toc"),
507504
title: format!("{ns} namespace"),
508-
topic: "landing-page".to_string(),
509505
kind: MetadataKind::TableOfContents,
510506
package: package_kind,
511507
namespace: ns.clone(),
@@ -552,7 +548,6 @@ fn generate_top_index(files: &mut FilesWithMetadata, toc: &mut ToC) {
552548
let metadata = Metadata {
553549
uid: "Microsoft.Quantum.apiref-toc".to_string(),
554550
title: "Q# standard libraries for the Azure Quantum Development Kit".to_string(),
555-
topic: "landing-page".to_string(),
556551
kind: MetadataKind::TableOfContents,
557552
package: PackageKind::StandardLibrary,
558553
namespace: empty_ns.clone(),
@@ -708,7 +703,6 @@ fn get_metadata(
708703
Some(Metadata {
709704
uid: format!("Qdk.{ns}.{name}"),
710705
title: format!("{name} {kind}"),
711-
topic: "managed-reference".to_string(),
712706
kind,
713707
package: package_kind,
714708
namespace: ns,

compiler/qsc_doc_gen/src/generate_docs/tests.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ fn generates_standard_item() {
1919
title: Length function
2020
description: "Q# Length function: Returns the number of elements in the input array `a`."
2121
ms.date: {TIMESTAMP}
22-
ms.topic: managed-reference
2322
qsharp.kind: function
2423
qsharp.package: __Core__
2524
qsharp.namespace: Std.Core
@@ -68,7 +67,6 @@ fn generates_unrestricted_item() {
6867
title: CheckZero operation
6968
description: "Q# CheckZero operation: Checks whether a qubit is in the |0⟩ state, returning true if it is."
7069
ms.date: {TIMESTAMP}
71-
ms.topic: managed-reference
7270
qsharp.kind: operation
7371
qsharp.package: __Std__
7472
qsharp.namespace: Std.Diagnostics
@@ -120,7 +118,6 @@ fn redirect_generation() {
120118
title: Length exported item
121119
description: "Q# Length exported item: This is an exported item. The actual definition is found here: [Std.Core.Length](xref:Qdk.Std.Core.Length)"
122120
ms.date: {TIMESTAMP}
123-
ms.topic: managed-reference
124121
qsharp.kind: export
125122
qsharp.package: __Std__
126123
qsharp.namespace: Microsoft.Quantum.Core

0 commit comments

Comments
 (0)