diff --git a/.github/dita-ot/favicon.svg b/.github/dita-ot/favicon.svg index 1b58a0ef..a34abbd4 100644 --- a/.github/dita-ot/favicon.svg +++ b/.github/dita-ot/favicon.svg @@ -1,16 +1,32 @@ - - - + + + + + + + + + + + + + + + + + + + diff --git a/.github/dita-ot/footer.xml b/.github/dita-ot/footer.xml index f5461b84..34491f42 100644 --- a/.github/dita-ot/footer.xml +++ b/.github/dita-ot/footer.xml @@ -6,44 +6,44 @@

- © 2017–2025 + © 2017–2026 infotexture

diff --git a/.github/dita-ot/header.xml b/.github/dita-ot/header.xml index f257e4b9..c618f5a1 100644 --- a/.github/dita-ot/header.xml +++ b/.github/dita-ot/header.xml @@ -1,435 +1,456 @@ - diff --git a/.github/dita-ot/html.xml b/.github/dita-ot/html.xml index 8bafb2eb..d07fc7d9 100644 --- a/.github/dita-ot/html.xml +++ b/.github/dita-ot/html.xml @@ -28,6 +28,8 @@ + + diff --git a/.github/dita-ot/theme.css b/.github/dita-ot/theme.css index 01031927..e703c9c2 100644 --- a/.github/dita-ot/theme.css +++ b/.github/dita-ot/theme.css @@ -1,5 +1,5 @@ /* - This sample applies the default Bootstrap 5 theme and any additional CSS overrides + This sample applies the default Bootstrap 6 theme and any additional CSS overrides ↓ For a custom look-and-feel, a generated Bootstrap theme could be added below ↓ */ @@ -7,31 +7,22 @@ /* ↓ Additional custom overrides ↓ */ -/* Add Bootstrap’s own documentation example highlight */ - -.bd-example { - position: relative; - padding: 1rem; - margin: 1rem -0.75rem 0; - border: solid #dee2e6 1px; -} - .custom-popover { --bs-popover-max-width: 200px; - --bs-popover-border-color: var(--bs-primary); - --bs-popover-header-bg: var(--bs-primary); + --bs-popover-border-color: var(--bs-primary-border); + --bs-popover-header-bg: var(--bs-primary-bg); --bs-popover-header-color: var(--bs-white); --bs-popover-body-padding-x: 1rem; --bs-popover-body-padding-y: 0.5rem; } .custom-tooltip { - --bs-tooltip-bg: var(--bs-primary); + --bs-tooltip-bg: var(--bs-primary-bg); } -/* override part of the Bootstrap color scheme */ +/* override parts of the Bootstrap color scheme */ :root { - --bs-code-color: var(--bs-secondary-color); + --bs-code-color: light-dark(var(--bs-gray-900), var(--bs-white)); } /* Make all CSS themes scrollable */ @@ -39,7 +30,7 @@ height: calc(100vh - 6rem); } -@media (max-width: 991.98px) { +@media (max-width: 1023.98px) { .css-themes-list { height: calc(100vh - 25rem); } diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 59ba2695..37b09055 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,6 +4,9 @@ name: CI branches: - master - develop + - v5 + - v6 + - css workflow_dispatch: jobs: @@ -26,7 +29,46 @@ jobs: env: SHA: ${{ env.SHA }} + # 1. Resolve Plugin URLs dynamically with fallback + - name: Resolve Plugin URLs 🔗 + id: plugins + if: github.ref_name != 'css' + run: | + owner="${{ github.repository_owner }}" + ref="${{ github.ref_name }}" + + # Function to check URL existence and return fallback on failure + get_plugin_url() { + local repo=$1 + local target_url="https://github.com/${owner}/${repo}/archive/${ref}.zip" + + # -s (silent), -f (fail on 4xx), -I (HEAD request), -L (follow redirects) + if curl -sfIL "$target_url" >/dev/null; then + echo "$target_url" + else + echo "https://github.com/dita-bootstrap/${repo}/archive/develop.zip" + fi + } + + HTML_URL=$(get_plugin_url "dita-bootstrap.html") + LUNR_URL=$(get_plugin_url "dita-bootstrap.lunr") + THEME_URL=$(get_plugin_url "dita-bootstrap.theme-switcher") + + # Generate multiline output list for the plugins + EOF=$(dd if=/dev/urandom bs=15 count=1 2>/dev/null | base64 | tr -dc 'a-zA-Z0-9') + echo "list<<$EOF" >> $GITHUB_OUTPUT + echo "fox.jason.extend.css" >> $GITHUB_OUTPUT + echo "$HTML_URL" >> $GITHUB_OUTPUT + echo "$LUNR_URL" >> $GITHUB_OUTPUT + echo "https://github.com/jason-fox/fox.jason.prismjs/archive/master.zip" >> $GITHUB_OUTPUT + echo "fox.jason.favicon" >> $GITHUB_OUTPUT + echo "fox.jason.open-graph" >> $GITHUB_OUTPUT + echo "$THEME_URL" >> $GITHUB_OUTPUT + echo "$EOF" >> $GITHUB_OUTPUT + + # 2. Build Bootstrap using the resolved list - name: Build Bootstrap + if: github.ref_name != 'css' uses: dita-ot/dita-ot-action@4.4 with: install: | @@ -34,22 +76,39 @@ jobs: export DEBIAN_FRONTEND=noninteractive apt-get install -qy --no-install-recommends nodejs nodejs -v - plugins: | - fox.jason.extend.css - https://github.com/dita-bootstrap/dita-bootstrap.html/archive/develop.zip - https://github.com/dita-bootstrap/dita-bootstrap.lunr/archive/develop.zip - https://github.com/jason-fox/fox.jason.prismjs/archive/master.zip - fox.jason.favicon - fox.jason.open-graph - https://github.com/dita-bootstrap/dita-bootstrap.theme-switcher/archive/develop.zip + plugins: ${{ steps.plugins.outputs.list }} project: .github/dita-ot/html.xml + # 2b. The css branch skips the DITA-OT doc build entirely — it just carries + # static CSS files (e.g. a Bootswatch theme ported to v6 tokens) to publish + # at a stable URL for the theme switcher to reference. + - name: Copy CSS output + if: github.ref_name == 'css' + run: | + mkdir -p out/html + cp css/*.css out/html/ + + # 3. Determine target folder dynamically based on current branch + - name: Determine target folder 📁 + id: set-target + run: | + if [ "${{ github.ref_name }}" = "master" ] || [ "${{ github.ref_name }}" = "develop" ]; then + echo "target_dir=" >> $GITHUB_OUTPUT + else + echo "target_dir=${{ github.ref_name }}" >> $GITHUB_OUTPUT + fi + + # 4. Deploy to the dynamically resolved folder - name: Deploy HTML 🚀 uses: JamesIves/github-pages-deploy-action@v4.8.0 with: token: ${{ secrets.GITHUB_TOKEN }} - branch: gh-pages # The branch the action should deploy to. - folder: out/html # The folder the action should deploy. - commit-message: '🚀 Deploy ${{ env.SHA }} to GitHub Pages' + branch: gh-pages + folder: out/html + target-folder: ${{ steps.set-target.outputs.target_dir }} + commit-message: '🚀 Deploy ${{ env.SHA }} to GitHub Pages (${{ github.ref_name }})' git-config-name: 'GitHub Action' - git-config-email: 'action@github.com' + clean-exclude: | + v5 + v6 + css diff --git a/.gitignore b/.gitignore index e640b74e..fd802f2f 100644 --- a/.gitignore +++ b/.gitignore @@ -71,4 +71,6 @@ xsl/dita2html5-bootstrapImpl.xsl xsl/dita2html5-legacy-3.0.xsl node_modules -out \ No newline at end of file +out +.gstack/ +.husky/ diff --git a/.lefthook.yml b/.lefthook.yml index 538b7b26..c91702c4 100644 --- a/.lefthook.yml +++ b/.lefthook.yml @@ -7,9 +7,9 @@ pre-commit: commands: prettier: glob: '*.{css,dita*,json,md,xml,xsl,yml}' - run: prettier --write {staged_files} + run: npx prettier --write {staged_files} stage_fixed: true stylelint: glob: '*.{css}' - run: stylelint {staged_files} + run: npx stylelint {staged_files} stage_fixed: true diff --git a/Customization/xsl/accordion.xsl b/Customization/xsl/accordion.xsl index 1bbe66a7..1014ef10 100644 --- a/Customization/xsl/accordion.xsl +++ b/Customization/xsl/accordion.xsl @@ -12,10 +12,10 @@ exclude-result-prefixes="xs xhtml dita-ot" > - +
@@ -24,75 +24,39 @@
- - - - - - - - - - - - - h6 - h - - - - - + +
-
- - + + + + + - - - - - -
- - - - - - - - - -
- - + + + + + + +
+ select="*[not(contains(@class, ' topic/title '))] | text() | comment() | processing-instruction()" + /> -
-
+
diff --git a/Customization/xsl/breadcrumb.xsl b/Customization/xsl/breadcrumb.xsl index 6e382e79..8e40956a 100644 --- a/Customization/xsl/breadcrumb.xsl +++ b/Customization/xsl/breadcrumb.xsl @@ -12,7 +12,7 @@ exclude-result-prefixes="xs dita-ot ditamsg" > - + diff --git a/Customization/xsl/card.xsl b/Customization/xsl/card.xsl index 08b95da1..85ce9519 100644 --- a/Customization/xsl/card.xsl +++ b/Customization/xsl/card.xsl @@ -12,10 +12,12 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > - + @@ -90,7 +92,9 @@ diff --git a/Customization/xsl/carousel.xsl b/Customization/xsl/carousel.xsl index 364380c1..9415866d 100644 --- a/Customization/xsl/carousel.xsl +++ b/Customization/xsl/carousel.xsl @@ -12,47 +12,50 @@ exclude-result-prefixes="xs xhtml dita-ot" > - + - + - - - - - - - - - - - - - - - - - - - - - - + +
+ + +
- -