Skip to content

Conversation

@ebembi-crdb
Copy link
Contributor

Summary

  • Adds create_full_archive.py script for creating complete offline archives of the documentation
  • Adds OFFLINE_ARCHIVE_README.md with usage documentation

Features

  • Supports all doc versions (v23.1 - v26.1)
  • Localizes Google Fonts and jQuery for offline use
  • Fixes paths for relative navigation
  • Preserves version switcher functionality
  • Hides online-only elements (search, AI widgets)
  • Creates distributable ZIP archive (~1.5 GB)

Usage

# Build Jekyll site first
make build

# Create offline archive
python3 src/current/create_full_archive.py --zip

Test plan

  • Run python3 create_full_archive.py after building the site
  • Open complete_archive/index.html in browser
  • Verify navigation works
  • Verify version switcher displays correctly
  • Verify images load
  • Test links between pages

Adds tools for creating a complete offline archive of the CockroachDB
documentation that can be viewed locally in a browser.

- create_full_archive.py: Main script that builds the offline archive
- OFFLINE_ARCHIVE_README.md: Usage documentation

Features:
- Supports all doc versions (v23.1 - v26.1)
- Localizes Google Fonts and jQuery for offline use
- Fixes paths for relative navigation
- Preserves version switcher functionality
- Hides online-only elements (search, AI widgets)
- Creates distributable ZIP archive
@netlify
Copy link

netlify bot commented Feb 2, 2026

Deploy Preview for cockroachdb-interactivetutorials-docs failed. Why did it fail? →

Name Link
🔨 Latest commit ed5419d
🔍 Latest deploy log https://app.netlify.com/projects/cockroachdb-interactivetutorials-docs/deploys/6980bac3865b4a0008da3f46

@netlify
Copy link

netlify bot commented Feb 2, 2026

Deploy Preview for cockroachdb-api-docs canceled.

Name Link
🔨 Latest commit ed5419d
🔍 Latest deploy log https://app.netlify.com/projects/cockroachdb-api-docs/deploys/6980bac38c20a60008a027e9

@github-actions
Copy link

github-actions bot commented Feb 2, 2026

Files changed:

@netlify
Copy link

netlify bot commented Feb 2, 2026

Netlify Preview

Name Link
🔨 Latest commit ed5419d
🔍 Latest deploy log https://app.netlify.com/projects/cockroachdb-docs/deploys/6980bac4b7552800089f5005
😎 Deploy Preview https://deploy-preview-22442--cockroachdb-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@mohini-crl mohini-crl self-requested a review February 9, 2026 15:05
Copy link
Contributor

@mohini-crl mohini-crl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few changes -

  1. Stop mass HTML/JS surgery with blind regex - create_full_archive.py and other helpers perform many global re.sub() edits on HTML (e.g., mass href/src rewrites and head/body injections). Regex on HTML/JS is fragile and can corrupt inline scripts or JSON
  2. Make external downloads robust and/or vendor critical assets - the scripts download Google Fonts and navigation assets with single requests.get() calls. If the network or remote host is flaky, the archive build fails.flaky external calls make CI and local runs unreliable.Maybe add a requests.Session() with retries/backoff
  3. Make symlink handling portable — copy resolved targets instead of recreating symlinks - copy_tree_ignore_broken_symlinks() may recreate symlinks. Zipping symlinks and cross-platform behavior (Windows) is error-prone.

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