From 7e276cf9e5ae7882cbd8c9f0d7a1dcbcb5407f2b Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Fri, 15 Jan 2021 12:30:23 +0100 Subject: [PATCH] Improve navigation integration of tutorial series See #118 --- docs/migration/wsc31/form-builder.md | 2 +- docs/tutorial/series/overview.md | 6 +++--- docs/tutorial/series/{part-1.md => part_1.md} | 0 docs/tutorial/series/{part-2.md => part_2.md} | 4 ++-- docs/tutorial/series/{part-3.md => part_3.md} | 6 +++--- mkdocs.yml | 6 +++++- 6 files changed, 14 insertions(+), 10 deletions(-) rename docs/tutorial/series/{part-1.md => part_1.md} (100%) rename docs/tutorial/series/{part-2.md => part_2.md} (98%) rename docs/tutorial/series/{part-3.md => part_3.md} (98%) diff --git a/docs/migration/wsc31/form-builder.md b/docs/migration/wsc31/form-builder.md index a8863687..ab828b65 100644 --- a/docs/migration/wsc31/form-builder.md +++ b/docs/migration/wsc31/form-builder.md @@ -2,7 +2,7 @@ ## Example: Two Text Form Fields -As the first example, the pre-WoltLab Suite Core 5.2 versions of the forms to add and edit persons from the [first part of the tutorial series](../../tutorial/series/part-1.md) will be updated to the new form builder API. +As the first example, the pre-WoltLab Suite Core 5.2 versions of the forms to add and edit persons from the [first part of the tutorial series](../../tutorial/series/part_1.md) will be updated to the new form builder API. This form is the perfect first examples as it is very simple with only two text fields whose only restriction is that they have to be filled out and that their values may not be longer than 255 characters each. As a reminder, here are the two relevant PHP files and the relevant template file: diff --git a/docs/tutorial/series/overview.md b/docs/tutorial/series/overview.md index a3894105..46f98770 100644 --- a/docs/tutorial/series/overview.md +++ b/docs/tutorial/series/overview.md @@ -6,6 +6,6 @@ In this context, "people" does not refer to users registered on the website but We will start this tutorial series by creating a base structure for the package and then continue by adding further features step by step using different APIs. Note that in the context of this example, not every added feature might make perfect sense but the goal of this tutorial is not to create a useful package but to introduce you to WoltLab Suite. -- [Part 1: Base Structure](part-1.md) -- [Part 2: Event Listeners and Template Listeners](part-2.md) -- [Part 3: Person Page and Comments](part-3.md) +- [Part 1: Base Structure](part_1.md) +- [Part 2: Event Listeners and Template Listeners](part_2.md) +- [Part 3: Person Page and Comments](part_3.md) diff --git a/docs/tutorial/series/part-1.md b/docs/tutorial/series/part_1.md similarity index 100% rename from docs/tutorial/series/part-1.md rename to docs/tutorial/series/part_1.md diff --git a/docs/tutorial/series/part-2.md b/docs/tutorial/series/part_2.md similarity index 98% rename from docs/tutorial/series/part-2.md rename to docs/tutorial/series/part_2.md index d6273a32..fe3b5824 100644 --- a/docs/tutorial/series/part-2.md +++ b/docs/tutorial/series/part_2.md @@ -1,6 +1,6 @@ # Part 2: Event Listeners and Template Listeners -In the [first part](part-1.md) of this tutorial series, we have created the base structure of our people management package. +In the [first part](part_1.md) of this tutorial series, we have created the base structure of our people management package. In further parts, we will use the package of the first part as a basis to directly add new features. In order to explain how event listeners and template works, however, we will not directly adding a new feature to the package by altering it in this part, but we will assume that somebody else created the package and that we want to extend it the “correct” way by creating a plugin. @@ -70,7 +70,7 @@ To add the birthday to the model, we need to create an additional database table --8<-- "tutorial/tutorial-series/part-2/install.sql" ``` -If we have a [Person object](part-1.md#person), this new property can be accessed the same way as the `personID` property, the `firstName` property, or the `lastName` property from the base package: `$person->birthday`. +If we have a [Person object](part_1.md#person), this new property can be accessed the same way as the `personID` property, the `firstName` property, or the `lastName` property from the base package: `$person->birthday`. ## Setting Birthday in ACP diff --git a/docs/tutorial/series/part-3.md b/docs/tutorial/series/part_3.md similarity index 98% rename from docs/tutorial/series/part-3.md rename to docs/tutorial/series/part_3.md index 24cf13be..b9138fe9 100644 --- a/docs/tutorial/series/part-3.md +++ b/docs/tutorial/series/part_3.md @@ -6,7 +6,7 @@ To make good use of this new page and introduce a new API of WoltLab Suite, we w ## Package Functionality -In addition to the existing functions from [part 1](part-1.md), the package will provide the following possibilities/functions after this part of the tutorial: +In addition to the existing functions from [part 1](part_1.md), the package will provide the following possibilities/functions after this part of the tutorial: - Details page for each person linked in the front end person list - Comment on people on their respective page (can be disabled per person) @@ -16,12 +16,12 @@ In addition to the existing functions from [part 1](part-1.md), the package will ## Used Components -In addition to the components used in [part 1](part-1.md), we will use the [objectType package installation plugin](../../package/pip/object-type.md), use the [comment API](../../php/api/comments.md), create a [runtime cache](../../php/api/caches_runtime-caches.md), and create a page handler. +In addition to the components used in [part 1](part_1.md), we will use the [objectType package installation plugin](../../package/pip/object-type.md), use the [comment API](../../php/api/comments.md), create a [runtime cache](../../php/api/caches_runtime-caches.md), and create a page handler. ## Package Structure -The complete package will have the following file structure (including the files from [part 1](part-1.md)): +The complete package will have the following file structure (including the files from [part 1](part_1.md)): ``` ├── acpMenu.xml diff --git a/mkdocs.yml b/mkdocs.yml index 4f466f1b..ca616a74 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -85,7 +85,11 @@ nav: - 'Package Components': 'migration/wcf21/package.md' - 'Tutorials': - - 'Tutorial Series': 'tutorial/series/overview.md' + - 'Tutorial Series': + - 'Overview': 'tutorial/series/overview.md' + - 'Part 1': 'tutorial/series/part_1.md' + - 'Part 2': 'tutorial/series/part_2.md' + - 'Part 3': 'tutorial/series/part_3.md' markdown_extensions: - toc: -- 2.20.1