Skip to content

Commit c8095b5

Browse files
committed
docs: set up @asciidoctor/tabs in UI bundle
1 parent 1a9de28 commit c8095b5

File tree

9 files changed

+33
-38
lines changed

9 files changed

+33
-38
lines changed

docs/modules/ROOT/pages/install.adoc

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
= Install
2+
:tabs-sync-option:
23

34
[#mrdocs-binaries]
45
== Binary Packages
@@ -8,10 +9,10 @@ Most users should use these packages.
89
910
mrdocs-releases::[]
1011
11-
[#mrdocs-source-script]
12-
== Python Bootstrap Script
12+
[#mrdocs-bootstrap-script]
13+
== Bootstrap Script
1314
14-
The Python bootstrap script available in the repository provides an alternative way to install MrDocs and its
15+
The bootstrap script available in the repository provides an alternative way to install MrDocs and its
1516
dependencies from source. Just run the script from the root of the MrDocs repository:
1617
1718
[source,bash]
@@ -34,16 +35,7 @@ python -c "$(Invoke-WebRequest -Uri 'https://raw.githubusercontent.com/cppallian
3435
----
3536
--
3637
37-
Linux::
38-
+
39-
--
40-
[source,bash]
41-
----
42-
python3 -c "$(curl -fsSL https://raw.githubusercontent.com/cppalliance/mrdocs/refs/heads/develop/bootstrap.py)"
43-
----
44-
--
45-
46-
macOS::
38+
Unix Variants::
4739
+
4840
--
4941
[source,bash]
@@ -53,6 +45,7 @@ python -c "$(curl -fsSL https://raw.githubusercontent.com/cppalliance/mrdocs/ref
5345
--
5446
====
5547
48+
5649
This method automates the download, configuration, and build steps for MrDocs and all required third-party libraries.
5750
It is especially useful for developers and for users who prefer a streamlined, interactive setup or need to install
5851
MrDocs in custom environments.
@@ -75,16 +68,7 @@ python -c "$(Invoke-WebRequest -Uri 'https://raw.githubusercontent.com/cppallian
7568
----
7669
--
7770
78-
Linux::
79-
+
80-
--
81-
[source,bash]
82-
----
83-
python3 -c "$(curl -fsSL https://raw.githubusercontent.com/cppalliance/mrdocs/refs/heads/develop/bootstrap.py)" --non-interactive
84-
----
85-
--
86-
87-
macOS::
71+
Unix Variants::
8872
+
8973
--
9074
[source,bash]
@@ -100,7 +84,7 @@ This approach is recommended for developers, advanced users, or those integratin
10084
into larger projects.
10185
10286
[#mrdocs-source]
103-
== Install from Source
87+
== Manually Install from Source
10488
10589
The following instructions assume we are at a parent directory that's going to contain both the MrDocs and the third-party dependencies directories.
10690

docs/package-lock.json

Lines changed: 4 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/ui/package-lock.json

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/ui/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
],
1616
"devDependencies": {
1717
"@asciidoctor/core": "~2.2",
18+
"@asciidoctor/tabs": "^1.0.0-beta.6",
1819
"@fontsource/roboto": "~4.5",
1920
"@fontsource/roboto-mono": "~4.5",
2021
"@vscode/gulp-vinyl-zip": "~2.5",
@@ -36,6 +37,7 @@
3637
"gulp-eslint": "~6.0",
3738
"gulp-imagemin": "~6.2",
3839
"gulp-postcss": "~8.0",
40+
"gulp-prettier": "^6.0.0",
3941
"gulp-stylelint": "~13.0",
4042
"gulp-uglify": "~3.0",
4143
"gulp-vinyl-zip": "~2.2",
@@ -52,7 +54,6 @@
5254
"require-from-string": "~2.0",
5355
"stylelint": "~13.3",
5456
"stylelint-config-standard": "~20.0",
55-
"vinyl-fs": "~3.0",
56-
"gulp-prettier": "^6.0.0"
57+
"vinyl-fs": "~3.0"
5758
}
5859
}

docs/ui/preview-src/ui-model.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,3 +124,6 @@ page:
124124
- content: Some Code
125125
url: '/xyz/5.2/index.html#some-code'
126126
urlType: internal
127+
asciidoc:
128+
extensions:
129+
- '@asciidoctor/tabs'

docs/ui/src/css/vendor/tabs.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@import "@asciidoctor/tabs"

docs/ui/src/js/vendor/tabs.bundle.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
require('@asciidoctor/tabs')

docs/ui/src/partials/footer-scripts.hbs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
{{#if env.SITE_SEARCH_PROVIDER}}
44
{{> search-scripts}}
55
{{/if}}
6+
<script async src="{{{uiRootPath}}}/js/vendor/tabs.js" data-sync-storage-key="preferred-tab"></script>

docs/ui/src/partials/head-styles.hbs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
<link rel="stylesheet" href="{{{uiRootPath}}}/css/site.css">
2+
<link rel="stylesheet" href="{{{uiRootPath}}}/css/vendor/tabs.css">

0 commit comments

Comments
 (0)