Commit Graph

13 Commits

Author SHA1 Message Date
kennethreitz 04652615f6 Fix docker-compose.yml — correct module ref, remove Flask env vars
engine:app → engine:api to match Responder. Remove FLASK_ENV and
DISABLE_ANALYTICS which were leftover from the Flask era.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 18:53:23 -04:00
kennethreitz f50dad4574 Switch to uvicorn, fix breadcrumbs for all content pages
- Replace gunicorn/gevent with uvicorn for ASGI support
- Add asgiref to wrap Flask WSGI app for uvicorn compatibility
- Enable auto-reload in docker-compose for development
- Add current_path to all content render_template calls
- Simplify breadcrumb template to exclude current page
- Only show breadcrumbs for nested paths (> 1 segment)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 16:58:17 -05:00
kennethreitz 60f1046204 Refactor search functionality and enhance caching mechanisms
- Removed the engine_new.py file as part of restructuring.
- Implemented actual search functionality in api.py, allowing for searching through blog posts with relevance scoring and snippet extraction.
- Enhanced caching in cache.py with a clear_cache function and improved content cleaning for search indexing.
- Deleted outdated homepage-revised.html template and ensured search.html template displays search results with additional metadata such as date and matches found.
2025-09-26 13:05:29 -04:00
kennethreitz 6700306bf0 Refactor Dockerfile and docker-compose.yml to remove 'uv' command prefix from gunicorn execution 2025-09-17 07:49:28 -04:00
kennethreitz 3d6dfae01b Refactor cache generation and improve metadata handling
- Updated docker-compose.yml to mount data directory for improved file access.
- Implemented a unified cache generation function in engine.py to streamline cache creation for blog posts, sidenotes, outlines, quotes, connections, and terms.
- Replaced individual cache extraction functions with a single MetadataCache class for cleaner access to cached data.
- Modified prebuild_cache.py to utilize the new unified cache function, ensuring all cache files are generated in a single sweep.
- Enhanced outlines.html template to simplify anchor URL generation for headings.
2025-09-16 19:37:23 -04:00
kennethreitz 6ac99803bf Upgrade to astral/uv image and fix docker-compose cache preservation
Updated Dockerfile to use official astral/uv:python3.13-bookworm base image instead of copying uv from separate image, simplifying build process. Fixed docker-compose.yml to preserve pre-built cache directory when mounting local files, ensuring instant startup works in both production and local development environments.

Changes:
- Use astral/uv:python3.13-bookworm as base image
- Remove multi-stage copy of uv binary
- Add cache volume preservation in docker-compose
- Maintain instant startup with pre-built caches in all environments

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-16 16:34:33 -04:00
kennethreitz e1245511d6 Implement Docker build-time cache pre-generation for instant startup
Added prebuild_cache.py script that generates all site caches (blog posts, sidenotes, outlines, quotes, connections, terms) as JSON files during Docker build. Modified engine.py to load pre-built caches on startup, eliminating the 30-40 second cache preload delay and making the site instantly responsive.

Key improvements:
- Zero startup delay with pre-built caches
- Proper datetime serialization/deserialization
- Graceful fallback to runtime caching if pre-built files missing
- Technology serving human consciousness - mechanical work during build, instant experience for users

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-16 10:29:51 -04:00
kennethreitz 70c639a739 Remove alternative development configuration from docker-compose.yml 2025-09-05 17:19:28 -04:00
kennethreitz 5fc22c30b4 test 2025-09-05 12:26:32 -04:00
kennethreitz 9037902048 Update gunicorn command to include markdown file watching 2025-09-05 11:18:42 -04:00
kennethreitz e01c5b0896 test 2025-09-05 11:13:26 -04:00
kennethreitz 6f67808233 Refactor code structure for improved readability and maintainability 2025-09-01 12:51:00 -04:00
Kenneth Reitz f04e27a09b test 2025-08-23 23:58:56 -04:00