diff --git a/packages/docs/src/routes/docs/(qwikcity)/action/index.mdx b/packages/docs/src/routes/docs/(qwikcity)/action/index.mdx index d2c3b7ba71d..e4ed5725ae8 100644 --- a/packages/docs/src/routes/docs/(qwikcity)/action/index.mdx +++ b/packages/docs/src/routes/docs/(qwikcity)/action/index.mdx @@ -1,5 +1,6 @@ --- title: RouteAction$ | QwikCity +description: Learn about actions in QwikCity, allowing form submissions, and performing side effects such as writing to a database or sending an email. contributors: - manucorporat - cunzaizhuyi diff --git a/packages/docs/src/routes/docs/(qwikcity)/advanced/complex-forms/index.mdx b/packages/docs/src/routes/docs/(qwikcity)/advanced/complex-forms/index.mdx index 551a4b4ab9e..72a729e0e26 100644 --- a/packages/docs/src/routes/docs/(qwikcity)/advanced/complex-forms/index.mdx +++ b/packages/docs/src/routes/docs/(qwikcity)/advanced/complex-forms/index.mdx @@ -1,7 +1,9 @@ --- title: Complex Forms | Advanced +description: Learn how to create complex forms with arrays and objects. contributors: - ulic75 + - hamatoyogi --- # Complex Forms diff --git a/packages/docs/src/routes/docs/(qwikcity)/advanced/content-security-policy/index.mdx b/packages/docs/src/routes/docs/(qwikcity)/advanced/content-security-policy/index.mdx index 3cda9d574ea..d41a058acf5 100644 --- a/packages/docs/src/routes/docs/(qwikcity)/advanced/content-security-policy/index.mdx +++ b/packages/docs/src/routes/docs/(qwikcity)/advanced/content-security-policy/index.mdx @@ -1,8 +1,10 @@ --- title: Content Security Policy | Advanced +description: Learn how to create a content security policy (CSP) to keep your Qwik app safe. contributors: - tzdesign - jordanw66 + - hamatoyogi --- # Content Security Policy diff --git a/packages/docs/src/routes/docs/(qwikcity)/advanced/menu/index.mdx b/packages/docs/src/routes/docs/(qwikcity)/advanced/menu/index.mdx index 5a0f64ff6c3..53f469297b6 100644 --- a/packages/docs/src/routes/docs/(qwikcity)/advanced/menu/index.mdx +++ b/packages/docs/src/routes/docs/(qwikcity)/advanced/menu/index.mdx @@ -1,5 +1,6 @@ --- title: Menu | Advanced +description: How to use menus to define site navigation. contributors: - manucorporat - adamdbradley @@ -10,6 +11,7 @@ contributors: - jakovljevic-mladen - cunzaizhuyi - AnthonyPAlicea + - hamatoyogi --- # Menu diff --git a/packages/docs/src/routes/docs/(qwikcity)/advanced/request-handling/index.mdx b/packages/docs/src/routes/docs/(qwikcity)/advanced/request-handling/index.mdx index f0313c76341..eca49b90df9 100644 --- a/packages/docs/src/routes/docs/(qwikcity)/advanced/request-handling/index.mdx +++ b/packages/docs/src/routes/docs/(qwikcity)/advanced/request-handling/index.mdx @@ -1,26 +1,28 @@ --- title: Request Handling | Advanced +description: How to handle requests in Qwik City, including REST endpoints, and middlewares. contributors: - adamdbradley - manucorporat - mhevery + - hamatoyogi --- # Request handling Each `layout.ts` and `index.ts` file inside the `src/routes` directory has the ability to access the current HTTP request, response, and URL. This allows you to retrieve and modify data, and even respond with custom content. -Qwik City implements a middleware system based on the hirarchy of the `src/routes` directory. The middleware system is used to handle HTTP requests and responses and is available to pages, layouts, and [endpoints](/docs/(qwikcity)/middleware/index.mdx). +Qwik City implements a middleware system based on the hirarchy of the `src/routes` directory. The middleware system is used to handle HTTP requests and responses and is available to pages, layouts, and [endpoints](/docs/(qwikcity)/endpoints/index.mdx). -Each route can add HTTP request and response handlers, allowing developers to retrieve and modify data. The handlers can also be used by [endpoints](/docs/(qwikcity)/middleware/index.mdx), which only respond with data rather than a page's HTML. +Each route can add HTTP request and response handlers, allowing developers to retrieve and modify data. The handlers can also be used by [endpoints](/docs/(qwikcity)/endpoints/index.mdx), which only respond with data rather than a page's HTML. This feature enables you to handle any request event, have side effects on the request pipeline, just before you render the component and respond with custom content. It is available to pages, layouts and endpoint routes, but not on regular components. ## Request and Response Handlers -On pages, layouts, and [endpoints](/docs/(qwikcity)/middleware/index.mdx), we can access request data by implementing request handler functions such as `onGet`, `onPost`, `onPut`, etc. These functions are executed according to the [HTTP method](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods) used for this route. +On pages, layouts, and [endpoints](/docs/(qwikcity)/endpoints/index.mdx), we can access request data by implementing request handler functions such as `onGet`, `onPost`, `onPut`, etc. These functions are executed according to the [HTTP method](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods) used for this route. -Additionally, an `onRequest` function can be used to handle any request method, rather than a specific one. For example, if both `onGet` and `onRequest` is provided, for a `GET` request, the `onGet` will be called. However, in this scenario, if a `POST` request method came in, then the `onRequest` handler would be called since an `onPost` was not provided. +Additionally, an `onRequest` function can be used to handle any request method, rather than a specific one, in the form of a [middleware](/docs/(qwikcity)/middleware/index.mdx). For example, if both `onGet` and `onRequest` is provided, for a `GET` request, the `onGet` will be called. However, in this scenario, if a `POST` request method came in, then the `onRequest` handler would be called since an `onPost` was not provided. The `onRequest` is available as a catch-all to any request methods that do not have a specific method. ```tsx diff --git a/packages/docs/src/routes/docs/(qwikcity)/advanced/routing/index.mdx b/packages/docs/src/routes/docs/(qwikcity)/advanced/routing/index.mdx index 3c8eb571e29..48dcddd21d7 100644 --- a/packages/docs/src/routes/docs/(qwikcity)/advanced/routing/index.mdx +++ b/packages/docs/src/routes/docs/(qwikcity)/advanced/routing/index.mdx @@ -1,4 +1,6 @@ --- +title: Advanced Routing | Qwik City +description: Learn about advanced routing in Qwik City, including 404 page handling, grouped layouts, named layouts, nested layouts, and plugin.ts files. contributors: - manucorporat - adamdbradley @@ -6,6 +8,7 @@ contributors: - the-r3aper7 - mhevery - jakovljevic-mladen + - hamatoyogi --- # Advanced Routing diff --git a/packages/docs/src/routes/docs/(qwikcity)/advanced/sitemaps/index.mdx b/packages/docs/src/routes/docs/(qwikcity)/advanced/sitemaps/index.mdx index 3576cfe3ca4..1f9bd61483a 100644 --- a/packages/docs/src/routes/docs/(qwikcity)/advanced/sitemaps/index.mdx +++ b/packages/docs/src/routes/docs/(qwikcity)/advanced/sitemaps/index.mdx @@ -1,7 +1,9 @@ --- title: Generating Sitemaps | Advanced +description: Learn how to generate a sitemap for your site in Qwik City. contributors: - adamdbradley + - hamatoyogi --- # Generating Sitemaps diff --git a/packages/docs/src/routes/docs/(qwikcity)/advanced/speculative-module-fetching/index.mdx b/packages/docs/src/routes/docs/(qwikcity)/advanced/speculative-module-fetching/index.mdx index 66c63a79be8..e01b718f4e6 100644 --- a/packages/docs/src/routes/docs/(qwikcity)/advanced/speculative-module-fetching/index.mdx +++ b/packages/docs/src/routes/docs/(qwikcity)/advanced/speculative-module-fetching/index.mdx @@ -1,5 +1,6 @@ --- title: Speculative Module Fetching | Advanced +description: Learn how Qwik handles loading bundles in the background and filling the cache with Speculative Module Fetching. contributors: - ulic75 - mhevery diff --git a/packages/docs/src/routes/docs/(qwikcity)/advanced/static-assets/index.mdx b/packages/docs/src/routes/docs/(qwikcity)/advanced/static-assets/index.mdx index 5573c2b1e93..f71a17c2c2a 100644 --- a/packages/docs/src/routes/docs/(qwikcity)/advanced/static-assets/index.mdx +++ b/packages/docs/src/routes/docs/(qwikcity)/advanced/static-assets/index.mdx @@ -1,11 +1,13 @@ --- title: Static Assets | Advanced +description: How to serve static assets in your Qwik app. contributors: - manucorporat - Oyemade - mhevery - adamdbradley - the-r3aper7 + - hamatoyogi --- # Static Assets diff --git a/packages/docs/src/routes/docs/(qwikcity)/api/index.mdx b/packages/docs/src/routes/docs/(qwikcity)/api/index.mdx index 705fd1c2551..b128f394973 100644 --- a/packages/docs/src/routes/docs/(qwikcity)/api/index.mdx +++ b/packages/docs/src/routes/docs/(qwikcity)/api/index.mdx @@ -1,5 +1,6 @@ --- -title: API reference | QwikCity +title: API reference | Qwik City +description: Qwik City API reference. contributors: - manucorporat - adamdbradley @@ -14,6 +15,7 @@ contributors: - Mhmdrza - ulic75 - mhevery + - hamatoyogi --- # API reference diff --git a/packages/docs/src/routes/docs/(qwikcity)/caching/index.mdx b/packages/docs/src/routes/docs/(qwikcity)/caching/index.mdx index 322cc5908d2..54ee9cfb638 100644 --- a/packages/docs/src/routes/docs/(qwikcity)/caching/index.mdx +++ b/packages/docs/src/routes/docs/(qwikcity)/caching/index.mdx @@ -1,9 +1,11 @@ --- -title: Caching | QwikCity +title: Caching | Qwik City +description: Learn how to handle caching in your Qwik City app to keep your site as fast as possible. contributors: - steve8708 - harishkrishnan24 - maiieul + - hamatoyogi --- # Caching Responses diff --git a/packages/docs/src/routes/docs/(qwikcity)/endpoints/index.mdx b/packages/docs/src/routes/docs/(qwikcity)/endpoints/index.mdx index accf3cd8269..f1aaa4cf92b 100644 --- a/packages/docs/src/routes/docs/(qwikcity)/endpoints/index.mdx +++ b/packages/docs/src/routes/docs/(qwikcity)/endpoints/index.mdx @@ -1,5 +1,6 @@ --- -title: Endpoints | QwikCity +title: Endpoints | Qwik City +description: Endpoints are middleware functions used to control and return data in various formats like RESTful API, GraphQL API, JSON, XML, reverse proxy, or other API types. contributors: - adamdbradley - manucorporat diff --git a/packages/docs/src/routes/docs/(qwikcity)/env-variables/index.mdx b/packages/docs/src/routes/docs/(qwikcity)/env-variables/index.mdx index c2d023eb700..2bebcaaed45 100644 --- a/packages/docs/src/routes/docs/(qwikcity)/env-variables/index.mdx +++ b/packages/docs/src/routes/docs/(qwikcity)/env-variables/index.mdx @@ -1,5 +1,6 @@ --- -title: Environment variables | QwikCity +title: Environment variables | Qwik City +description: Qwik apps can read environment variables in two main ways build-time variables and server-side variables. contributors: - manucorporat - the-r3aper7