|
| 1 | += Admonitions |
| 2 | +:navtitle: Admonitions |
| 3 | +:description: Demonstrates note, tip, warning, caution, and important blocks. |
| 4 | + |
| 5 | +Admonitions draw attention to important information. |
| 6 | +The dark theme styles each type distinctively. |
| 7 | + |
| 8 | +== Note |
| 9 | + |
| 10 | +NOTE: This is a note admonition. |
| 11 | +Use notes for additional information that supplements the main content. |
| 12 | + |
| 13 | +== Tip |
| 14 | + |
| 15 | +TIP: This is a tip admonition. |
| 16 | +Tips provide helpful suggestions or best practices. |
| 17 | + |
| 18 | +== Important |
| 19 | + |
| 20 | +IMPORTANT: This is an important admonition. |
| 21 | +Use this for critical information the reader must not miss. |
| 22 | + |
| 23 | +== Warning |
| 24 | + |
| 25 | +WARNING: This is a warning admonition. |
| 26 | +Warnings alert readers to potential problems or risks. |
| 27 | + |
| 28 | +== Caution |
| 29 | + |
| 30 | +CAUTION: This is a caution admonition. |
| 31 | +Cautions indicate actions that could have negative consequences. |
| 32 | + |
| 33 | +== Admonitions with Titles |
| 34 | + |
| 35 | +[NOTE] |
| 36 | +.Configuration Required |
| 37 | +==== |
| 38 | +You must configure the `antora-playbook.yml` file before building the site. |
| 39 | +See the xref:index.adoc[installation guide] for details. |
| 40 | +==== |
| 41 | + |
| 42 | +[TIP] |
| 43 | +.Performance Optimization |
| 44 | +==== |
| 45 | +Enable caching in your playbook for faster subsequent builds: |
| 46 | +
|
| 47 | +[source,yaml] |
| 48 | +---- |
| 49 | +runtime: |
| 50 | + cache_dir: .cache/antora |
| 51 | +---- |
| 52 | +==== |
| 53 | + |
| 54 | +[WARNING] |
| 55 | +.Breaking Changes in v2.0 |
| 56 | +==== |
| 57 | +The configuration format changed in version 2.0. |
| 58 | +Please review the migration guide before upgrading. |
| 59 | +==== |
| 60 | + |
| 61 | +== Admonitions with Complex Content |
| 62 | + |
| 63 | +[IMPORTANT] |
| 64 | +.Multi-step Process |
| 65 | +==== |
| 66 | +Follow these steps in order: |
| 67 | +
|
| 68 | +. Clone the repository |
| 69 | +. Install dependencies with `pnpm install` |
| 70 | +. Configure your playbook |
| 71 | +. Run `pnpm build` |
| 72 | +
|
| 73 | +[source,bash] |
| 74 | +---- |
| 75 | +git clone https://github.com/the-dev-center/antora-dark-theme.git |
| 76 | +cd antora-dark-theme |
| 77 | +pnpm install |
| 78 | +pnpm build |
| 79 | +---- |
| 80 | +==== |
| 81 | + |
| 82 | +[CAUTION] |
| 83 | +.Data Loss Warning |
| 84 | +==== |
| 85 | +The following actions are *irreversible*: |
| 86 | +
|
| 87 | +* Deleting a branch without a backup |
| 88 | +* Force pushing to a shared branch |
| 89 | +* Running `git clean -fd` without reviewing changes |
| 90 | +
|
| 91 | +Always create backups before performing destructive operations. |
| 92 | +
|
| 93 | +[cols="1,1"] |
| 94 | +|=== |
| 95 | +| Action | Risk Level |
| 96 | +
|
| 97 | +| `git reset --hard` |
| 98 | +| High |
| 99 | +
|
| 100 | +| `git push --force` |
| 101 | +| Critical |
| 102 | +
|
| 103 | +| `git clean -fd` |
| 104 | +| High |
| 105 | +|=== |
| 106 | +==== |
| 107 | + |
| 108 | +== Inline Admonitions |
| 109 | + |
| 110 | +You can also use shorter inline syntax: |
| 111 | + |
| 112 | +NOTE: Short notes can be written inline. |
| 113 | + |
| 114 | +TIP: Quick tips are great for brevity. |
| 115 | + |
| 116 | +WARNING: Brief warnings catch attention. |
0 commit comments