feat: add automatic banner image download with picsum provider#294
Merged
rochacbruno merged 4 commits intomainfrom Jul 19, 2025
Merged
feat: add automatic banner image download with picsum provider#294rochacbruno merged 4 commits intomainfrom
rochacbruno merged 4 commits intomainfrom
Conversation
Implements automatic banner image download for posts using picsum.photos service. Images are downloaded only for posts (content with dates) when no banner_image is specified in frontmatter and the image file doesn't exist. - Add ImageProvider enum with Picsum variant to config - Add image_provider field to Marmite configuration struct - Create image_provider module with download functionality - Integrate automatic download into Content::from_markdown method - Include post tags in image seed for variety - Add ureq dependency for HTTP requests - Add comprehensive documentation post explaining the feature - Add example configuration to marmite.yaml The feature uses deterministic image generation with site name, post slug, and tags as seed to ensure consistent images across rebuilds. Closes #152 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Remove duplicate slugify implementation in image_provider module and import the existing one from content module instead. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Add command-line support for configuring automatic image download provider. Users can now override the image_provider setting from the command line using --image-provider argument. - Add image_provider field to CLI Configuration struct - Implement CLI override handling in config.rs - Add comprehensive documentation for CLI argument usage - Update configuration reference with image provider settings - Add examples and usage instructions in documentation Usage examples: - marmite site/ --image-provider picsum - marmite --generate-config --image-provider picsum 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR implements automatic banner image download functionality as described in issue #152. The feature automatically downloads banner images for posts using the picsum.photos service when no banner image is specified in frontmatter and the image file doesn't exist.
Key Features
image_provider: picsumin marmite.yamlImplementation Details
ImageProviderenum withPicsumvariant to config systemimage_providermodule with download functionalityContent::from_markdownmethodureqdependency for HTTP requests{slug}.banner.jpgin media folderhttps://picsum.photos/seed/{site-name-slug-tags}/1200/300Documentation
Test plan
mask fmtandmask checkfor code quality🤖 Generated with Claude Code