Skip to content

Commit 49c971c

Browse files
authored
Document Editions, Deprecation, and Version Page Labels (#846)
* Initial draft of collecting inline page roles for versions, deprecation, etc. * Add Deprecated tag/role * Add suggestions from Simon
1 parent a353fa1 commit 49c971c

File tree

2 files changed

+54
-1
lines changed

2 files changed

+54
-1
lines changed

home/modules/contribute/pages/attributes-and-roles.adoc

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
= Attributes and Roles
2+
:page-toclevels: 3
23

34
Use attributes and roles to insert content or CSS styles into your pages.
45

@@ -103,6 +104,58 @@ I'm a block with an assigned role!
103104
\----
104105
----
105106

107+
=== Inline Roles for Editions, Versions, and Deprecation
108+
109+
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 <<page-edition,the :page-edition: attribute>>.
110+
111+
You can use the following inline roles to mark sections of text in your documentation:
112+
113+
|====
114+
| Role | Example
115+
116+
a|
117+
[source,asciidoc]
118+
----
119+
[.edition]#{enterprise}#
120+
----
121+
a| [.edition]#{enterprise}#
122+
123+
This text applies to Couchbase Server Enterprise Edition
124+
125+
a|
126+
[source,asciidoc]
127+
----
128+
[.edition]#{community}#
129+
----
130+
a| [.edition]#{community}#
131+
132+
This text applies to Couchbase Server Community Edition
133+
134+
a|
135+
[source,asciidoc]
136+
----
137+
[.status]#Couchbase Server x.x.x#
138+
----
139+
a| [.status]#Couchbase Server 7.6.2#
140+
141+
This text applies to Couchbase Server version 7.6.2
142+
143+
a|
144+
[source,asciidoc]
145+
----
146+
[.deprecated]#Deprecated#
147+
----
148+
a| [.deprecated]#Deprecated#
149+
150+
This text applies to a deprecated feature
151+
152+
|====
153+
154+
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.
155+
156+
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.
157+
Otherwise, place the badge as close to the edition, version, or deprecated content as possible.
158+
106159
=== Page Roles
107160

108161
Assigning a role to a page applies that role to the entire page, rather than a specific block or phrase.

home/modules/contribute/partials/available-attributes.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ For a page in another repository: `:page-aliases:7.6@server:develop:integrations
6464

6565
When linking to a repository that has a version, you must specify which version in that repository redirects to your current page.
6666

67-
| `:page-edition:`
67+
| [[page-edition]]`:page-edition:`
6868
| 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.
6969
| `page-edition: Enterprise Edition`
7070

0 commit comments

Comments
 (0)