From 6974779c3e436b8fbcc98d0aa234a62c352576a5 Mon Sep 17 00:00:00 2001 From: Tommy Keswick Date: Tue, 1 Sep 2026 10:11:37 -0700 Subject: [PATCH 1/2] Render the docs site instead of publishing the repository static.yml uploads the entire repository as the Pages artifact (`path: '.'`). Two consequences, both live right now: - Repository internals are served publicly. Makefile, codemeta.json, deno.json and page.tmpl all return 200 from software.library.caltech.edu/CL-web-components/. - The site is whatever HTML happens to be committed. Nothing renders the Markdown, so a documentation change only reaches the site if someone remembers to run `make website` and commit the output. This replaces it with a build. The build logic is not copied into this repository: it lives in caltechlibrary/workflows and is referenced at @v1, so a fix there reaches this site -- and every other Caltech Library site -- on the next run, with nothing written back here. Sources move into docs/, which is what makes the rest possible: the build no longer looks at the repository root, so the generated HTML committed there becomes unused and can be removed separately rather than as part of this change. Demo and test pages move with them; they are sources, not output. README.md and INSTALL.md stay in the root because cmt writes them there and can only write to the root -- its generator registry keys on the exact output filename, so `cmt codemeta.json docs/about.md` exits with "unsupported format". `extra-sources: "*.md"` renders them, so every Markdown file that is published today is still published. The Pandoc Lua filters are no longer carried here; both are byte-identical to the shared copies. page.tmpl stays, moved to pandoc/ and passed as an override, because its nav is specific to this project. deno.json now bundles into dist/ rather than over the top of the repository root, so the workflow publishes freshly built bundles rather than whatever was last committed. The `release` task was already doing this and had drifted from `build`, which is why release zips and local builds could disagree. website.mak and website.ps1 are deleted; nothing reads them once the build is in CI, and leaving them invites someone to run a build that writes HTML back into the working tree. No search index is built. search.md and pagefind/ were removed and the Search link is commented out of the nav, so there is no page to index. Adding search back is a separate decision. Co-Authored-By: Claude Opus 5 --- .github/workflows/docs.yml | 79 +++++++++++++++++++ .github/workflows/static.yml | 43 ---------- .gitignore | 3 + add-col-scope.lua | 9 --- deno.json | 2 +- DEPLOYMENT.md => docs/DEPLOYMENT.md | 79 ++++++------------- DEVELOPERS.md => docs/DEVELOPERS.md | 0 .../building_web_components_with_deno.md | 0 card-layout.md => docs/card-layout.md | 0 .../demo_a-to-z-list_long.html | 0 .../demo_a-to-z-list_multiple.html | 0 .../demo_a-to-z-list_short.html | 0 .../demo_agent-list.html | 0 .../demo_card-layout.html | 0 demo_csv0.html => docs/demo_csv0.html | 0 demo_csv1.html => docs/demo_csv1.html | 0 demo_csv2.html => docs/demo_csv2.html | 0 demo_csv3.html => docs/demo_csv3.html | 0 demo_csv4.html => docs/demo_csv4.html | 0 demo_csv5.html => docs/demo_csv5.html | 0 .../demo_csv_autocomplete0.html | 0 .../demo_csv_autocomplete1.html | 0 .../demo_csv_basic.html | 0 .../demo_csv_customCleanupFilter.html | 0 .../demo_csv_submit.html | 0 .../demo_footer_global.html | 0 .../demo_footer_global_lite.html | 0 .../demo_organization_list.html | 0 .../demo_people_list.html | 0 .../demo_table-sortable.html | 0 .../enhance_code_blocks.md | 0 footer-global.md => docs/footer-global.md | 0 .../integrating_CSS_in_web_components.md | 0 table-sortable.md => docs/table-sortable.md | 0 .../textarea-agent-list-test.html | 0 .../textarea-agent-list.md | 0 textarea-csv.md => docs/textarea-csv.md | 0 .../textarea-csv_test.html | 0 ul-a-to-z-list.md => docs/ul-a-to-z-list.md | 0 user_manual.md => docs/user_manual.md | 0 .../web_component_naming.md | 0 links-to-html.lua | 6 -- page.tmpl => pandoc/page.tmpl | 0 website.mak | 27 ------- website.ps1 | 37 --------- 45 files changed, 106 insertions(+), 179 deletions(-) create mode 100644 .github/workflows/docs.yml delete mode 100644 .github/workflows/static.yml delete mode 100644 add-col-scope.lua rename DEPLOYMENT.md => docs/DEPLOYMENT.md (74%) rename DEVELOPERS.md => docs/DEVELOPERS.md (100%) rename building_web_components_with_deno.md => docs/building_web_components_with_deno.md (100%) rename card-layout.md => docs/card-layout.md (100%) rename demo_a-to-z-list_long.html => docs/demo_a-to-z-list_long.html (100%) rename demo_a-to-z-list_multiple.html => docs/demo_a-to-z-list_multiple.html (100%) rename demo_a-to-z-list_short.html => docs/demo_a-to-z-list_short.html (100%) rename demo_agent-list.html => docs/demo_agent-list.html (100%) rename demo_card-layout.html => docs/demo_card-layout.html (100%) rename demo_csv0.html => docs/demo_csv0.html (100%) rename demo_csv1.html => docs/demo_csv1.html (100%) rename demo_csv2.html => docs/demo_csv2.html (100%) rename demo_csv3.html => docs/demo_csv3.html (100%) rename demo_csv4.html => docs/demo_csv4.html (100%) rename demo_csv5.html => docs/demo_csv5.html (100%) rename demo_csv_autocomplete0.html => docs/demo_csv_autocomplete0.html (100%) rename demo_csv_autocomplete1.html => docs/demo_csv_autocomplete1.html (100%) rename demo_csv_basic.html => docs/demo_csv_basic.html (100%) rename demo_csv_customCleanupFilter.html => docs/demo_csv_customCleanupFilter.html (100%) rename demo_csv_submit.html => docs/demo_csv_submit.html (100%) rename demo_footer_global.html => docs/demo_footer_global.html (100%) rename demo_footer_global_lite.html => docs/demo_footer_global_lite.html (100%) rename demo_organization_list.html => docs/demo_organization_list.html (100%) rename demo_people_list.html => docs/demo_people_list.html (100%) rename demo_table-sortable.html => docs/demo_table-sortable.html (100%) rename enhance_code_blocks.md => docs/enhance_code_blocks.md (100%) rename footer-global.md => docs/footer-global.md (100%) rename integrating_CSS_in_web_components.md => docs/integrating_CSS_in_web_components.md (100%) rename table-sortable.md => docs/table-sortable.md (100%) rename textarea-agent-list-test.html => docs/textarea-agent-list-test.html (100%) rename textarea-agent-list.md => docs/textarea-agent-list.md (100%) rename textarea-csv.md => docs/textarea-csv.md (100%) rename textarea-csv_test.html => docs/textarea-csv_test.html (100%) rename ul-a-to-z-list.md => docs/ul-a-to-z-list.md (100%) rename user_manual.md => docs/user_manual.md (100%) rename web_component_naming.md => docs/web_component_naming.md (100%) delete mode 100644 links-to-html.lua rename page.tmpl => pandoc/page.tmpl (100%) delete mode 100644 website.mak delete mode 100644 website.ps1 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..8daa3b9 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,79 @@ +name: Docs + +# Builds the documentation site and publishes it to GitHub Pages. +# +# Replaces static.yml, which uploaded the entire repository as the site. That +# published the Makefile, codemeta.json, deno.json, page.tmpl and everything +# else in the root -- all of them fetchable from software.library.caltech.edu +# today -- and it served whatever HTML happened to be committed rather than +# rendering the Markdown. +# +# The build itself lives in caltechlibrary/workflows, so a fix there reaches +# this site -- and every other Caltech Library site -- on the next run, with +# nothing written back into this repository. +# +# This calls the build action rather than the docs-pandoc.yml reusable +# workflow, because the site publishes compiled component bundles and a +# reusable workflow gives the caller nowhere to add a Deno setup step. +# +# The Pandoc Lua filters come from the shared repository; both are identical to +# the copies that used to live in this root. + +on: + push: + branches: [main] + pull_request: + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: pages + cancel-in-progress: false + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + + - uses: denoland/setup-deno@v2 + with: + deno-version: v2.x + + - name: Bundle components + run: deno task build + + - uses: caltechlibrary/workflows/.github/actions/build-pandoc@v1 + with: + docs-dir: docs + # Markdown in the root is published too. cmt writes README.md and + # INSTALL.md there and can only write to the root. + extra-sources: "*.md" + template: pandoc/page.tmpl + include: | + dist/*.js + mod.js + LICENSE + css + src + + # No index-site: search.md and the Pagefind index were removed, and the + # Search link is commented out of the nav, so there is no page to index. + + - uses: caltechlibrary/workflows/.github/actions/deploy-site@v1 + + deploy: + needs: build + # Pull requests build but do not publish. + if: github.event_name != 'pull_request' + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - id: deployment + uses: actions/deploy-pages@v5 diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml deleted file mode 100644 index 460f782..0000000 --- a/.github/workflows/static.yml +++ /dev/null @@ -1,43 +0,0 @@ -# Simple workflow for deploying static content to GitHub Pages -name: Deploy static content to Pages - -on: - # Runs on pushes targeting the default branch - push: - branches: ["main"] - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages -permissions: - contents: read - pages: write - id-token: write - -# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. -# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. -concurrency: - group: "pages" - cancel-in-progress: false - -jobs: - # Single deploy job since we're just deploying - deploy: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Setup Pages - uses: actions/configure-pages@v5 - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - with: - # Upload entire repository - path: '.' - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v5 diff --git a/.gitignore b/.gitignore index 7d4560c..0f8a8f1 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,9 @@ bin/ dist/ scratch/ +# The site is assembled by CI and uploaded as an artifact, never committed. +/_site/ + # macOS system files .DS_Store diff --git a/add-col-scope.lua b/add-col-scope.lua deleted file mode 100644 index f3eb08e..0000000 --- a/add-col-scope.lua +++ /dev/null @@ -1,9 +0,0 @@ --- add-col-scope.lua adds a scope="col" to table header elements -function Table(tbl) - for _, head in ipairs(tbl.head.rows) do - for _, cell in ipairs(head.cells) do - cell.attr.attributes["scope"] = "col" - end - end - return tbl -end diff --git a/deno.json b/deno.json index 6c2e795..e73060a 100644 --- a/deno.json +++ b/deno.json @@ -1,6 +1,6 @@ { "tasks": { - "build": "deno bundle --platform browser --outdir=./ src/*.js ; deno bundle --platform browser mod.js --output=cl-web-components.js", + "build": "deno bundle --platform browser --outdir=./dist src/*.js ; deno bundle --platform browser --output=dist/cl-web-components.js mod.js", "release": "deno bundle --platform=browser --outdir=./dist src/*.js ; deno bundle --platform=browser --output=dist/cl-web-components.js mod.js" }, "imports": { diff --git a/DEPLOYMENT.md b/docs/DEPLOYMENT.md similarity index 74% rename from DEPLOYMENT.md rename to docs/DEPLOYMENT.md index 3d63e91..5f7f20c 100644 --- a/DEPLOYMENT.md +++ b/docs/DEPLOYMENT.md @@ -25,54 +25,42 @@ This file is included in gitignore and is **not committed to git**. Use this workflow when **only documentation (`.md`) files have changed**. -## Step 1. Convert mardown files to html files +## Step 1. Edit and push -```bash -make website -``` - -This command: - -- Converts all `*.md` files to `*.html` using **Pandoc** -- Rebuilds the **Pagefind search index** - -## Step 2. Save and push your working branch - -If you added **new files**, stage them first: +Documentation sources live in `docs/`. Edit the Markdown, then commit and push: ```bash git add +git commit -m "your commit message" +git push ``` -Then commit and push: +There is no HTML to build by hand. The **Docs** workflow renders the site with +Pandoc and publishes it to GitHub Pages on every push to `main`. The build +lives in [caltechlibrary/workflows](https://github.com/caltechlibrary/workflows), +so a fix there reaches this site on the next run. The Pandoc template is this +repository's own, in `pandoc/`; the Lua filters come from the shared repository. -```bash -make save msg="your commit message" -``` - -`make save` uses `git commit -am` which only commits already-tracked files. New files must be staged with `git add` first. - -## Step 3. Publish html files to GitHub Pages +## Step 2. Confirm the deployment ```bash -./publish.bash +gh run watch ``` -This script will prompt you: +The site updates at +when the workflow completes. Pull requests build the site but do not publish +it, so a change that breaks the docs fails in review rather than after merge. -``` -You're in main branch -You need to pull in changes to the gh-pages branch to publish -process Y/n -``` +### Previewing locally -Enter `y` to proceed. +Clone the shared repository once and put its `bin/` on your `PATH`, then: -It will: +```bash +build-pandoc.sh --docs-dir docs --extra-source "*.md" --template pandoc/page.tmpl +open _site/index.html +``` -- Merge your current branch into `gh-pages` -- Push the update to GitHub Pages -- Switch you back to your working branch +That is the same script CI runs. --- @@ -101,12 +89,6 @@ This command runs `deno task build` and bundles: This shows which files will be uploaded without making changes. -## Step 3. Build the documentation website - -```bash -make website -``` - ## Step 4. Save and push your working branch If you added **new files**, stage them first: @@ -135,21 +117,7 @@ This script: - Places them under `/cl-webcomponents/` in the S3 bucket - Creates a **CloudFront cache invalidation** so the CDN serves the new files -## Step 6. Publish html files to GitHub Pages - -```bash -./publish.bash -``` - -This script will prompt you: - -``` -You're in main branch -You need to pull in changes to the gh-pages branch to publish -process Y/n -``` - -Enter `y` to proceed. +The documentation site redeploys on its own when the push lands on `main`. --- @@ -241,9 +209,8 @@ https://github.com/caltechlibrary/CL-web-components/releases | Task | Command | |-----|---------| | Compile source code | `make build` | -| Build documentation website | `make website` | | Save and push working branch | `make save msg="your message"` | -| Publish docs to GitHub Pages | `./publish.bash` | +| Deploy the docs site | Automatic on push to `main` | | Preview S3 deployment | `./publish_to_s3.bash dry-run` | | Deploy JS to S3 and invalidate CDN cache | `./publish_to_s3.bash` | | Invalidate CDN cache only | `./invalidate_cdn.bash` | diff --git a/DEVELOPERS.md b/docs/DEVELOPERS.md similarity index 100% rename from DEVELOPERS.md rename to docs/DEVELOPERS.md diff --git a/building_web_components_with_deno.md b/docs/building_web_components_with_deno.md similarity index 100% rename from building_web_components_with_deno.md rename to docs/building_web_components_with_deno.md diff --git a/card-layout.md b/docs/card-layout.md similarity index 100% rename from card-layout.md rename to docs/card-layout.md diff --git a/demo_a-to-z-list_long.html b/docs/demo_a-to-z-list_long.html similarity index 100% rename from demo_a-to-z-list_long.html rename to docs/demo_a-to-z-list_long.html diff --git a/demo_a-to-z-list_multiple.html b/docs/demo_a-to-z-list_multiple.html similarity index 100% rename from demo_a-to-z-list_multiple.html rename to docs/demo_a-to-z-list_multiple.html diff --git a/demo_a-to-z-list_short.html b/docs/demo_a-to-z-list_short.html similarity index 100% rename from demo_a-to-z-list_short.html rename to docs/demo_a-to-z-list_short.html diff --git a/demo_agent-list.html b/docs/demo_agent-list.html similarity index 100% rename from demo_agent-list.html rename to docs/demo_agent-list.html diff --git a/demo_card-layout.html b/docs/demo_card-layout.html similarity index 100% rename from demo_card-layout.html rename to docs/demo_card-layout.html diff --git a/demo_csv0.html b/docs/demo_csv0.html similarity index 100% rename from demo_csv0.html rename to docs/demo_csv0.html diff --git a/demo_csv1.html b/docs/demo_csv1.html similarity index 100% rename from demo_csv1.html rename to docs/demo_csv1.html diff --git a/demo_csv2.html b/docs/demo_csv2.html similarity index 100% rename from demo_csv2.html rename to docs/demo_csv2.html diff --git a/demo_csv3.html b/docs/demo_csv3.html similarity index 100% rename from demo_csv3.html rename to docs/demo_csv3.html diff --git a/demo_csv4.html b/docs/demo_csv4.html similarity index 100% rename from demo_csv4.html rename to docs/demo_csv4.html diff --git a/demo_csv5.html b/docs/demo_csv5.html similarity index 100% rename from demo_csv5.html rename to docs/demo_csv5.html diff --git a/demo_csv_autocomplete0.html b/docs/demo_csv_autocomplete0.html similarity index 100% rename from demo_csv_autocomplete0.html rename to docs/demo_csv_autocomplete0.html diff --git a/demo_csv_autocomplete1.html b/docs/demo_csv_autocomplete1.html similarity index 100% rename from demo_csv_autocomplete1.html rename to docs/demo_csv_autocomplete1.html diff --git a/demo_csv_basic.html b/docs/demo_csv_basic.html similarity index 100% rename from demo_csv_basic.html rename to docs/demo_csv_basic.html diff --git a/demo_csv_customCleanupFilter.html b/docs/demo_csv_customCleanupFilter.html similarity index 100% rename from demo_csv_customCleanupFilter.html rename to docs/demo_csv_customCleanupFilter.html diff --git a/demo_csv_submit.html b/docs/demo_csv_submit.html similarity index 100% rename from demo_csv_submit.html rename to docs/demo_csv_submit.html diff --git a/demo_footer_global.html b/docs/demo_footer_global.html similarity index 100% rename from demo_footer_global.html rename to docs/demo_footer_global.html diff --git a/demo_footer_global_lite.html b/docs/demo_footer_global_lite.html similarity index 100% rename from demo_footer_global_lite.html rename to docs/demo_footer_global_lite.html diff --git a/demo_organization_list.html b/docs/demo_organization_list.html similarity index 100% rename from demo_organization_list.html rename to docs/demo_organization_list.html diff --git a/demo_people_list.html b/docs/demo_people_list.html similarity index 100% rename from demo_people_list.html rename to docs/demo_people_list.html diff --git a/demo_table-sortable.html b/docs/demo_table-sortable.html similarity index 100% rename from demo_table-sortable.html rename to docs/demo_table-sortable.html diff --git a/enhance_code_blocks.md b/docs/enhance_code_blocks.md similarity index 100% rename from enhance_code_blocks.md rename to docs/enhance_code_blocks.md diff --git a/footer-global.md b/docs/footer-global.md similarity index 100% rename from footer-global.md rename to docs/footer-global.md diff --git a/integrating_CSS_in_web_components.md b/docs/integrating_CSS_in_web_components.md similarity index 100% rename from integrating_CSS_in_web_components.md rename to docs/integrating_CSS_in_web_components.md diff --git a/table-sortable.md b/docs/table-sortable.md similarity index 100% rename from table-sortable.md rename to docs/table-sortable.md diff --git a/textarea-agent-list-test.html b/docs/textarea-agent-list-test.html similarity index 100% rename from textarea-agent-list-test.html rename to docs/textarea-agent-list-test.html diff --git a/textarea-agent-list.md b/docs/textarea-agent-list.md similarity index 100% rename from textarea-agent-list.md rename to docs/textarea-agent-list.md diff --git a/textarea-csv.md b/docs/textarea-csv.md similarity index 100% rename from textarea-csv.md rename to docs/textarea-csv.md diff --git a/textarea-csv_test.html b/docs/textarea-csv_test.html similarity index 100% rename from textarea-csv_test.html rename to docs/textarea-csv_test.html diff --git a/ul-a-to-z-list.md b/docs/ul-a-to-z-list.md similarity index 100% rename from ul-a-to-z-list.md rename to docs/ul-a-to-z-list.md diff --git a/user_manual.md b/docs/user_manual.md similarity index 100% rename from user_manual.md rename to docs/user_manual.md diff --git a/web_component_naming.md b/docs/web_component_naming.md similarity index 100% rename from web_component_naming.md rename to docs/web_component_naming.md diff --git a/links-to-html.lua b/links-to-html.lua deleted file mode 100644 index 935304b..0000000 --- a/links-to-html.lua +++ /dev/null @@ -1,6 +0,0 @@ --- links-to-html.lua converts links to local Markdown documents to --- there respective .html counterparts. -function Link(el) - el.target = string.gsub(el.target, "%.md", ".html") - return el -end diff --git a/page.tmpl b/pandoc/page.tmpl similarity index 100% rename from page.tmpl rename to pandoc/page.tmpl diff --git a/website.mak b/website.mak deleted file mode 100644 index 8f2845a..0000000 --- a/website.mak +++ /dev/null @@ -1,27 +0,0 @@ - -# generated with CMTools 0.0.15 50d2dd2 - -# -# Makefile for running pandoc on all Markdown docs ending in .md -# -PROJECT = CL-web-components - -PANDOC = $(shell which pandoc) - -MD_PAGES = $(shell ls -1 *.md) - -HTML_PAGES = $(shell ls -1 *.md | sed -E 's/\.md/\.html/g') - -build: $(HTML_PAGES) $(MD_PAGES) - -$(HTML_PAGES): $(MD_PAGES) .FORCE - if [ -f $(PANDOC) ]; then $(PANDOC) --metadata title=$(basename $@) -s --to html5 $(basename $@).md -o $(basename $@).html \ - --lua-filter=links-to-html.lua \ - --lua-filter=add-col-scope.lua \ - --template=page.tmpl; fi - @if [ $@ = "README.html" ]; then mv README.html index.html; fi - -clean: - @rm *.html - -.FORCE: diff --git a/website.ps1 b/website.ps1 deleted file mode 100644 index af07829..0000000 --- a/website.ps1 +++ /dev/null @@ -1,37 +0,0 @@ -<# -generated with CMTools 0.0.15 50d2dd2 - -.SYNOPSIS -PowerShell script for running pandoc on all Markdown docs ending in .md -#> -$project = "CMTools" -Write-Output "Building website for ${project}" -$pandoc = Get-Command pandoc | Select-Object -ExpandProperty Source - -# Get all markdown files except 'nav.md' -$mdPages = Get-ChildItem -Filter *.md | Where-Object { $_.Name -ne "nav.md" } - -# Generate HTML page names from markdown files -$htmlPages = $mdPages | ForEach-Object { [System.IO.Path]::ChangeExtension($_.Name, ".html") } - -function Build-HtmlPage { - param($htmlPages, $mdPages) - - foreach ($htmlPage in $htmlPages) { - $mdPage = [System.IO.Path]::ChangeExtension($htmlPage, ".md") - if (Test-Path $pandoc) { - & $pandoc "--metadata" "title=$($htmlPage.Replace('.html', ''))" "-s" "--to" "html5" $mdPage "-o" $htmlPage ` - "--lua-filter=links-to-html.lua" ` - "--lua-filter=add-col-scope.lua" ` - "--template=page.tmpl" - } - - if ($htmlPage -eq "README.html") { - Move-Item -Path "README.html" -Destination "index.html" -Force - } - } -} - -# Build HTML page -Build-HtmlPage -htmlPages $htmlPages -mdPages $mdPages - From 21f5b09f51d38ba8261be4d47ea3ec4206d88e36 Mon Sep 17 00:00:00 2001 From: Tommy Keswick Date: Tue, 1 Sep 2026 13:51:43 -0700 Subject: [PATCH 2/2] Restore the search page and its index search.md and pagefind/ were removed and the Search nav link commented out, but the generated search.html stayed committed -- so the live site serves a search page whose assets 404: search.html 200 pagefind/pagefind-ui.js 404 pagefind/pagefind.js 404 The page loads and silently does nothing. The index is rebuilt on every run now rather than committed, so it cannot go stale the way the old one did. search.md returns to docs/ unchanged, including the two behaviours worth keeping: baseUrl computed from the path, so results resolve under a project-pages prefix, and ?q= deep-linking via triggerSearch. The shared action pins Pagefind 1.5.2, which is the current release. The accessibility improvements people associate with 1.5.0 come from its new Component UI, which the release notes are explicit is optional -- the Default UI "remains available and supported" at this version. Migrating to the Component UI is worth doing but is a separate change, and worth doing once in the shared repository rather than in each site: this search page is byte-identical across CL-web-components, CL-Pandoc-filters and etd-workflow, and near-identical in several more. Co-Authored-By: Claude Opus 5 --- .github/workflows/docs.yml | 6 ++++-- docs/search.md | 30 ++++++++++++++++++++++++++++++ pandoc/page.tmpl | 2 +- 3 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 docs/search.md diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 8daa3b9..81a630f 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -61,8 +61,10 @@ jobs: css src - # No index-site: search.md and the Pagefind index were removed, and the - # Search link is commented out of the nav, so there is no page to index. + # Pagefind is pinned in the shared action. 1.5.2 is current; the + # accessibility improvements in 1.5.0 come from its new Component UI, + # which is a separate migration and does not require a version change. + - uses: caltechlibrary/workflows/.github/actions/index-site@v1 - uses: caltechlibrary/workflows/.github/actions/deploy-site@v1 diff --git a/docs/search.md b/docs/search.md new file mode 100644 index 0000000..e398413 --- /dev/null +++ b/docs/search.md @@ -0,0 +1,30 @@ + + +# CL-web-components + + + + + diff --git a/pandoc/page.tmpl b/pandoc/page.tmpl index 5d2c971..0e39f29 100644 --- a/pandoc/page.tmpl +++ b/pandoc/page.tmpl @@ -21,7 +21,7 @@
  • DEPLOYMENT
  • User Manual
  • - +
  • Search
  • Code Repository