Skip to content

Commit 93d5d10

Browse files
committed
docs: UI includes branches
1 parent a2f4c41 commit 93d5d10

File tree

131 files changed

+24618
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+24618
-1
lines changed

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
test-files/**/*.xml binary
22
test-files/golden-tests/** text eol=lf
3+
**.sh text eol=lf

.github/workflows/ci.yml

+12
Original file line numberDiff line numberDiff line change
@@ -611,6 +611,18 @@ jobs:
611611
cp index.html ../../build/website/index.html
612612
cp styles.css ../../build/website/styles.css
613613
614+
- name: Generate Antora UI
615+
working-directory: docs/ui
616+
run: |
617+
# This playbook renders the documentation
618+
# content for the website. It includes
619+
# master, develop, and tags.
620+
GH_TOKEN="${{ secrets.GITHUB_TOKEN }}"
621+
export GH_TOKEN
622+
npm ci
623+
npx gulp lint
624+
npx gulp
625+
614626
- name: Generate Remote Documentation
615627
working-directory: docs
616628
run: |

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,8 @@
1010
/test-files/**/*.bad.xml
1111
docs/node_modules
1212
docs/build
13+
docs/ui/node_modules
14+
docs/ui/build
15+
docs/ui/public
1316
share/mrdocs/libcxx/
1417
share/mrdocs/clang/

docs/antora-playbook.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ content:
2525

2626
ui:
2727
bundle:
28-
url: 'https://github.com/boostorg/website-v2-docs/releases/download/ui-develop/ui-bundle.zip'
28+
url: './ui/build/ui-bundle.zip'
2929
snapshot: true
3030

3131
antora:

docs/build_docs.sh

+10
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@
88
# Official repository: https://github.com/cppalliance/mrdocs
99
#
1010

11+
echo "Building documentation UI"
12+
cwd=$(pwd)
13+
script_dir=$(dirname "$(readlink -f "$0")")
14+
if ! [ -e "$script_dir/ui/build/ui-bundle.zip" ]; then
15+
echo "Building antora-ui"
16+
cd "$script_dir/ui" || exit
17+
./build.sh
18+
cd "$cwd" || exit
19+
fi
20+
1121
echo "Building documentation with Antora..."
1222
echo "Installing npm dependencies..."
1323
npm ci

docs/build_local_docs.sh

+10
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@
88
# Official repository: https://github.com/cppalliance/mrdocs
99
#
1010

11+
echo "Building documentation UI"
12+
cwd=$(pwd)
13+
script_dir=$(dirname "$(readlink -f "$0")")
14+
if ! [ -e "$script_dir/ui/build/ui-bundle.zip" ]; then
15+
echo "Building antora-ui"
16+
cd "$script_dir/ui" || exit
17+
./build.sh
18+
cd "$cwd" || exit
19+
fi
20+
1121
echo "Building documentation with Antora..."
1222
echo "Installing npm dependencies..."
1323
npm ci

docs/ui/.editorconfig

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true

docs/ui/.eslintrc

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"extends": "standard",
3+
"rules": {
4+
"arrow-parens": ["error", "always"],
5+
"comma-dangle": ["error", {
6+
"arrays": "always-multiline",
7+
"objects": "always-multiline",
8+
"imports": "always-multiline",
9+
"exports": "always-multiline"
10+
}],
11+
"no-restricted-properties": ["error", {
12+
"property": "substr",
13+
"message": "Use String#slice instead."
14+
}],
15+
"max-len": [1, 120, 2],
16+
"spaced-comment": "off",
17+
"radix": ["error", "always"]
18+
}
19+
}

docs/ui/.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/build/
2+
/node_modules/
3+
/public/

docs/ui/.gitlab-ci.yml

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
image: node:10.14.2-stretch
2+
stages: [setup, verify, deploy]
3+
install:
4+
stage: setup
5+
cache:
6+
paths:
7+
- .cache/npm
8+
script:
9+
- &npm_install
10+
npm install --quiet --no-progress --cache=.cache/npm
11+
lint:
12+
stage: verify
13+
cache: &pull_cache
14+
policy: pull
15+
paths:
16+
- .cache/npm
17+
script:
18+
- *npm_install
19+
- node_modules/.bin/gulp lint
20+
bundle-stable:
21+
stage: deploy
22+
only:
23+
- master@antora/antora-ui-default
24+
cache: *pull_cache
25+
script:
26+
- *npm_install
27+
- node_modules/.bin/gulp bundle
28+
artifacts:
29+
paths:
30+
- build/ui-bundle.zip
31+
bundle-dev:
32+
stage: deploy
33+
except:
34+
- master
35+
cache: *pull_cache
36+
script:
37+
- *npm_install
38+
- node_modules/.bin/gulp bundle
39+
artifacts:
40+
expire_in: 1 day # unless marked as keep from job page
41+
paths:
42+
- build/ui-bundle.zip
43+
pages:
44+
stage: deploy
45+
only:
46+
- master@antora/antora-ui-default
47+
cache: *pull_cache
48+
script:
49+
- *npm_install
50+
- node_modules/.bin/gulp preview:build
51+
# FIXME figure out a way to avoid copying these files to preview site
52+
- rm -rf public/_/{helpers,layouts,partials}
53+
artifacts:
54+
paths:
55+
- public

docs/ui/.gulp.json

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"description": "Build tasks for the Antora default UI project",
3+
"flags.tasksDepth": 1
4+
}

docs/ui/.nvmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
10

docs/ui/.stylelintrc

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"extends": "stylelint-config-standard",
3+
"rules": {
4+
"comment-empty-line-before": null,
5+
"no-descending-specificity": null,
6+
}
7+
}

0 commit comments

Comments
 (0)