|
1 | 1 | = Attributes and Roles |
| 2 | +:page-toclevels: 3 |
2 | 3 |
|
3 | 4 | Use attributes and roles to insert content or CSS styles into your pages. |
4 | 5 |
|
@@ -103,6 +104,58 @@ I'm a block with an assigned role! |
103 | 104 | \---- |
104 | 105 | ---- |
105 | 106 |
|
| 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 | + |
106 | 159 | === Page Roles |
107 | 160 |
|
108 | 161 | Assigning a role to a page applies that role to the entire page, rather than a specific block or phrase. |
|
0 commit comments