Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(docs): moving typescript from the main docs into new section #1042

Merged
merged 1 commit into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.