The 'plugins = python3' line in the uwsgi.ini example should be unnecessary when installing uwsgi from pip. This simplifies the configuration instructions and avoids potential confusion for users.
Added additional context to the explanation of the ProxyFix middleware in the README. It now details how to recognize issues with the `X-Forwarded-Host` header, such as the URL displaying internal IP and port instead of the domain name. This improvement helps users better understand when to enable the `PROXY_FIX` environment variable.
- Updated README to include detailed production deployment steps using uWSGI and Caddy for better performance and scalability.
- Added setup instructions for local development.
- Integrated ProxyFix middleware in the app to handle headers from reverse proxies, improving compatibility with various proxy setups.
Addresses better production readiness and proxy configuration.
Streamlined the Flask app setup by eliminating the factory function and directly initializing the app and registering blueprints in the global scope. This reduces complexity and improves readability. No functional changes introduced.
Added try-except block around gist fetch to handle potential
errors more gracefully by printing error messages instead of
failing silently. This improves debugging and user experience
when fetching GitHub gists in articles.
Added details on image proxying and GitHub gists embedding to the README. Clarified iframe loading behavior to improve documentation regarding user consent. This makes the README more comprehensive and informs users about these functionalities.
Introduced a proxy mechanism for handling iframes to improve security by preventing direct embedding of external content. External iframe URLs are now encoded and passed through a proxy endpoint, which renders a new template warning users about potential security risks.
Additionally, added button styles to CSS for consistent user experience and created an iframe security notice template.
Enhanced the Article model to include IFrame and GithubGist nodes, enabling rendering of embedded content such as iframes and GitHub gists. Implemented a new GithubClient to fetch gist content and updated MediumClient to handle iframe and gist types. Added styles and template support for iframes and gists in articles.
These changes improve the flexibility of article content, enabling richer media experiences.
Removed an unnecessary 'https://' prefix in the small URL example
to ensure proper URL rendering in the home page. This change
fixes an issue where the URL template would display incorrectly,
potentially causing confusion for users.
Consolidated opening and closing tags for text elements, removing unnecessary line breaks. This improves readability and reduces the complexity of the HTML structure, ensuring better maintainability. No functional changes are introduced.
Simplified app initialization by removing the `Config` class and cleaning up unused configuration settings. This reduces redundancy and potential confusion in the codebase.
- Added 'type' attribute to the Text dataclass to support HTML tag designation.
- Trimmed text content and assigned types in MediumClient to improve consistency.
- Updated article template to dynamically use text types, allowing for more flexible HTML structure.
- Applied CSS styling for 'pre' tags to enhance code block appearance.
These changes improve the semantic structure of articles and enhance the visual presentation of code blocks in the user interface.
Updated the instructional text to replace "medium.com" with the full "https://medium.com/" URL to avoid potential confusion and ensure users receive a clear and consistent guideline. This should enhance the user experience by providing explicit directions.
Cleaned up unused os imports in the configuration module to improve readability and reduce clutter. This change has no impact on functionality. No related issues.
Add initial project structure for Small, a clean frontend for reading Medium articles. This setup includes:
- Basic Flask app configuration with necessary dependencies.
- RESTful endpoint to fetch and serve Medium articles.
- Templates and static assets for the user interface.
- Utility functions for parsing Medium article IDs.
- Custom error pages (404 and 500) for nicer error handling.
- Project metadata files such as .gitignore, README, LICENSE, and pyproject.toml for project setup and documentation.
This structure sets the foundation for further development and feature additions.