From 6b4996ea708963ac4c385a93a7a4f0b64d50244b Mon Sep 17 00:00:00 2001 From: Maciej Krajowski-Kukiel Date: Wed, 16 Oct 2024 09:45:01 +0200 Subject: [PATCH] add more crosslinks (#1729) * add more crosslinks * fix resourceful link --- .../modules/platformos-modules.liquid | 2 +- .../building-the-ui.liquid | 14 +++---- .../contact-us-tutorial/index.liquid | 37 +++++++------------ 3 files changed, 21 insertions(+), 32 deletions(-) diff --git a/app/views/pages/developer-guide/modules/platformos-modules.liquid b/app/views/pages/developer-guide/modules/platformos-modules.liquid index dc86585bf..2d9d2683a 100644 --- a/app/views/pages/developer-guide/modules/platformos-modules.liquid +++ b/app/views/pages/developer-guide/modules/platformos-modules.liquid @@ -53,7 +53,7 @@ The heart of the framework is the [the pos-module-core](https://github.com/Platf * Encapsulate your business rules in [Commands](https://github.com/Platform-OS/pos-module-core?tab=readme-ov-file#command-workflow) — This makes it easier to write unit-ish tests and to reuse code across your application. * Encapsulate your GraphQL queries in [Query](https://github.com/Platform-OS/pos-module-core?tab=readme-ov-file#queries--accessing-data) object - This makes it easier to re-use the query and allows you to encapsulate additional data processing if needed, provide extra validation for the query parameters, set defaults etc. * Use [Events](https://github.com/Platform-OS/pos-module-core?tab=readme-ov-file#events) to broadcast that something has happened in the system to take additional action asynchronously — Following this pattern will make your code easier to maintain and understand, as well as provide necessary debug information in case the system does not behave as expected. -* Follow [Resourceful route naming convention](resourceful-route-naming-convention) to organize your [Pages](/developer-guide/pages/pages) +* Follow [Resourceful route naming convention](#resourceful-route-naming-convention) to organize your [Pages](/developer-guide/pages/pages) * Use [Status implementation](https://github.com/Platform-OS/pos-module-core?tab=readme-ov-file#status-handling) to keep track of resource's state Whenever you need to change a resource's status (for example, if you have a resource `Article` and would like to have states like `draft` and `published` to decide whether it should be publicly available), you can use this pattern to implement it. Usually, you will want to use it in combination with Events (to notify the system that the state has been changed, such as `article_published`, `order_cancelled`). * Use [pos-module-users](https://github.com/Platform-OS/pos-module-user) module for authentication and authorization — It provides not only a great starting point for registration, sign-in, and password reset features that most applications require nowadays, but also an RBAC implementation that you can extend to your needs. * Use [pos-module-tests](https://github.com/Platform-OS/pos-module-tests) to add unit-ish tests to all your commands, minimizing regression bugs caused by modifying business logic. diff --git a/app/views/pages/get-started/contact-us-tutorial/building-the-ui.liquid b/app/views/pages/get-started/contact-us-tutorial/building-the-ui.liquid index a16061ca6..3c882ac8c 100644 --- a/app/views/pages/get-started/contact-us-tutorial/building-the-ui.liquid +++ b/app/views/pages/get-started/contact-us-tutorial/building-the-ui.liquid @@ -5,14 +5,14 @@ metadata: converter: markdown --- -To implement the _Contact Us_ form, we'll create a homepage with two input fields: `email` and `body`, where users can enter their contact information. +To implement the _Contact Us_ form, we'll create a homepage with two input fields: `email` and `body`, where users can enter their contact information. {% include 'alert/tip', content: 'Creating a homepage is a bit special compared to creating a regular [page](/developer-guide/pages/pages). For detailed documentation, refer to the [Homepage](/developer-guide/pages/pages#homepage) documentation.' %} ## Requirements -* Followed all steps of the [Quick Setup Guide](/get-started/contact-us-tutorial/#quick-setup-guide) for building +* Followed all steps of the [Quick Setup Guide](/get-started/contact-us-tutorial/#quick-setup-guide) for building * HTML knowledge ## Create a directory for pages @@ -57,7 +57,7 @@ You might notice that we used `index.html.liquid` for our homepage file instead ## Using Path to the File as Default Route -The recommended approach for defining routes is to use the file path as the default route. This method uses the name of the file as the path, which enhances user experience and maintainability. +The recommended approach for defining routes is to use the file path as the default route. This method uses the name of the file as the path, which enhances user experience and maintainability. For example, the slug of the file `app/views/pages/index.html.liquid` will automatically default to `/`, making it clear and easy to find that this file represents the homepage. @@ -68,14 +68,14 @@ For example, the slug of the file `app/views/pages/index.html.liquid` will autom ### Exceptions and Advanced Usage -In some cases, such as creating RESTful URLs, you may need to use slugs. For example, to follow RESTful conventions for a `/contacts/create` page, you would use a slug `contacts`. +In some cases, such as creating RESTful URLs, you may need to use slugs. For example, to follow RESTful conventions for a `/contacts/create` page, you would use a slug `contacts`. -For more detailed information on using RESTful URLs, [refer to this guide](https://apiguide.readthedocs.io/en/latest/build_and_publish/use_RESTful_urls.html). +For more detailed information on using RESTful URLs, [refer to this guide](https://apiguide.readthedocs.io/en/latest/build_and_publish/use_RESTful_urls.html). By default, use the file path for clarity and simplicity, but know that slugs are available for more complex routing needs. {% include 'alert/tip', content: ' - The homepage slug is `/`, which will work for + The homepage slug is `/`, which will work for