Skip to content

Conversation

@marcarl
Copy link
Collaborator

@marcarl marcarl commented Jan 7, 2026

Summary

Fixes internal SFS links in HTML export to work correctly both in production and local testing environments.

Changes

  • Add <base href="/eli/"> to HTML documents: Enables relative link resolution for local testing
  • Update INTERNAL_LINKS_BASE_URL: Now includes /eli/ prefix (default: https://selex.se/eli)
  • Refactor link generation: Internal links use /sfs/ paths which resolve to /eli/sfs/ via base href
  • Add local testing script: New scripts/serve_html.py for serving HTML site locally
  • Update documentation: Add instructions for local testing in both README files

Why

Previously, internal links in HTML documents used /sfs/ paths which didn't match the actual /eli/sfs/ directory structure, causing 404 errors when testing locally.

Test plan

  1. Start local server: python scripts/serve_html.py
  2. Open http://localhost:8000 in browser
  3. Click on internal SFS links (e.g., "1968:758")
  4. Verify links resolve correctly to /eli/sfs/...

🤖 Generated with Claude Code

- Add <base href="/eli/"> to HTML documents to resolve relative links correctly
- Update INTERNAL_LINKS_BASE_URL to include /eli/ prefix (https://selex.se/eli)
- Internal links now use /sfs/ paths which resolve to /eli/sfs/ via base href
- Add serve_html.py script for local testing of HTML site
- Update documentation with instructions for local testing

This ensures internal SFS links work correctly both in production and when
testing locally with the HTTP server.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
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