Skip to content

Commit

Permalink
docs: update home content
Browse files Browse the repository at this point in the history
  • Loading branch information
Romakita committed Dec 1, 2024
1 parent 613150c commit 22659f4
Show file tree
Hide file tree
Showing 33 changed files with 358 additions and 170 deletions.
2 changes: 1 addition & 1 deletion docs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ api
.vitepress/cache
.vitepress/dist
public/api.json
public/reference-sidebar.json

# Yarn
.pnp.*
Expand All @@ -13,4 +14,3 @@ public/api.json
!.yarn/cache
!.yarn/sdks
!.yarn/versions

9 changes: 5 additions & 4 deletions docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import {apiAnchor} from "@tsed/vitepress-theme/markdown/api-anchor/api-anchor.js";
import {defineConfig} from "vitepress";
import pkg from "../../package.json";
import {getSidebar} from "./api.js";
import referenceSidebar from "../public/reference-sidebar.json"
import team from "../team.json"


// https://vitepress.dev/reference/site-config
export default defineConfig({
title: "Ts.ED",
lastUpdated: true,

description: "Ts.ED is a modern Node.js framework built with TypeScript. It offers a flexible structure with a fast learning curve, specifically designed to improve the developer experience. Ts.ED provides numerous decorators and guidelines to make your code more readable and less error-prone. It supports various platforms and tools, including Node.js/Bun.js, Express.js/Koa.js, CLI, and serverless architectures (e.g., AWS).",
sitemap: {
hostname: "https://tsed.io"
},
Expand All @@ -33,6 +34,7 @@ export default defineConfig({
logo: "/tsed.svg",
siteTitle: false,
apiUrl: "/api.json",
team,
apiRedirectUrl: "",
repo: "tsedio/tsed",
githubProxyUrl: "https://api.tsed.io/rest/github/tsedio/tsed",
Expand Down Expand Up @@ -560,8 +562,7 @@ export default defineConfig({
].sort((a, b) => a.text.localeCompare(b.text))
}
],

"/api/": getSidebar()
"/api/": referenceSidebar
},
socialLinks: [
{icon: "github", link: "https://github.com/tsedio/tsed"},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {mapApiReferences} from "@tsed/vitepress-theme/composables/api/mappers/mapApiReferences.js";
import api from "../public/api.json";
import api from "../../public/api.json" with { type: "json" };
import {writeFile} from "node:fs/promises";

const IS_CORES = /core|@tsed\/di|hooks|schema$|\/exceptions$|engines|json-mapper|open-spec/;
const IS_PLATFORM = /platform/;
Expand Down Expand Up @@ -31,7 +32,7 @@ export function getSidebar() {
platformModules.push(item);
} else if (IS_ORM.test(module)) {
ormModules.push(item);
}else {
} else {
thirdParties.push(item);
}
});
Expand All @@ -56,3 +57,5 @@ export function getSidebar() {
];
}


await writeFile(import.meta.dirname + "/../../public/reference-sidebar.json", JSON.stringify(getSidebar(), null, 2));
12 changes: 6 additions & 6 deletions docs/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// https://vitepress.dev/guide/custom-theme
import {DefaultTheme} from "@tsed/vitepress-theme";
import type {Theme} from "vitepress";
import {h} from "vue";
import HomeBanner from "@tsed/vitepress-theme/organisms/home/HomeBanner.vue";
import HomePartners from "@tsed/vitepress-theme/organisms/home/HomePartners.vue";
import HomeBody from "@tsed/vitepress-theme/organisms/home/HomeBody.vue";
import HomeTabsTerminal from "@tsed/vitepress-theme/organisms/home/terminal/HomeTabsTerminal.vue";
import HomeTabTerminalBun from "@tsed/vitepress-theme/organisms/home/terminal/HomeTabTerminalBun.vue";
import HomeTabTerminalNpm from "@tsed/vitepress-theme/organisms/home/terminal/HomeTabTerminalNpm.vue";
import HomeTabTerminalYarn from "@tsed/vitepress-theme/organisms/home/terminal/HomeTabTerminalYarn.vue";
import HomeTabTerminalPnpm from "@tsed/vitepress-theme/organisms/home/terminal/HomeTabTerminalPnpm.vue";
import HomeTabTerminalBun from "@tsed/vitepress-theme/organisms/home/terminal/HomeTabTerminalBun.vue";
import HomeTabTerminalYarn from "@tsed/vitepress-theme/organisms/home/terminal/HomeTabTerminalYarn.vue";
import HomeBeforeFeatures from "@tsed/vitepress-theme/organisms/home/HomeBeforeFeatures.vue";
import type {Theme} from "vitepress";
import {h} from "vue";
import "./style.css";

export default {
Expand All @@ -26,7 +26,7 @@ export default {
bun: () => h(HomeTabTerminalBun)
})
}),
"home-features-before": () => h(HomePartners),
"home-features-before": () => h(HomeBeforeFeatures),
"home-features-after": () => h(HomeBody)
});
}
Expand Down
4 changes: 4 additions & 0 deletions docs/.vitepress/theme/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@
padding-right: 0;
}


.box a {
color: var(--vp-c-brand-1);
}
12 changes: 7 additions & 5 deletions docs/api.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
---
layout: page
sidebar: false
meta:
- name: description
content: Api Reference of Ts.ED. Use decorator to build your model and map data.
- name: keywords
content: api reference model decorators ts.ed express typescript node.js javascript jsonschema json mapper serialization deserialization
head:
- - meta
- name: description
content: Api Reference of Ts.ED. Use decorator to build your model and map data.
- - meta
- name: keywords
content: api reference model decorators ts.ed express typescript node.js javascript jsonschema json mapper serialization deserialization
---

<script setup>
Expand Down
12 changes: 7 additions & 5 deletions docs/docs/authentication.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
---
meta:
- name: description
content: Authentication configuration
- name: keywords
content: ts.ed express typescript auth node.js javascript decorators
head:
- - meta
- name: description
content: Authentication configuration
- - meta
- name: keywords
content: ts.ed express typescript auth node.js javascript decorators
---

# Authentication
Expand Down
12 changes: 7 additions & 5 deletions docs/docs/cache.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
---
meta:
- name: description
content: Documentation over Cache management provided by Ts.ED framework. Use decorator to cache Response or returned value by a service.
- name: keywords
content: cache ts.ed express koa typescript node.js javascript decorators cache-manager class controller service
head:
- - meta
- name: description
content: Documentation over Cache management provided by Ts.ED framework. Use decorator to cache Response or returned value by a service.
- - meta
- name: keywords
content: cache ts.ed express koa typescript node.js javascript decorators cache-manager class controller service
---

# Cache
Expand Down
12 changes: 7 additions & 5 deletions docs/docs/command.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
---
meta:
- name: description
content: Documentation over Command provided by Ts.ED framework. Use commands to build your CLI API.
- name: keywords
content: command ts.ed commander inquirer typescript node.js javascript decorators jsonschema class models
head:
- - meta
- name: description
content: Documentation over Command provided by Ts.ED framework. Use commands to build your CLI API.
- - meta
- name: keywords
content: command ts.ed commander inquirer typescript node.js javascript decorators jsonschema class models
---

# Command
Expand Down
12 changes: 7 additions & 5 deletions docs/docs/configuration/index.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
---
meta:
- name: description
content: Documentation over the server configuration. Ts.ED is built on top of Express/Koa and use TypeScript language.
- name: keywords
content: configuration ts.ed express typescript node.js javascript decorators mvc class models
head:
- - meta
- name: description
content: Documentation over the server configuration. Ts.ED is built on top of Express/Koa and use TypeScript language.
- - meta
- name: keywords
content: configuration ts.ed express typescript node.js javascript decorators mvc class models
---

# Configuration
Expand Down
12 changes: 7 additions & 5 deletions docs/docs/controllers.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
---
meta:
- name: description
content: Documentation over Controllers provided by Ts.ED framework. Use controllers to build your REST API.
- name: keywords
content: controllers ts.ed express typescript node.js javascript decorators jsonschema class models
head:
- - meta
- name: description
content: Documentation over Controllers provided by Ts.ED framework. Use controllers to build your REST API.
- - meta
- name: keywords
content: controllers ts.ed express typescript node.js javascript decorators jsonschema class models
---

# Controllers
Expand Down
12 changes: 7 additions & 5 deletions docs/docs/exceptions.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
---
meta:
- name: description
content: Documentation over Http Exceptions provided by Ts.ED framework. Use class to throw a standard Http error.
- name: keywords
content: http exceptions ts.ed express typescript node.js javascript decorators jsonschema class models
head:
- - meta
- name: description
content: Documentation over Http Exceptions provided by Ts.ED framework. Use class to throw a standard Http error.
- - meta
- name: keywords
content: http exceptions ts.ed express typescript node.js javascript decorators jsonschema class models
---

# Exceptions
Expand Down
12 changes: 7 additions & 5 deletions docs/docs/json-mapper.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
---
meta:
- name: description
content: Documentation over JsonMapper and decorators provided by Ts.ED framework. Use decorator to build your model and map data.
- name: keywords
content: class model decorators ts.ed express typescript node.js javascript jsonschema json mapper serialization deserialization
head:
- - meta
- name: description
content: Documentation over JsonMapper and decorators provided by Ts.ED framework. Use decorator to build your model and map data.
- - meta
- name: keywords
content: class model decorators ts.ed express typescript node.js javascript jsonschema json mapper serialization deserialization
---

# JsonMapper
Expand Down
12 changes: 7 additions & 5 deletions docs/docs/logger.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
---
meta:
- name: description
content: Documentation over Logger by Ts.ED framework.
- name: keywords
content: logger decorators ts.ed express.js koa.js typescript node.js javascript
head:
- - meta
- name: description
content: Documentation over Logger by Ts.ED framework.
- - meta
- name: keywords
content: logger decorators ts.ed express.js koa.js typescript node.js javascript
---

# Logger
Expand Down
12 changes: 7 additions & 5 deletions docs/docs/model.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
---
meta:
- name: description
content: Documentation over Models and decorators provided by Ts.ED framework. Use decorator to build your model and JsonSchema.
- name: keywords
content: class model decorators ts.ed express typescript node.js javascript jsonschema
head:
- - meta
- name: description
content: Documentation over Models and decorators provided by Ts.ED framework. Use decorator to build your model and JsonSchema.
- - meta
- name: keywords
content: class model decorators ts.ed express typescript node.js javascript jsonschema
---

# Model
Expand Down
12 changes: 7 additions & 5 deletions docs/docs/platform-serverless-http.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
---
meta:
- name: description
content: Guide to deploy your Ts.ED application on AWS.
- name: keywords
content: ts.ed express typescript aws node.js javascript decorators
head:
- - meta
- name: description
content: Guide to deploy your Ts.ED application on AWS.
- - meta
- name: keywords
content: ts.ed express typescript aws node.js javascript decorators
---

# Serverless HTTP
Expand Down
12 changes: 7 additions & 5 deletions docs/docs/platform-serverless.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
---
meta:
- name: description
content: Guide to deploy your Ts.ED application on AWS.
- name: keywords
content: ts.ed express typescript serverless aws function node.js javascript decorators
head:
- - meta
- name: description
content: Guide to deploy your Ts.ED application on AWS.
- - meta
- name: keywords
content: ts.ed express typescript serverless aws function node.js javascript decorators
projects:
- title: Terraform project
href: https://github.com/tsedio/tsed-aws-lambda
Expand Down
12 changes: 7 additions & 5 deletions docs/docs/providers-lazy-loading.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
---
meta:
- name: description
content: Documentation over Providers / DI provided by Ts.ED framework. Use providers to build your backend services.
- name: keywords
content: providers di ioc ts.ed express typescript node.js javascript decorators jsonschema class models
head:
- - meta
- name: description
content: Documentation over Providers / DI provided by Ts.ED framework. Use providers to build your backend services.
- - meta
- name: keywords
content: providers di ioc ts.ed express typescript node.js javascript decorators jsonschema class models
---

# Lazy-loading provider
Expand Down
12 changes: 7 additions & 5 deletions docs/docs/providers.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
---
meta:
- name: description
content: Documentation over Providers / DI provided by Ts.ED framework. Use providers to build your backend services.
- name: keywords
content: providers di ioc ts.ed express typescript node.js javascript decorators jsonschema class models
head:
- - meta
- name: description
content: Documentation over Providers / DI provided by Ts.ED framework. Use providers to build your backend services.
- - meta
- name: keywords
content: providers di ioc ts.ed express typescript node.js javascript decorators jsonschema class models
---

# DI & Providers
Expand Down
12 changes: 7 additions & 5 deletions docs/docs/response-filter.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
---
meta:
- name: description
content: Documentation over response filters provided by Ts.ED framework. Use class to transform data before returning it to your consumer.
- name: keywords
content: response filter ts.ed express typescript node.js javascript decorators jsonschema class models
head:
- - meta
- name: description
content: Documentation over response filters provided by Ts.ED framework. Use class to transform data before returning it to your consumer.
- - meta
- name: keywords
content: response filter ts.ed express typescript node.js javascript decorators jsonschema class models
---

# Response Filter
Expand Down
12 changes: 7 additions & 5 deletions docs/docs/serve-files.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
---
meta:
- name: description
content: Serve statics files with Ts.ED by using decorators. Ts.ED is built on top of Express/Koa and use TypeScript language.
- name: keywords
content: ts.ed express typescript statics files node.js javascript decorators
head:
- - meta
- name: description
content: Serve statics files with Ts.ED by using decorators. Ts.ED is built on top of Express/Koa and use TypeScript language.
- - meta
- name: keywords
content: ts.ed express typescript statics files node.js javascript decorators
---

# Serve files
Expand Down
Loading

0 comments on commit 22659f4

Please sign in to comment.