Skip to content

Commit

Permalink
feat(doc): add pageType field (#11662)
Browse files Browse the repository at this point in the history
Helpful for quickly looking up the page type, but also useful for future features.
  • Loading branch information
fiji-flo committed Aug 20, 2024
1 parent a5b20b9 commit 79f75ca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions build/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,8 @@ export async function buildDocument(

doc.other_translations = document.translations || [];

doc.pageType = metadata["page-type"] || "unknown";

injectSource(doc, document, metadata);

if (document.metadata["short-title"]) {
Expand Down
1 change: 1 addition & 0 deletions libs/types/document.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ export interface DocMetadata {
browserCompat?: string[];
baseline?: SupportStatus;
hash?: string;
pageType: string;
}

export interface Doc extends DocMetadata {
Expand Down

0 comments on commit 79f75ca

Please sign in to comment.