From 06b38d1de78d8aa41e6d5426d92f0244a0ae8714 Mon Sep 17 00:00:00 2001 From: Sarah Emmett Date: Fri, 26 Sep 2025 13:37:11 -0400 Subject: [PATCH 1/3] Initial draft of collecting inline page roles for versions, deprecation, etc. --- .../pages/attributes-and-roles.adoc | 39 +++++++++++++++++++ .../partials/available-attributes.adoc | 2 +- 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/home/modules/contribute/pages/attributes-and-roles.adoc b/home/modules/contribute/pages/attributes-and-roles.adoc index a2923d613b..f7ec2374db 100644 --- a/home/modules/contribute/pages/attributes-and-roles.adoc +++ b/home/modules/contribute/pages/attributes-and-roles.adoc @@ -1,4 +1,5 @@ = Attributes and Roles +:page-toclevels: 3 Use attributes and roles to insert content or CSS styles into your pages. @@ -103,6 +104,44 @@ I'm a block with an assigned role! \---- ---- +=== Inline Roles for Editions, Versions, and Deprecation + +Couchbase Documentation created inline page roles for marking sections of documentation as deprecated, for a specific Couchbase Server version, or for marking sections as applying to a specific product edition - similar to <>. + +You can use the following inline roles to mark sections of text in your documentation: + +|==== +| Role | Example + +a| +[source,asciidoc] +---- +[.edition]#{enterprise}# +---- +a| [.edition]#{enterprise}# + +This text applies to Couchbase Server Enterprise Edition + +a| +[source,asciidoc] +---- +[.edition]#{community}# +---- +a| [.edition]#{community}# + +This text applies to Couchbase Server Community Edition + +a| +[source,asciidoc] +---- +[.status]#Couchbase Server x.x.x# +---- +a| [.status]#Couchbase Server 7.6.2# + +This text applies to Couchbase Server version 7.6.2 + +|==== + === Page Roles Assigning a role to a page applies that role to the entire page, rather than a specific block or phrase. diff --git a/home/modules/contribute/partials/available-attributes.adoc b/home/modules/contribute/partials/available-attributes.adoc index 7450669d79..4b2d0b614c 100644 --- a/home/modules/contribute/partials/available-attributes.adoc +++ b/home/modules/contribute/partials/available-attributes.adoc @@ -64,7 +64,7 @@ For a page in another repository: `:page-aliases:7.6@server:develop:integrations When linking to a repository that has a version, you must specify which version in that repository redirects to your current page. -| `:page-edition:` +| [[page-edition]]`:page-edition:` | If you're writing content that only applies to a specific edition of Couchbase Server, usually the Enterprise Edition, use the `page-edition` attribute to add a badge to the page that indicates the Edition the content applies to. | `page-edition: Enterprise Edition` From 5cf9cdad49452e5b16eb370b2329dfa3b461d51e Mon Sep 17 00:00:00 2001 From: Sarah Emmett Date: Fri, 26 Sep 2025 15:27:01 -0400 Subject: [PATCH 2/3] Add Deprecated tag/role --- home/modules/contribute/pages/attributes-and-roles.adoc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/home/modules/contribute/pages/attributes-and-roles.adoc b/home/modules/contribute/pages/attributes-and-roles.adoc index f7ec2374db..6fc1dcbd98 100644 --- a/home/modules/contribute/pages/attributes-and-roles.adoc +++ b/home/modules/contribute/pages/attributes-and-roles.adoc @@ -140,6 +140,15 @@ a| [.status]#Couchbase Server 7.6.2# This text applies to Couchbase Server version 7.6.2 +a| +[source,asciidoc] +---- +[.deprecated]#Deprecated# +---- +a| [.deprecated]#Deprecated# + +This text applies to a deprecated feature + |==== === Page Roles From 209844d5eff6d48934698dcd35ad2c251d49edf4 Mon Sep 17 00:00:00 2001 From: Sarah Emmett Date: Mon, 29 Sep 2025 14:08:36 -0400 Subject: [PATCH 3/3] Add suggestions from Simon --- home/modules/contribute/pages/attributes-and-roles.adoc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/home/modules/contribute/pages/attributes-and-roles.adoc b/home/modules/contribute/pages/attributes-and-roles.adoc index 6fc1dcbd98..08163ef6c6 100644 --- a/home/modules/contribute/pages/attributes-and-roles.adoc +++ b/home/modules/contribute/pages/attributes-and-roles.adoc @@ -151,6 +151,11 @@ This text applies to a deprecated feature |==== +The `#{enterprise}#` and `#{community}#` edition attributes are defined in the Antora playbook and automatically add a link to details about the different Couchbase Server editions. + +When adding badges to text, try to always add the badge on a single line, by itself, following the heading of the section where it applies. +Otherwise, place the badge as close to the edition, version, or deprecated content as possible. + === Page Roles Assigning a role to a page applies that role to the entire page, rather than a specific block or phrase.