|
| 1 | +:_module-type: REFERENCE |
| 2 | +[id='adding-module-types_to_modules_in_Pantheon_{context}'] |
| 3 | += Adding the module type to modules in {ProductShortName} |
| 4 | + |
| 5 | +[role="_abstract"] |
| 6 | +In {ProductShortName}, you can search and filter modules by type: concept, procedure, or reference. You declare a module's type by adding an identifier to each module. |
| 7 | + |
| 8 | +Use one or both of the following identifiers to declare the module's type: |
| 9 | + |
| 10 | +* The `:_module-type:` attribute, preceding the module's ID |
| 11 | +* The corresponding prefix in the module's file name |
| 12 | +
|
| 13 | +{ProductShortName} {ProductNumber} first checks for the `:_module-type:` attribute. Any value other than those specified above is ignored. If there is no valid attribute, {ProductShortName} {ProductNumber} then checks if the module's file name includes a valid prefix. If both a valid attribute and prefix exist, {ProductShortName} {ProductNumber} uses the attribute. |
| 14 | + |
| 15 | + |
| 16 | +Attribute (preferred method):: |
| 17 | +Enter the correct attribute in the line before the module's ID to avoid build problems, choosing among the following: |
| 18 | ++ |
| 19 | +* `:_module-type: CONCEPT` |
| 20 | +* `:_module-type: PROCEDURE` |
| 21 | +* `:_module-type: REFERENCE` |
| 22 | ++ |
| 23 | +==== |
| 24 | +.Example |
| 25 | +`:_module-type: REFERENCE` |
| 26 | +`[id='identifying-module-types_in_Pantheon_{context}']` |
| 27 | + |
| 28 | +`= Identifying {ProductShortName} module types` |
| 29 | +==== |
| 30 | + |
| 31 | +Prefix:: |
| 32 | +Begin the file names of modules with one of the following prefixes, followed by either an underscore or a hyphen: |
| 33 | ++ |
| 34 | +* `con` |
| 35 | +* `proc` |
| 36 | +* `ref` |
| 37 | ++ |
| 38 | +==== |
| 39 | +.Examples: A reference module |
| 40 | + |
| 41 | +Underscore after the prefix: |
| 42 | + |
| 43 | +`**ref_**identifying-module-types.adoc` |
| 44 | + |
| 45 | +Hyphen after the prefix: |
| 46 | + |
| 47 | +`**ref-**identifying-module-types.adoc` |
| 48 | + |
| 49 | +==== |
| 50 | +
|
| 51 | +.Additional resources |
| 52 | +
|
| 53 | +* link:https://redhat-documentation.github.io/modular-docs/#writing-mod-docs[Types of modules in Red Hat documentation] in the _Modular Documentation Reference Guide_ |
0 commit comments