Skip to content

Commit

Permalink
chore(docs): moving typescript from the main docs into new section (#…
Browse files Browse the repository at this point in the history
…1042)

Required winglang/wing#7222 to be merged.
  • Loading branch information
boyney123 authored Nov 20, 2024
1 parent 66cd96e commit 23a46ae
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 4 deletions.
14 changes: 14 additions & 0 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,20 @@ const config = {
// ... other options
}
],
[
"@docusaurus/plugin-content-docs",
{
id: "typescript",
path: "typescript",
routeBasePath: "docs/typescript",
editUrl: (params) =>
`${winglangOrgUrl}/wing/tree/main/docs/typescript/${params.docPath}`,
breadcrumbs: true,
includeCurrentVersion: false,
// sidebarPath: require.resolve('./sidebarsCommunity.js'),
// ... other options
}
],
[
"@docusaurus/plugin-content-docs",
{
Expand Down
4 changes: 4 additions & 0 deletions redirects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,10 @@ export default [
to: "/docs/api/analytics",
from: ["/docs/analytics"],
},
{
to: "/docs/typescript/intro",
from: ["/docs/typescript"],
},
{ to: '/docs/learn', from: ['/docs/category/examples'] },
// Standard Library redirects for docs v2
{ to: '/docs/api/category/aws', from: ['/docs/category/aws'] },
Expand Down
7 changes: 7 additions & 0 deletions scripts/updateDocs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ const authorization = `token ${process.env.GITHUB_TOKEN}`;
});
await fs.cp("docs/api", "api_versioned_docs/version-latest", { recursive: true });

console.log("typescript_versioned_docs/version-latest...");
await fs.rm("typescript_versioned_docs/version-latest", {
force: true,
recursive: true,
});
await fs.cp("docs/typescript", "typescript_versioned_docs/version-latest", { recursive: true });

console.log("example_versioned_docs/version-latest...");
await fs.rm("example_versioned_docs/version-latest", {
force: true,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: TypeScript For Wing
id: typescript
id: 'intro'
---

Wing's CLI has experimental support for TypeScript.
Expand Down
8 changes: 8 additions & 0 deletions typescript_versioned_sidebars/version-latest-sidebars.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"defaultSidebar": [
{
"type": "autogenerated",
"dirName": "."
}
]
}
3 changes: 3 additions & 0 deletions typescript_versions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[
"latest"
]
3 changes: 0 additions & 3 deletions versioned_docs/version-latest/09-typescript/_category_.yml

This file was deleted.

0 comments on commit 23a46ae

Please sign in to comment.