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): moved winglibs into their own section and page on the we… #1024

Merged
merged 6 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
16 changes: 13 additions & 3 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,18 @@ const config = {
`${winglangOrgUrl}/wing/tree/main/docs/api/${params.docPath}`,
breadcrumbs: true,
includeCurrentVersion: false,
// sidebarPath: require.resolve('./sidebarsCommunity.js'),
// ... other options
}
],
[
"@docusaurus/plugin-content-docs",
{
id: "winglibs",
path: "winglibs",
routeBasePath: "docs/libraries",
editUrl: (params) =>
`${winglangOrgUrl}/wing/tree/main/docs/api/${params.docPath}`,
breadcrumbs: true,
includeCurrentVersion: false,
}
],
],
Expand Down Expand Up @@ -281,7 +291,7 @@ const config = {
target: "_self",
},
{
to: "docs/winglibs/all-winglibs",
to: "docs/libraries",
position: "left",
label: "Libraries",
className: "header-text-link",
Expand Down
10 changes: 6 additions & 4 deletions redirects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,6 @@ export default [
to: "/docs/platforms/microsoft-azure/tf-azure",
from: ["/docs/platforms/tf-azure"],
},
{
to: "/docs/winglibs/what-are-winglibs",
from: ["/docs/libraries"],
},
{
to: "/docs/api/analytics",
from: ["/docs/analytics"],
Expand Down Expand Up @@ -111,5 +107,11 @@ export default [
{ to: "https://learn.winglang.io/learn/counter", from: ["/learn/counter"] },
{ to: "https://learn.winglang.io/learn/queue", from: ["/learn/queue"] },
{ to: "https://learn.winglang.io/learn/topic", from: ["/learn/topic"] },

// Redirects for winglibs
{ to: "/docs/libraries/", from: ["/docs/winglibs/what-are-winglibs"] },
{ to: "/docs/libraries/using-winglibs", from: ["/docs/winglibs/using-winglibs"] },
{ to: "/docs/libraries/creating-winglibs", from: ["/docs/winglibs/creating-winglibs"] },
{ to: "/docs/libraries/all-winglibs", from: ["/docs/winglibs/all-winglibs"] },

]
8 changes: 4 additions & 4 deletions scripts/winglibDocs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import { readFileSync, existsSync } from 'fs';

const authorization = `token ${process.env.GITHUB_TOKEN}`;

const WINGLIB_DIR_TEMP_DIR = join(process.cwd(), 'versioned_docs', 'version-latest', '04-winglibs', '05-winglibs');
const WINGLIB_DIR = join(WINGLIB_DIR_TEMP_DIR, '../');
const WINGLIB_DIR_TEMP_DIR = join(process.cwd(), 'winglibs_versioned_docs', 'version-latest', 'winglibs');
const WINGLIB_DIR = join(WINGLIB_DIR_TEMP_DIR, '../', '05-winglibs');

const categoryFile = `label: winglibs
collapsible: true
Expand Down Expand Up @@ -137,7 +137,7 @@ keywords: [winglib, Wing library]
// Create the table.
// @ts-ignore
for (const { title, version, description, platforms, demoURL, packageJson, winglib } of winglibs) {
table += `\n| [${title}](/docs/winglibs/${winglib}) | [${packageJson.name}](/docs/winglibs/${winglib}) | v${version} | ${description} ${demoURL ? `([Example](${demoURL}))` : ''} | ${buildUrlsForPlatforms(platforms)} |`;
table += `\n| [${title}](/docs/libraries/winglibs/${winglib}) | [${packageJson.name}](/docs/libraries/winglibs/${winglib}) | v${version} | ${description} ${demoURL ? `([Example](${demoURL}))` : ''} | ${buildUrlsForPlatforms(platforms)} |`;
}

// contributing to winglibs
Expand Down Expand Up @@ -174,7 +174,7 @@ keywords: [winglib, Wing library]
const file = `---
title: ${title}
id: ${winglib}
sidebar_label: ${title} (winglib)
sidebar_label: ${title}
description: ${packageJson.wing?.docs?.summary || packageJson.description}
keywords: [winglib, Wing library]
---
Expand Down
47 changes: 0 additions & 47 deletions versioned_docs/version-latest/04-winglibs/04-toc.md

This file was deleted.

6 changes: 0 additions & 6 deletions versioned_docs/version-latest/04-winglibs/_category_.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Wing Libraries
id: what-are-winglibs
slug: /
description: Documentation about Wing libraries (winglibs)
sidebar_label: What are winglibs?
keywords: [Wing reference, Wing libraries, libraries, packaging, packages]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Using winglibs
id: using-winglibs
slug: /using-winglibs
description: Documentation for using winglibs
sidebar_label: Importing winglibs
keywords: [Wing reference, Wing libraries, libraries, packaging, packages]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Creating winglibs
id: creating-winglibs
slug: /creating-winglibs
description: Documentation for creating winglibs
sidebar_label: Creating winglibs
keywords: [Wing reference, Wing libraries, libraries, packaging, packages]
Expand Down
47 changes: 47 additions & 0 deletions winglibs_versioned_docs/version-latest/04-toc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
title: List of winglibs
id: all-winglibs
sidebar_label: Explore all Wing libraries
description: Table of all Wing libraries
keywords: [winglib, Wing library]
---

| Library | Package name | Version | Description | Supported Wing platforms |
| -------- | ------- | ------- | ------- | ------- |
| [Amazon Bedrock](/docs/libraries/winglibs/bedrock) | [@winglibs/bedrock](/docs/libraries/winglibs/bedrock) | v0.1.2 | A Wing library for Amazon Bedrock | [sim](/docs/platforms/sim), [tf-aws](/docs/platforms/AWS/tf-aws) |
| [AWS Budget](/docs/libraries/winglibs/budget) | [@winglibs/budget](/docs/libraries/winglibs/budget) | v0.1.7 | A Wing library for working with [AWS Budgets] | [sim](/docs/platforms/sim), [tf-aws](/docs/platforms/AWS/tf-aws) |
| [Cloud checks](/docs/libraries/winglibs/checks) | [@winglibs/checks](/docs/libraries/winglibs/checks) | v0.0.18 | A self-validation mechanism for cloud applications | [*](/docs/platforms/platforms) |
| [cloudv2](/docs/libraries/winglibs/cloudv2) | [@winglibs/cloudv2](/docs/libraries/winglibs/cloudv2) | v0.1.2 | Standard cloud library for Wing | [sim](/docs/platforms/sim), [tf-aws](/docs/platforms/AWS/tf-aws) |
| [Amazon Cognito](/docs/libraries/winglibs/cognito) | [@winglibs/cognito](/docs/libraries/winglibs/cognito) | v0.0.14 | A wing library to work with Amazon Cognito | [sim](/docs/platforms/sim), [tf-aws](/docs/platforms/AWS/tf-aws) |
| [Containers](/docs/libraries/winglibs/containers) | [@winglibs/containers](/docs/libraries/winglibs/containers) | v0.1.6 | Deploy containers with Wing | [sim](/docs/platforms/sim), [tf-aws](/docs/platforms/AWS/tf-aws) |
| [Amazon DynamoDB](/docs/libraries/winglibs/dynamodb) | [@winglibs/dynamodb](/docs/libraries/winglibs/dynamodb) | v0.3.0 | A Wing library for Amazon DynamoDB | [sim](/docs/platforms/sim), [tf-aws](/docs/platforms/AWS/tf-aws) |
| [Email](/docs/libraries/winglibs/email) | [@winglibs/email](/docs/libraries/winglibs/email) | v0.0.1 | A wing library for sending emails | [sim](/docs/platforms/sim), [tf-aws](/docs/platforms/AWS/tf-aws) |
| [Amazon EventBridge](/docs/libraries/winglibs/eventbridge) | [@winglibs/eventbridge](/docs/libraries/winglibs/eventbridge) | v0.1.8 | A Wing library for working with Amazon EventBridge | [sim](/docs/platforms/sim), [tf-aws](/docs/platforms/AWS/tf-aws), [awscdk](/docs/platforms/AWS/awscdk) |
| [FIFO Queue](/docs/libraries/winglibs/fifoqueue) | [@winglibs/fifoqueue](/docs/libraries/winglibs/fifoqueue) | v0.0.12 | A wing library to work with FIFO (first-in first-out) Queues | [sim](/docs/platforms/sim), [tf-aws](/docs/platforms/AWS/tf-aws) |
| [GitHub](/docs/libraries/winglibs/github) | [@winglibs/github](/docs/libraries/winglibs/github) | v0.0.16 | A wing library to work with GitHub Probot | [*](/docs/platforms/platforms) |
| [JWT authentication](/docs/libraries/winglibs/jwt) | [@winglibs/jwt](/docs/libraries/winglibs/jwt) | v0.0.9 | Wing library for JWT authentication | [*](/docs/platforms/platforms) |
| [Kubernetes (k8s)](/docs/libraries/winglibs/k8s) | [@winglibs/k8s](/docs/libraries/winglibs/k8s) | v0.0.10 | Wing for Kubernetes | k8s |
| [Lock](/docs/libraries/winglibs/lock) | [@winglibs/lock](/docs/libraries/winglibs/lock) | v0.0.8 | Wing library for cloud lock | [*](/docs/platforms/platforms) |
| [Message Fanout](/docs/libraries/winglibs/messagefanout) | [@winglibs/messagefanout](/docs/libraries/winglibs/messagefanout) | v0.0.9 | Wing library to fan out messages | [sim](/docs/platforms/sim), [tf-aws](/docs/platforms/AWS/tf-aws) |
| [Momento](/docs/libraries/winglibs/momento) | [@winglibs/momento](/docs/libraries/winglibs/momento) | v0.0.6 | Wing library for [momento](https://www.gomomento.com/) | [sim](/docs/platforms/sim), [tf-aws](/docs/platforms/AWS/tf-aws), [tf-gcp](/docs/platforms/google-cloud/tf-gcp), [tf-azure](/docs/platforms/microsoft-azure/tf-azure) |
| [ngrok](/docs/libraries/winglibs/ngrok) | [@winglibs/ngrok](/docs/libraries/winglibs/ngrok) | v0.0.11 | Wing library for [ngrok](https://ngrok.com/). Create local tunnels to Wing endpoints. | [*](/docs/platforms/platforms) |
| [OpenAI](/docs/libraries/winglibs/openai) | [@winglibs/openai](/docs/libraries/winglibs/openai) | v0.0.9 | Wing library for [OpenAI](https://openai.com/) | [*](/docs/platforms/platforms) |
| [Postgres](/docs/libraries/winglibs/postgres) | [@winglibs/postgres](/docs/libraries/winglibs/postgres) | v0.1.13 | Wing library for [Postgres](https://www.postgresql.org/) | [sim](/docs/platforms/sim), [tf-aws](/docs/platforms/AWS/tf-aws) |
| [Python](/docs/libraries/winglibs/python) | [@winglibs/python](/docs/libraries/winglibs/python) | v0.1.4 | A Wing library for running [Python](https://www.python.org/) code in [inflight](https://www.winglang.io/docs/concepts/inflights#inflight-code). | [sim](/docs/platforms/sim), [tf-aws](/docs/platforms/AWS/tf-aws) |
| [React](/docs/libraries/winglibs/react) | [@winglibs/react](/docs/libraries/winglibs/react) | v0.1.6 | A Wing library for [React](https://react.dev/) | [sim](/docs/platforms/sim), [tf-aws](/docs/platforms/AWS/tf-aws) |
| [Redis](/docs/libraries/winglibs/redis) | [@winglibs/redis](/docs/libraries/winglibs/redis) | v0.0.13 | A Wing library for [Redis](https://redis.io/) ([Example](https://www.winglang.io/docs/examples/redis)) | [sim](/docs/platforms/sim) |
| [Amazon SageMaker](/docs/libraries/winglibs/sagemaker) | [@winglibs/sagemaker](/docs/libraries/winglibs/sagemaker) | v0.0.10 | The library enables owners of a trained sagemaker model, to access its Endpoints from a winglang [inflight](https://www.winglang.io/docs/concepts/inflights#inflight-code) code. | [sim](/docs/platforms/sim), [tf-aws](/docs/platforms/AWS/tf-aws) |
| [Amazon SES](/docs/libraries/winglibs/ses) | [@winglibs/ses](/docs/libraries/winglibs/ses) | v0.0.8 | Wing library for interacting with Amazon SES. | [sim](/docs/platforms/sim), [tf-aws](/docs/platforms/AWS/tf-aws) |
| [Wing simulator utils](/docs/libraries/winglibs/simtools) | [@winglibs/simtools](/docs/libraries/winglibs/simtools) | v0.0.6 | '[Wing simulator](https://www.winglang.io/docs/platforms/sim) utility library' | [sim](/docs/platforms/sim) |
| [Slack](/docs/libraries/winglibs/slack) | [@winglibs/slack](/docs/libraries/winglibs/slack) | v0.1.5 | A Wing library for working with [Slack](https://slack.com/) | [sim](/docs/platforms/sim), [tf-aws](/docs/platforms/AWS/tf-aws) |
| [Amazon SNS](/docs/libraries/winglibs/sns) | [@winglibs/sns](/docs/libraries/winglibs/sns) | v0.1.7 | A Wing library for working with [Amazon SNS](https://aws.amazon.com/sns/) | [tf-aws](/docs/platforms/AWS/tf-aws), [awscdk](/docs/platforms/AWS/awscdk), [sim](/docs/platforms/sim) |
| [Terraform utilities](/docs/libraries/winglibs/tf) | [@winglibs/tf](/docs/libraries/winglibs/tf) | v0.1.0 | Terraform utilities library for Wing | [sim](/docs/platforms/sim), [tf-aws](/docs/platforms/AWS/tf-aws) |
| [tsoa](/docs/libraries/winglibs/tsoa) | [@winglibs/tsoa](/docs/libraries/winglibs/tsoa) | v0.1.16 | A Wing library for working with [TSOA](https://tsoa-community.github.io/docs/) - An OpenAPI-compliant Web APIs using TypeScript. | [sim](/docs/platforms/sim) |
| [Vite](/docs/libraries/winglibs/vite) | [@winglibs/vite](/docs/libraries/winglibs/vite) | v0.2.5 | A Wing library to deploy [Vite applications](https://vitejs.dev/) to the cloud. | [sim](/docs/platforms/sim), [tf-aws](/docs/platforms/AWS/tf-aws) |
| [WebSocket](/docs/libraries/winglibs/websockets) | [@winglibs/websockets](/docs/libraries/winglibs/websockets) | v0.3.13 | A Wing library that enables you to create WebSockets using Wing. | [sim](/docs/platforms/sim), [tf-aws](/docs/platforms/AWS/tf-aws), [awscdk](/docs/platforms/AWS/awscdk) |

## Contributing to winglibs

Want to contribute your own winglib to this list? Check out the [contributing guide](https://github.com/winglang/winglibs?tab=readme-ov-file#how-do-i-add-a-new-library) for more information.


Loading