]> BookStack Code Mirror - website/commitdiff
Added tags page to user docs
authorDan Brown <redacted>
Tue, 14 May 2024 18:14:20 +0000 (19:14 +0100)
committerDan Brown <redacted>
Tue, 14 May 2024 18:14:20 +0000 (19:14 +0100)
Closes #185

content/docs/user/roles-and-permissions.md
content/docs/user/tags.md [new file with mode: 0644]
static/images/docs/user/tags-edit.png [new file with mode: 0644]
static/images/docs/user/tags-list.png [new file with mode: 0644]
static/images/docs/user/tags-overview.png [new file with mode: 0644]
static/images/docs/user/tags-page-edit.png [new file with mode: 0644]
themes/bookstack/layouts/partials/menu_user_docs.html

index b7586cff883c89e863cae20505deb3decf5a6783..73a0087d1e6864c795144f9950c8ca80c93d5414 100644 (file)
@@ -7,6 +7,8 @@ slug = "roles-and-permissions"
 
 Within BookStack the abilities of a user are controlled by the roles assigned to them and the permissions provided to those roles. A user can be assigned multiple roles, in which case the permissions will stack and the user will receive any ability if any of the roles is provided that specific ability.
 
 
 Within BookStack the abilities of a user are controlled by the roles assigned to them and the permissions provided to those roles. A user can be assigned multiple roles, in which case the permissions will stack and the user will receive any ability if any of the roles is provided that specific ability.
 
+{{<toc>}}
+
 ### Managing Roles
 
 Roles can be created and edited by an admin user by navigating to "Settings > Roles" within the BookStack interface. A set of default roles are provided in a fresh BookStack instance for common use cases.
 ### Managing Roles
 
 Roles can be created and edited by an admin user by navigating to "Settings > Roles" within the BookStack interface. A set of default roles are provided in a fresh BookStack instance for common use cases.
diff --git a/content/docs/user/tags.md b/content/docs/user/tags.md
new file mode 100644 (file)
index 0000000..9077b26
--- /dev/null
@@ -0,0 +1,110 @@
++++
+title = "Content Tags"
+date = "2024-05-14"
+type = "user-doc"
+slug = "tags"
++++
+
+While BookStack has a hierarchy at the center of the platform to organise content, 
+you can sometimes desire an extra dimension of categorisation for content.
+Tags in BookStack offer this in a flexible manner, where a tag can represent a category
+and value across all levels & parts of the hierarchy.
+
+{{<toc>}}
+
+### Tag Format
+
+Tags in BookStack have a name, but can also optionally have a value. This allows
+detailed & categorised levels of tagging where required for a mixed range of use-cases.
+
+![Three tags applied to content. A "Reviewed At" tag with value "20240611". A "Admin Books" tag with no value. A "Category" tag with value "Team planning"](/images/docs/user/tags-list.png)
+
+For example, you could use a tag named `Critical` with no value to mark important high priority pages.
+Alternatively, if you have a range of priorities, you could use a tag named `Priority` with a value
+of `Critical`. Using both a name and value here allows you to identify any content with a Priority set, in addition
+to allowing identification of just `Critical` content.
+
+This can also come in useful when you want to use tags for metadata. For example, you may want to record content review
+dates, which you could achieve through a `Reviewed At` tag with value representing the last review date.
+
+### Adding & Managing Tags
+
+Tags can be added to any level of the content hierarchy (Shelves, books, chapters & pages).
+You can apply tags when editing any such item. For shelves, books & chapters, tags are found
+in a dropdown section on the edit view:
+
+![View of editing tags for a Book, showing two tags, each as small cards with two edit zones within for tag name and value](/images/docs/user/tags-edit.png)
+
+For pages, you can find tags in the sidebar toolbox when in the page editor:
+
+![View of the page editor, with a "Page Tags" section open in the sidebar](/images/docs/user/tags-page-edit.png)
+
+When editing a tag name or value BookStack will show a list of potential existing relevant options to help you quickly
+fill the input. Suggestions for values will be just those used before for the chosen tag name, rather than all values
+across all tags.
+
+While editing, you're also able to re-order & remove tags as desired.
+Any changes to tags are saved alongside when you save the item they're applied to.
+
+### Tag Display & Overview
+
+When applied, tags are shown in a few areas of BookStack alongside the content they're applied to:
+
+- In the sidebar or info pane when viewing any tagged item.
+- On items listed within search results.
+- In API responses for items.
+
+When viewing an item with tags applied, you can click the tag to start a tag search. Clicking the tag name will start
+a search for all content that also has a tag of that name. Clicking the value will start a search for other content
+that has that same tag name & value applied.
+
+To view all tags being used, you can access an Tag overview page via the "View Tags" action found on the books or shelves index,
+or you can navigate straight to the `/tags` URL path. Here you'll see a list of all tag names used across content you have
+visibility of, alongside figures detailing their usage counts across each type of content.
+
+![View of a tags list, including a search box and sort options. It shows 4 tags as rows, and each row has a breakdown of usage.](/images/docs/user/tags-overview.png)
+
+You can click the tag name, or item counts, to start a relevant filtered search.
+Where tag values are used, you can also click the link on the right to access a
+list of all tag values for that tag name, with a similar breakdown as before.
+
+### Tags in the Search Index
+
+When content is indexed for searching in BookStack, tags names & values are considered as part of the search engine,
+and are even given a boost above normal content. This means you can boost content in search results 
+for specific search terms using tags where needed.
+
+### Tag Search Operations
+
+Content can be queried in BookStack by tag name or value.
+This can be used in many areas of BookStack where searching is made available. 
+As mentioned in the sections above, you can often initiate tag searches via clicking tags
+or statistics in the tag index. Otherwise you can directly use the following syntax:
+
+- Search by tag name:
+  - Syntax: `[<name>]`
+  - Example: `[Location]`
+- Search by tag value:
+  - Syntax: `[<operator><value>]`
+  - Example: `[=London]`
+- Search by tag name & value:
+  - Syntax: `[<name><operator><value>]`
+  - Example: `[Location=London]`
+
+The following are valid operators: `=`, `!=`, `<`, `>`, `<=`, `>=`, `like`.
+When using the `like` operator you can use `%` symbols in the search value to represent wildcards.
+
+Using this syntax you can get quite inventive. As an example, if you were applying `Reviewed At` tags with values 
+in a format like `20240627` (YYYYMMDD) you could search for all content with "Reviewed At" dates before 2024 using: <br> `[Reviewed At<20240101]`.
+
+See our [documentation on searching](/docs/user/searching/) for more advanced search syntax.
+
+### Tags for Customization
+
+Tags can also be handy for customization in a range of ways, even if just to assist as extra metadata or identification points.
+For example, you could use the [logical theme system](https://github.com/BookStackApp/BookStack/blob/development/dev/docs/logical-theme-system.md)
+to run a custom action on page creations, and within that change behaviour or action based upon whether the parent Book has a specific tag.
+
+Additionally, BookStack will convert tags to classes within the HTML templates used when viewing content in BookStack, which can then
+be used for easy tag-controlled customization & styling.
+Details of these tag classes can be found in our [Hacking BookStack documentation here](/docs/admin/hacking-bookstack/#tag-classes).
\ No newline at end of file
diff --git a/static/images/docs/user/tags-edit.png b/static/images/docs/user/tags-edit.png
new file mode 100644 (file)
index 0000000..afd50f2
--- /dev/null
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:415d4ec21359f1f35599c8614741b459021816628730b201ad27695d3eaf928a
+size 24536
diff --git a/static/images/docs/user/tags-list.png b/static/images/docs/user/tags-list.png
new file mode 100644 (file)
index 0000000..1567372
--- /dev/null
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:bfdc509773616a0aa6f841e51038078b9c5a41125f96d943f26fb2ab11b4c8f3
+size 8032
diff --git a/static/images/docs/user/tags-overview.png b/static/images/docs/user/tags-overview.png
new file mode 100644 (file)
index 0000000..efd59b2
--- /dev/null
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:61b19e0bf3d44bc856f7fc20dc1c424a27e00bbbded0d347dfe9f1d5c54a9b77
+size 46823
diff --git a/static/images/docs/user/tags-page-edit.png b/static/images/docs/user/tags-page-edit.png
new file mode 100644 (file)
index 0000000..60bed1b
--- /dev/null
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5eb53ca411511f974b4452180a8ee8a4fd4df24ce83327a89dba15dcdc709a63
+size 79684
index 4cbda2c1c9756b92fe5369e753494b235c3b5f94..b00bd4d3ebccd1aeb73c6f6932593c7d660afcf4 100644 (file)
@@ -21,6 +21,7 @@
 <div>
        <h4>Advanced Features</h4>
        <ul>
 <div>
        <h4>Advanced Features</h4>
        <ul>
+               <li><a href="/docs/user/tags">Content Tags</a></li>
                <li><a href="/docs/user/page-templates">Page Templates</a></li>
                <li><a href="/docs/user/roles-and-permissions">Roles & Permissions</a></li>
                <li><a href="/docs/user/reusing-page-content">Reusing Page Content</a></li>
                <li><a href="/docs/user/page-templates">Page Templates</a></li>
                <li><a href="/docs/user/roles-and-permissions">Roles & Permissions</a></li>
                <li><a href="/docs/user/reusing-page-content">Reusing Page Content</a></li>