theia Documentation Web Server
Status: β Running on http://localhost:5000 (inside Docker container)
π Quick Startβ
The documentation server is currently running inside the Docker container!
Option 1: Access from Docker Container (Easiest)β
# SSH into the Docker container
docker exec -it claude-code-dev bash
# The server is already running! Check the logs:
cd /home/hal/v4/PROJECTS/t2/theia-research
tail -f server.log
# Server is accessible at:
# http://localhost:5000 (from inside the container)
# http://127.0.0.1:5000 (from inside the container)
# http://172.18.0.2:5000 (from inside the container)
Option 2: Port Forward to Windows Hostβ
To access the server from your Windows browser, you need to expose port 5000:
Method A: Restart Container with Port Mappingβ
- Stop the current container:
docker stop claude-code-dev
- Start with port mapping:
docker run -d \
--name claude-code-dev \
-p 5000:5000 \
-v C:/Users/Hal/v4:/home/hal/v4 \
[other existing flags...] \
[image name]
- Restart the server:
docker exec -it claude-code-dev bash
cd /home/hal/v4/PROJECTS/t2/theia-research
source venv/bin/activate
python serve_docs.py
- Access from Windows browser:
http://localhost:5000
Method B: Use docker-compose (Recommended)β
Add to docker-compose.yml:
services:
claude-dev:
ports:
- "5000:5000"
Then restart:
docker-compose down
docker-compose up -d
Method C: SSH Tunnel (Quick & Easy)β
From Windows PowerShell/CMD:
docker exec -it claude-code-dev bash -c "cd /home/hal/v4/PROJECTS/t2/theia-research && source venv/bin/activate && python serve_docs.py"
This runs the server in the foreground. Then access:
http://localhost:5000
π Featuresβ
π¨ Beautiful UIβ
- GitHub-style markdown rendering
- Syntax highlighting for all code blocks (TypeScript, Python, JSON, Bash)
- Responsive design (mobile-friendly)
- Dark header with clean white content area
π Full Navigationβ
- Sidebar with quick links to key documentation
- All internal crosslinks work (2,585 links)
- Browse by directory (docs/, pages/)
- Hash fragment support (e.g.,
#section-name)
πΌοΈ Imagesβ
- All 43 images properly served
- Diagrams and screenshots display correctly
- Architecture visualizations
π Metadataβ
- Source URL shown for each page
- Crawl timestamp displayed
- Links back to original theia-ide.org
πΊοΈ Navigationβ
Homepageβ
http://localhost:5000/
Loads the theia homepage
View Any Documentβ
http://localhost:5000/view/docs/architecture_ba3e2ea6.md
http://localhost:5000/view/docs/theia_ai_c6eb72b2.md
http://localhost:5000/view/pages/index_3fa68197.md
Browse Directoriesβ
http://localhost:5000/browse/docs
http://localhost:5000/browse/pages
Key Documentation Pagesβ
| Page | URL |
|---|---|
| Homepage | / or /view/pages/index_3fa68197.md |
| Documentation Hub | /view/docs/docs_eb80e882.md |
| Architecture | /view/docs/architecture_ba3e2ea6.md |
| theia AI | /view/docs/theia_ai_c6eb72b2.md |
| Services & Contributions | /view/docs/services_and_contributions_1852f9bd.md |
| Widgets | /view/docs/widgets_7ef2d829.md |
| Commands/Keybindings | /view/docs/commands_keybindings_a18dc5cc.md |
| Authoring Extensions | /view/docs/authoring_extensions_321e3e8e.md |
| User AI Guide | /view/docs/user_ai_8b40c6db.md |
| theia Coder | /view/docs/theia_coder_4f22850d.md |
π οΈ Server Managementβ
Start Server (if not running)β
# Inside Docker container
cd /home/hal/v4/PROJECTS/t2/theia-research
source venv/bin/activate
python serve_docs.py
Start in Backgroundβ
# Inside Docker container
cd /home/hal/v4/PROJECTS/t2/theia-research
source venv/bin/activate
nohup python serve_docs.py > server.log 2>&1 &
Check if Runningβ
# Check process
ps aux | grep serve_docs.py
# Check logs
tail -f /home/hal/v4/PROJECTS/t2/theia-research/server.log
# Test with curl
curl -I http://localhost:5000
Stop Serverβ
# Find process ID
ps aux | grep serve_docs.py
# Kill process
kill [PID]
# Or kill all Python processes (use with caution!)
pkill -f serve_docs.py
π Server Detailsβ
| Property | Value |
|---|---|
| Framework | Flask 3.1.2 |
| Port | 5000 |
| Host | 0.0.0.0 (all interfaces) |
| Debug Mode | Enabled |
| Documentation Dir | /home/hal/v4/PROJECTS/t2/theia-research/theia_docs_clean |
| Images Dir | /home/hal/v4/PROJECTS/t2/theia-research/theia_docs_clean/images |
Dependenciesβ
flask==3.1.2
markdown==3.9
pygments==2.19.2
All installed in virtual environment: /home/hal/v4/PROJECTS/t2/theia-research/venv/
π― Features in Detailβ
Markdown Renderingβ
- Parser: python-markdown 3.9
- Extensions: fenced_code, codehilite, tables, toc, nl2br, sane_lists
- Syntax Highlighting: Pygments with GitHub theme
- Code Languages: TypeScript, JavaScript, Python, JSON, YAML, Bash
Link Handlingβ
- Relative Links: Converted to
/view/URLs - Hash Fragments: Preserved (e.g.,
#section-name) - Images: Converted from
../images/to/images/ - External Links: Preserved (GitHub, community sites)
UI Componentsβ
- Header: Dark theme with theia branding
- Sidebar: Quick links + browsable sections
- Content: GitHub markdown CSS styling
- Code Blocks: highlight.js with GitHub theme
- Frontmatter: Displayed as metadata box
π Troubleshootingβ
Server Not Startingβ
# Check if port is already in use
netstat -tuln | grep 5000
# Check Python version
python --version # Should be 3.13+
# Check virtual environment
which python # Should show venv path
Links Not Workingβ
- Internal
.mdlinks should automatically work - If broken, check that the file exists in
theia_docs_clean/ - Check server logs for 404 errors
Images Not Loadingβ
# Verify images directory exists
ls -la /home/hal/v4/PROJECTS/t2/theia-research/theia_docs_clean/images/
# Should show 43 image files
Syntax Highlighting Not Workingβ
- Ensure Pygments is installed:
pip list | grep pygments - Check that code blocks have language tags in markdown
- Clear browser cache
π Developmentβ
Modify Serverβ
The server code is in: serve_docs.py
Key functions:
view_file(filepath)- Renders markdown to HTMLconvert_md_links()- Converts .md links to /view/ URLsextract_frontmatter()- Parses YAML frontmatterserve_image()- Serves static images
Customize Stylingβ
Edit the HTML_TEMPLATE in serve_docs.py:
- Change colors, fonts, layout
- Modify sidebar links
- Adjust responsive breakpoints
Add Featuresβ
Ideas for enhancement:
- Search functionality
- Table of contents navigation
- Print-friendly CSS
- Dark mode toggle
- Breadcrumb navigation
- Previous/Next page buttons
β Verificationβ
The server is working correctly if you can:
- Access http://localhost:5000
- See the theia homepage with proper styling
- Navigate using sidebar links
- Click internal crosslinks (go to other pages)
- See code blocks with syntax highlighting
- View images (diagrams, screenshots)
- Browse /browse/docs and /browse/pages
- See source URL and crawl timestamp metadata
π Summaryβ
You now have a fully-functional documentation web server serving the cleaned theia documentation with:
β Beautiful GitHub-style UI β Syntax highlighting for 200+ code blocks β 2,585 working internal links β 43 images properly served β Responsive mobile-friendly design β Fast markdown-to-HTML rendering
Perfect for:
- Local development reference
- Offline documentation browsing
- Team knowledge sharing
- Custom documentation portal
Server Ready! π
Access at: http://localhost:5000 (after port forwarding)