Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: convert relative image urls to absolute #626

Merged
merged 1 commit into from
Jan 6, 2025

Conversation

saade
Copy link
Member

@saade saade commented Jan 6, 2025

This PR introduces functionality to automatically convert relative image URLs to absolute ones in plugin documentation and fixes existing issues with plugins that have already been merged with relative image URLs or got updated.

Background

Currently, we require plugin authors to manually convert relative URLs to absolute ones. This process is cumbersome and error-prone. Moreover, even if authors comply, future updates to the README may inadvertently reintroduce relative URLs.

Implementation Details

Reworking the Markdown Class:
The Markdown class has been modified to accept the plugin documentation URL. This allows the system to resolve and convert image URLs based on the correct branch, ensuring accuracy and consistency.

Foundation for Future Enhancements:

This update lays the groundwork for additional replacements, such as converting video links into corresponding HTML tags. This functionality will be implemented in a future PR if this one is accepted.

By automating this process, we improve reliability and reduce the burden on plugin authors.

@saade saade added the enhancement New feature or request label Jan 6, 2025
@saade saade requested a review from danharrin January 6, 2025 01:47
@saade saade self-assigned this Jan 6, 2025
@danharrin danharrin merged commit cd2bc1f into main Jan 6, 2025
2 checks passed
@danharrin
Copy link
Member

Nice work!

@saade saade deleted the feat/absolute-image-urls branch January 6, 2025 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants