fix: embedded shortcodes not being loaded when no shortcodes directory exists#339
Merged
rochacbruno merged 1 commit intomainfrom Aug 16, 2025
Merged
Conversation
d68e857 to
68ade7c
Compare
…y exists - Always load embedded/built-in shortcodes regardless of whether user has a shortcodes directory - Fixed shortcode processor reference passing to handle_content_pages - Updated documentation to clarify that built-in shortcodes are always available - Applied clippy fixes to test files Fixes #338
68ade7c to
75982c5
Compare
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 fixes issue #338 where embedded/built-in shortcodes were not being loaded when a site didn't have a
shortcodesdirectory.Problem
When users ran
marmite myblog --shortcodeson a site without a shortcodes directory, the list of available shortcodes was empty. Additionally, embedded shortcodes like<!-- .youtube id=xyz -->were not being processed during site generation.Solution
ShortcodeProcessor::collect_shortcodes()to always load built-in/embedded shortcodes first, before checking if the user's shortcodes directory existshandle_content_pages()Testing
Tested with the reproducer from issue #338:
Fixes #338