Add image processing support from hexo-renderer-markdown-it#39
Open
PekingSpades wants to merge 1 commit intoCHENXCHEN:masterfrom
Open
Add image processing support from hexo-renderer-markdown-it#39PekingSpades wants to merge 1 commit intoCHENXCHEN:masterfrom
PekingSpades wants to merge 1 commit intoCHENXCHEN:masterfrom
Conversation
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.
feat: Add image processing support from hexo-renderer-markdown-it
Description
This PR introduces enhanced image processing capabilities by porting the image handling logic from the official
hexo-renderer-markdown-itplugin. This enhancement allows for better integration with Hexo's native image handling features while maintaining backward compatibility.Changes
1. New Image Processing Module (
lib/image.js)loading="lazy"attribute when enabledurl_forhelper for proper URL generation2. Renderer Architecture Refactoring
3. Enhanced Plugin System
lib/directory)Benefits
Configuration
The image processing feature works with existing configuration options and requires no additional setup. Users can optionally configure:
Testing
Related Issues
This enhancement addresses common user requests for better image handling in Hexo posts, particularly for users migrating from or familiar with the official hexo-renderer-markdown-it plugin.
Breaking Changes
None. This PR maintains full backward compatibility with existing configurations and usage patterns.
Checklist
Additional Notes
This feature brings hexo-renderer-markdown-it-plus closer to feature parity with the official renderer while maintaining the additional plugins and flexibility that make this fork valuable to the community.