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(social-media-cards): support relative paths #163

Merged
merged 1 commit into from
Sep 17, 2023

Conversation

welpo
Copy link
Owner

@welpo welpo commented Sep 17, 2023

Description

This PR adds the ability to specify relative paths for the social_media_card in a post. Useful for co-located assets in posts with a structure like:

/content/
    blog/
        post-folder/
            index.md
            social-media-card.jpg
        _index.md

In the example above, the social media card can now be set with social_media_card = social-media-card.jpg instead of its full path.

New Features

  • Support for relative paths for social_media_card based on the colocated folder.
  • Detailed error messages to aid debugging when the image is not found.

How Has This Been Tested?

  • Manually tested the changes by creating posts with relative and absolute paths for the social media cards.
  • Verified that appropriate error messages are shown when the image file does not exist at either of the specified paths.

Additional Context

This feature was requested in Issue #161.

@welpo welpo added the enhancement New feature or request label Sep 17, 2023
@welpo welpo linked an issue Sep 17, 2023 that may be closed by this pull request
@welpo welpo merged commit 049babb into main Sep 17, 2023
1 check passed
@welpo welpo deleted the feat/allow-colocated-social-media-cards branch September 17, 2023 11:36
@welpo welpo changed the title ✨ feat(social-media-cards): allow colocated paths ✨ feat(social-media-cards): support relative paths Sep 17, 2023
@SeaDve
Copy link
Contributor

SeaDve commented Sep 17, 2023

Thanks for the quick fix!

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.

Allow relative paths on extra.social_media_card
2 participants