Skip to content

Commit 271d7c3

Browse files
committed
chore: Integrate the vendored UI
- ui/UPSTREAM records how to diff against antora-ui-default; the first reviewed SHA is established by the upcoming upstream re-sync. - netlify-fetch no longer switches branches: it creates/updates the local release branches and materializes their blobs via pathspec checkouts (ui/ excluded - release branches still reference it as a submodule and its blobs are not needed). - The UI lint/bundle CI moves to .github/workflows/ui.yml, filtered on ui/** (workflows in ui/.github never triggered from a subdirectory). - The Antora build extensions move from supplemental-ui/lib/ to lib/: supplemental-ui is the UI file overlay and everything in it is published to the site, which build extensions should not be. - @antora/lunr-extension is removed: search is Pagefind, nothing references the extension.
1 parent 1f29e8e commit 271d7c3

14 files changed

Lines changed: 65 additions & 240 deletions

.github/workflows/ui.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: UI lint and bundle
3+
4+
on:
5+
pull_request:
6+
paths:
7+
- 'ui/**'
8+
- 'package-lock.json'
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
15+
- uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
16+
with:
17+
node-version: '16'
18+
cache: npm
19+
- run: npm ci
20+
- run: npm run bundle --workspace ui

Makefile

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -53,23 +53,26 @@ clean:
5353
# 'cache' is the configured cache dir in the playbook
5454
rm -rf cache
5555

56-
# The netlify repo is checked out without any blobs. This script
57-
# iterates through the release branches and checks them out one-by-one
58-
# to fetch all the files.
59-
# Then we can build directly from here, making it possible to build
60-
# with antora using the HEAD (enabling branch previews!)
56+
# The netlify repo is checked out without any blobs. Antora needs local
57+
# release branches and their blobs in the object database, so this target
58+
# creates/updates the local branches and materializes their blobs via
59+
# pathspec checkouts - without ever switching HEAD (enabling branch previews!).
60+
# ui/ is excluded: release branches still reference it as a submodule and
61+
# its blobs are not needed (the UI bundle is built from the current checkout).
6162
netlify-fetch:
62-
git submodule update --init --recursive
6363
# netlify messes with some files, restore everything to how it was:
64-
git reset --hard --recurse-submodule
64+
git reset --hard
6565
# fetch, because netlify does caching and we want to get the latest commits
6666
git fetch --all
67-
# checkout all release branches once, so we fetch the files
6867
for remote in $(shell git branch -r | grep -E 'release[/-]'); do \
69-
git checkout --recurse-submodules "$${remote#origin/}" ; git pull; \
68+
branch="$${remote#origin/}"; \
69+
git fetch -q origin "+refs/heads/$$branch:refs/heads/$$branch"; \
70+
git checkout -q "$$branch" -- ':(exclude)ui' . ; \
7071
done
71-
# go back to the initial commit to start the build
72-
git -c advice.detachedHead=false checkout --recurse-submodules $(CURRENT_COMMIT)
72+
# restore the working tree of the current commit and drop files that
73+
# only exist on other branches (ignored files like node_modules stay)
74+
git reset --hard -q $(CURRENT_COMMIT)
75+
git clean -fdq
7376

7477
netlify-build: netlify-fetch build-prod build-search-index
7578

README.adoc

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,10 @@ Other Stackable repos contain `docs` directories which are pulled in by this rep
1818

1919
**Dependencies**: `make`, `npm`.
2020

21-
To build the site, pull submodules, install dependencies and run `make`:
21+
To build the site, install dependencies and run `make`:
2222

2323
[source,console]
2424
----
25-
$ git submodule update --init
2625
$ npm ci
2726
$ make
2827
----
@@ -61,14 +60,11 @@ content:
6160
branches: HEAD
6261
----
6362

64-
NOTE: Antora does not recognize git submodules as git repositories
65-
66-
The design & layout comes from our https://github.com/stackabletech/documentation-ui[UI repository].
63+
The design & layout lives in the `ui/` directory of this repository.
6764

6865
`LIVERELOAD=true gulp` may be used to recreate the built documentation after each edit.
6966

7067
== More useful links
7168

72-
* The https://github.com/stackabletech/documentation-ui[documentation-ui] repository.
7369
* The https://hub.stackable.tech/crds[CRD reference] on the Stackable Hub.
7470
* The Stackable https://docs.stackable.tech/home/stable/contributor/[contributor's guide] containing more info on how to contribute to the documentation.

antora-playbook.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ antora:
3030
- require: '@sntke/antora-mermaid-extension'
3131
mermaid_library_url: https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.esm.min.mjs
3232
script_stem: mermaid-scripts
33-
- ./supplemental-ui/lib/stackable-operator-helpers.js
34-
- ./supplemental-ui/lib/llms-txt.js
33+
- ./lib/stackable-operator-helpers.js
34+
- ./lib/llms-txt.js
3535
content:
3636
sources:
3737
- url: .
File renamed without changes.

local-antora-playbook.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ antora:
1515
- require: '@sntke/antora-mermaid-extension'
1616
mermaid_library_url: https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.esm.min.mjs
1717
script_stem: mermaid-scripts
18-
- ./supplemental-ui/lib/stackable-operator-helpers.js
19-
- ./supplemental-ui/lib/llms-txt.js
18+
- ./lib/stackable-operator-helpers.js
19+
- ./lib/llms-txt.js
2020
content:
2121
sources:
2222
- url: ./

modules/contributor/pages/project-overview.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ The structure of the repository is documented in its README.
5252
image::project-overview-documentation.drawio.svg[]
5353

5454
The documentation is built with https://antora.org/[Antora{external-link-icon}^] and the playbook file to build it is located in the https://github.com/stackabletech/documentation[documentation{external-link-icon}^] repository, among some common platform documentation.
55-
The UI for the documentation is found in the https://github.com/stackabletech/documentation-ui[documentation-ui{external-link-icon}^] repository; it is included as a submodule in the documentation repository.
55+
The UI for the documentation lives in the `ui/` directory of the same repository.
5656
The documentation pulls in operator documentation files from the operator repositories.
5757
The documentation is found at https://docs.stackable.tech/[https://docs.stackable.tech/{external-link-icon}^].
5858

only-dev-antora-playbook.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ antora:
1515
- require: '@sntke/antora-mermaid-extension'
1616
mermaid_library_url: https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.esm.min.mjs
1717
script_stem: mermaid-scripts
18-
- ./supplemental-ui/lib/stackable-operator-helpers.js
19-
- ./supplemental-ui/lib/llms-txt.js
18+
- ./lib/stackable-operator-helpers.js
19+
- ./lib/llms-txt.js
2020
content:
2121
sources:
2222
- url: ./

0 commit comments

Comments
 (0)