Skip to content

Commit

Permalink
Move toc to devsite, and rename to _toc.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
dlarocque committed May 23, 2024
1 parent b664d41 commit 3186c59
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
6 changes: 0 additions & 6 deletions toc/toc.yaml → docs-devsite/_toc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -472,8 +472,6 @@ toc:
path: /docs/reference/js/vertexai-preview.date_2.md
- title: EnhancedGenerateContentResponse
path: /docs/reference/js/vertexai-preview.enhancedgeneratecontentresponse.md
- title: ErrorDetails
path: /docs/reference/js/vertexai-preview.errordetails.md
- title: FileData
path: /docs/reference/js/vertexai-preview.filedata.md
- title: FileDataPart
Expand Down Expand Up @@ -517,8 +515,6 @@ toc:
path: /docs/reference/js/vertexai-preview.groundingattribution.md
- title: GroundingMetadata
path: /docs/reference/js/vertexai-preview.groundingmetadata.md
- title: HTTPErrorDetails
path: /docs/reference/js/vertexai-preview.httperrordetails.md
- title: InlineDataPart
path: /docs/reference/js/vertexai-preview.inlinedatapart.md
- title: ModelParams
Expand All @@ -545,8 +541,6 @@ toc:
path: /docs/reference/js/vertexai-preview.usagemetadata.md
- title: VertexAI
path: /docs/reference/js/vertexai-preview.vertexai.md
- title: VertexAIError
path: /docs/reference/js/vertexai-preview.vertexaierror.md
- title: VertexAIOptions
path: /docs/reference/js/vertexai-preview.vertexaioptions.md
- title: VideoMetadata
Expand Down
11 changes: 11 additions & 0 deletions scripts/docgen/docgen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,23 @@ async function generateToc() {
'toc',
'--input',
'temp',
'--output',
'docs-devsite',
'-p',
'/docs/reference/js',
'-j'
],
{ stdio: 'inherit' }
);
// The toc on the devsite must be named _toc.yaml
await spawn(
'mv',
[
'docs-devsite/toc.yaml',
'docs-devsite/_toc.yaml'
],
{ stdio: 'inherit' }
);
} finally {
cleanup();
}
Expand Down

0 comments on commit 3186c59

Please sign in to comment.