Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
test-files/**/*.xml binary
test-files/golden-tests/** text eol=lf
**.sh text eol=lf
12 changes: 12 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,18 @@ jobs:
cp index.html ../../build/website/index.html
cp styles.css ../../build/website/styles.css

- name: Generate Antora UI
working-directory: docs/ui
run: |
# This playbook renders the documentation
# content for the website. It includes
# master, develop, and tags.
GH_TOKEN="${{ secrets.GITHUB_TOKEN }}"
export GH_TOKEN
npm ci
npx gulp lint
npx gulp

- name: Generate Remote Documentation
working-directory: docs
run: |
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,8 @@
/test-files/**/*.bad.xml
docs/node_modules
docs/build
docs/ui/node_modules
docs/ui/build
docs/ui/public
share/mrdocs/libcxx/
share/mrdocs/clang/
2 changes: 1 addition & 1 deletion docs/antora-playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ content:

ui:
bundle:
url: 'https://github.com/boostorg/website-v2-docs/releases/download/ui-develop/ui-bundle.zip'
url: './ui/build/ui-bundle.zip'
snapshot: true

antora:
Expand Down
10 changes: 10 additions & 0 deletions docs/build_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@
# Official repository: https://github.com/cppalliance/mrdocs
#

echo "Building documentation UI"
cwd=$(pwd)
script_dir=$(dirname "$(readlink -f "$0")")
if ! [ -e "$script_dir/ui/build/ui-bundle.zip" ]; then
echo "Building antora-ui"
cd "$script_dir/ui" || exit
./build.sh
cd "$cwd" || exit
fi

echo "Building documentation with Antora..."
echo "Installing npm dependencies..."
npm ci
Expand Down
10 changes: 10 additions & 0 deletions docs/build_local_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@
# Official repository: https://github.com/cppalliance/mrdocs
#

echo "Building documentation UI"
cwd=$(pwd)
script_dir=$(dirname "$(readlink -f "$0")")
if ! [ -e "$script_dir/ui/build/ui-bundle.zip" ]; then
echo "Building antora-ui"
cd "$script_dir/ui" || exit
./build.sh
cd "$cwd" || exit
fi

echo "Building documentation with Antora..."
echo "Installing npm dependencies..."
npm ci
Expand Down
9 changes: 9 additions & 0 deletions docs/ui/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
19 changes: 19 additions & 0 deletions docs/ui/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"extends": "standard",
"rules": {
"arrow-parens": ["error", "always"],
"comma-dangle": ["error", {
"arrays": "always-multiline",
"objects": "always-multiline",
"imports": "always-multiline",
"exports": "always-multiline"
}],
"no-restricted-properties": ["error", {
"property": "substr",
"message": "Use String#slice instead."
}],
"max-len": [1, 120, 2],
"spaced-comment": "off",
"radix": ["error", "always"]
}
}
3 changes: 3 additions & 0 deletions docs/ui/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/build/
/node_modules/
/public/
55 changes: 55 additions & 0 deletions docs/ui/.gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
image: node:10.14.2-stretch
stages: [setup, verify, deploy]
install:
stage: setup
cache:
paths:
- .cache/npm
script:
- &npm_install
npm install --quiet --no-progress --cache=.cache/npm
lint:
stage: verify
cache: &pull_cache
policy: pull
paths:
- .cache/npm
script:
- *npm_install
- node_modules/.bin/gulp lint
bundle-stable:
stage: deploy
only:
- master@antora/antora-ui-default
cache: *pull_cache
script:
- *npm_install
- node_modules/.bin/gulp bundle
artifacts:
paths:
- build/ui-bundle.zip
bundle-dev:
stage: deploy
except:
- master
cache: *pull_cache
script:
- *npm_install
- node_modules/.bin/gulp bundle
artifacts:
expire_in: 1 day # unless marked as keep from job page
paths:
- build/ui-bundle.zip
pages:
stage: deploy
only:
- master@antora/antora-ui-default
cache: *pull_cache
script:
- *npm_install
- node_modules/.bin/gulp preview:build
# FIXME figure out a way to avoid copying these files to preview site
- rm -rf public/_/{helpers,layouts,partials}
artifacts:
paths:
- public
4 changes: 4 additions & 0 deletions docs/ui/.gulp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"description": "Build tasks for the Antora default UI project",
"flags.tasksDepth": 1
}
1 change: 1 addition & 0 deletions docs/ui/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
10
7 changes: 7 additions & 0 deletions docs/ui/.stylelintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "stylelint-config-standard",
"rules": {
"comment-empty-line-before": null,
"no-descending-specificity": null,
}
}
Loading