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: Update documentation #941

Merged
merged 5 commits into from Oct 11, 2020
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
308 changes: 174 additions & 134 deletions docs/.vuepress/config.js
@@ -1,30 +1,30 @@
const title = "Ts.ED - A Node.js and TypeScript Framework on top of Express.";
const description = "A Node.js and TypeScript Framework on top of Express. It provides a lot of decorators and guidelines to write your code.";
const title = "Ts.ED - A Node.js and TypeScript Framework on top of Express/Koa.js.";
const description = "A Node.js and TypeScript Framework on top of Express/Koa.js. It provides a lot of decorators and guidelines to write your code.";
const url = "https://tsed.io";
module.exports = {
title,
description,
serviceWorker: false,
theme: "tsed",
head: [
["link", {canonical: url}],
["link", {rel: "shortcut icon", href: "/favicon.ico", type: "image/x-icon"}],
["link", {rel: "icon", href: "/favicon.ico", type: "apple-touch-icon"}],
["link", {rel: "icon", href: "/apple-touch-icon.png", type: "image/x-icon", sizes: "180x180"}],
["link", {rel: "icon", href: "/favicon-32x32.png", type: "image/png", sizes: "32x32"}],
["link", {rel: "icon", href: "/favicon-16x16.png", type: "image/png", sizes: "16x16"}],
["link", {rel: "manifest", href: "/site.webmanifest"}],
["meta", {property: "og:url", content: url}],
["meta", {property: "og:type", content: "website"}],
["meta", {property: "og:site_name", content: title}],
["meta", {property: "og:title", content: title}],
["meta", {property: "og:description", content: description}],
["meta", {property: "og:image", content: "https://tsed.io/tsed-og.png"}],
["meta", {property: "og:image:width", content: "1024"}],
["meta", {property: "og:image:height", content: "1024"}],
["meta", {name: "twitter:title", content: title}],
["meta", {name: "twitter:description", content: description}],
["meta", {name: "twitter:card", content: "summary"}]
["link", { canonical: url }],
["link", { rel: "shortcut icon", href: "/favicon.ico", type: "image/x-icon" }],
["link", { rel: "icon", href: "/favicon.ico", type: "apple-touch-icon" }],
["link", { rel: "icon", href: "/apple-touch-icon.png", type: "image/x-icon", sizes: "180x180" }],
["link", { rel: "icon", href: "/favicon-32x32.png", type: "image/png", sizes: "32x32" }],
["link", { rel: "icon", href: "/favicon-16x16.png", type: "image/png", sizes: "16x16" }],
["link", { rel: "manifest", href: "/site.webmanifest" }],
["meta", { property: "og:url", content: url }],
["meta", { property: "og:type", content: "website" }],
["meta", { property: "og:site_name", content: title }],
["meta", { property: "og:title", content: title }],
["meta", { property: "og:description", content: description }],
["meta", { property: "og:image", content: "https://tsed.io/tsed-og.png" }],
["meta", { property: "og:image:width", content: "1024" }],
["meta", { property: "og:image:height", content: "1024" }],
["meta", { name: "twitter:title", content: title }],
["meta", { name: "twitter:description", content: description }],
["meta", { name: "twitter:card", content: "summary" }]

// ["script", {
// type: "text/javascript",
Expand All @@ -34,7 +34,7 @@ module.exports = {
],

themeConfig: {
shortTitle: "Ts.ED",
shortTitle: "Ts.ED v6",
version: require("../../package").version,
repo: "TypedProject/tsed",
openCollective: "tsed",
Expand All @@ -45,6 +45,7 @@ module.exports = {
docsDir: "docs",
sidebar: "auto",
api: require("./public/api.json"),
smoothScroll: true,
algolia: {
apiKey: "f8a038207e461aaac0e2fd16403c2b01",
indexName: "ts_ed"
Expand All @@ -64,71 +65,18 @@ module.exports = {
nav: [
{
text: "Getting started",
link: "/getting-started.html",
link: "/getting-started/",
title: `Getting started | ${title}`
},
{
text: "Configuration",
link: "/configuration.html",
link: "/docs/configuration.html",
title: `Configuration | ${title}`
},
{
text: "Docs",
title: `Documentation | ${title}`,
items: [
{
text: "Overview",
items: [
{link: "/docs/controllers.html", text: "Controllers", items: []},
{link: "/docs/providers.html", text: "Providers"},
{link: "/docs/model.html", text: "Models"},
{link: "/docs/converters.html", text: "JsonMapper"},
{link: "/docs/middlewares.html", text: "Middlewares"},
{link: "/docs/pipes.html", text: "Pipes"},
{link: "/docs/interceptors.html", text: "Interceptors"},
{link: "/docs/authentication.html", text: "Authentication"},
{link: "/docs/hooks.html", text: "Hooks"},
{link: "/docs/exceptions.html", text: "Exceptions"},
{link: "/docs/platform-api.html", text: "Platform API"},
]
},
{
text: "Advanced",
items: [
{link: "/docs/request-context.html", text: "Request context"},
{link: "/docs/validation.html", text: "Validation"},
{link: "/docs/injection-scopes.html", text: "Injection scopes"},
{link: "/docs/custom-providers.html", text: "Custom providers"},
{link: "/docs/custom-endpoint-decorators.html", text: "Custom endpoint decorators"},
{link: "/docs/testing.html", text: "Testing"},
{link: "/api.html", text: "Api Reference"}
]
}
]
},
{
text: "Guide",
type: "links",
title: `Guide | ${title}`,
items: [
{link: "/tutorials/", text: "Examples"},
{link: "/tutorials/session.html", text: "Session & cookies"},
{link: "/tutorials/passport.html", text: "Passport.js"},
{link: "/tutorials/typeorm.html", text: "TypeORM"},
{link: "/tutorials/mongoose.html", text: "Mongoose"},
{link: "/tutorials/graphql.html", text: "GraphQL"},
{link: "/tutorials/seq.html", text: "Seq"},
{link: "/tutorials/socket-io.html", text: "Socket.io"},
{link: "/tutorials/swagger.html", text: "Swagger"},
{link: "/tutorials/ajv.html", text: "Validation with AJV"},
{link: "/tutorials/multer.html", text: "Upload files"},
{link: "/tutorials/serve-static-files.html", text: "Serve static files"},
{link: "/tutorials/templating.html", text: "Templating"},
{link: "/tutorials/throw-http-exceptions.html", text: "Throw HTTP exceptions"},
{link: "/tutorials/not-found-page.html", text: "Customize 404"},
{link: "/tutorials/aws.html", text: "AWS project"},
{link: "/tutorials/jest.html", text: "Jest"}
]
text: "Documentation",
link: "/docs/controllers.html",
title: `Documentation | ${title}`
},
{
text: "Versions",
Expand All @@ -144,63 +92,156 @@ module.exports = {
]
}
],
sidebar: {
"/docs/": [
{
title: "Overview",
collapsable: false,
children: [
"controllers",
"providers",
"model",
"converters",
"middlewares",
"pipes",
"interceptors",
"authentication",
"hooks",
"exceptions",
"platform-api"
]
},
{
title: "Advanced",
collapsable: false,
children: [
"request-context",
"validation",
"injection-scopes",
"custom-providers",
"custom-endpoint-decorators",
"testing"
]
}
],
"/tutorials/": [{
title: "Guide",
collapsable: false,
sidebar: [
{
title: "Introduction", // required
path: "/getting-started/",
collapsable: true // optional, defaults to true
},
{
title: "Getting started",
children: [
"",
"session",
"passport",
"typeorm",
"mongoose",
"graphql",
"socket-io",
"seq",
"swagger",
"ajv",
"multer",
"serve-static-files",
"templating",
"throw-http-exceptions",
"not-found-page",
"aws",
"jest"
"/getting-started/start-with-cli",
"/getting-started/start-from-scratch",
"/getting-started/create-your-first-controller"
]
}]
},
},
{
title: "Migration",
collapsable: true,
children: [
"/getting-started/migration-from-v5",
"/getting-started/migrate-from-express",
"/getting-started/migrate-from-koa"
]
},
{
title: "Documentation",
collapsable: true,
children: [
"/docs/configuration",
"/docs/controllers",
"/docs/providers",
"/docs/model",
"/docs/converters",
"/docs/middlewares",
"/docs/pipes",
"/docs/interceptors",
"/docs/authentication",
"/docs/hooks",
"/docs/exceptions",
{ title: "Context", path: "/docs/request-context" },
"/docs/platform-api"
]
},
{
title: "Advanced",
collapsable: true,
children: [
"/docs/validation",
{ title: "Upload files", path: "/docs/upload-files" },
{ title: "Serve files", path: "/docs/serve-files" },
{ title: "Templating", path: "/docs/templating" },
"/docs/injection-scopes",
"/docs/custom-providers",
"/docs/custom-endpoint-decorators",
"/docs/testing",
"/api"
]
},
{
title: "Plugins",
collapsable: true,
children: [
"/tutorials/passport",
"/tutorials/typeorm",
"/tutorials/mongoose",
"/tutorials/graphql",
"/tutorials/socket-io",
{ title: "Seq logger", path: "/tutorials/seq" },
"/tutorials/swagger",
"/tutorials/ajv"
]
},
{
title: "Extras",
children: [
"/tutorials/",
"/tutorials/aws",
"/tutorials/throw-http-exceptions",
"/tutorials/not-found-page",

"/contributing",
"/license"
]
}
],
//
// {
// "/": [
// {
// title: "Getting started",
// collapsable: true,
// children: [
// "getting-started",
// "start-application-from-scratch",
// "create-your-first-controller"
// ]
// },
// {
// title: "Migration",
// collapsable: true,
// children: [
// "migration-from-v5",
// "migrate-from-express",
// "migrate-from-koa"
// ]
// },
// {
// title: "Documentation",
// collapsable: true,
// children: [
// "configuration",
// "controllers",
// "providers",
// "model",
// "converters",
// "middlewares",
// "pipes",
// "interceptors",
// "authentication",
// "hooks",
// "exceptions",
// "platform-api"
// ]
// },
//
// {
// title: "Plugins",
// collapsable: false,
// children: [
// "passport",
// "typeorm",
// "mongoose",
// "graphql",
// "socket-io",
// "seq",
// "swagger",
// "ajv",
// "multer"
// ]
// },
// {
// title: "Extras",
// collapsable: true,
// children: [
// "",
// "throw-http-exceptions",
// "aws"
// ]
// }
// ]
// },
otherTopics: [
"/tutorials/session",
"/tutorials/passport",
Expand All @@ -216,7 +257,6 @@ module.exports = {
"/tutorials/throw-http-exceptions",
"/tutorials/not-found-page",
"/tutorials/aws",
"/tutorials/jest",
"/tutorials/seq",
"/docs/controllers",
"/docs/providers",
Expand Down