Skip to content

Vendor all site assets for air-gapped build and runtime#3

Draft
software-testing-professional with Copilot wants to merge 1 commit into
mainfrom
copilot/build-static-website-resources
Draft

Vendor all site assets for air-gapped build and runtime#3
software-testing-professional with Copilot wants to merge 1 commit into
mainfrom
copilot/build-static-website-resources

Conversation

Copilot AI commented Jul 2, 2026

Copy link
Copy Markdown

The site still depended on external asset sources and a networked frontend install path, which breaks both build and serving in an air-gapped environment. This change vendors the required theme/runtime assets into the repository and updates Hugo/Docker wiring so generated pages resolve only local resources.

  • Build path

    • Removes the container-time npm ci step and switches the Hugo build to consume repository-vendored dependencies directly.
    • Keeps the build fail-fast if node_modules/ is missing, making the offline assumption explicit.
  • Hugo asset mounts

    • Extends config/_default/module.toml to mount vendored third-party assets into Hugo:
      • mermaid under assets/vendor/mermaid
      • katex under static/vendor/katex
      • mathjax under static/vendor/mathjax
  • Template overrides for local-only resources

    • Replaces CDN-backed KaTeX and MathJax partials with local asset references.
    • Overrides Mermaid initialization so the generated script imports the vendored module instead of cdn.jsdelivr.net.
  • Repository packaging

    • Stops ignoring node_modules/ so the theme packages, fonts, icons, and JS dependencies are present in-repo for offline builds.
    • Adds the required runtime packages (katex, mathjax, mermaid) to the project dependency set so their distributable assets are versioned alongside the site.
  • Docs

    • Updates the README and introduction docs to reflect that frontend/theme assets are vendored for air-gapped use and no network fetch is required during build.
<link rel="stylesheet" href="{{ "vendor/katex/katex.min.css" | absURL }}">
<script defer src="{{ "vendor/mathjax/tex-mml-chtml.js" | absURL }}"></script>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants