Add rsx_file! macro for external RSX template files#184
Closed
thefiddler wants to merge 1 commit intovidhanio:mainfrom
Closed
Add rsx_file! macro for external RSX template files#184thefiddler wants to merge 1 commit intovidhanio:mainfrom
thefiddler wants to merge 1 commit intovidhanio:mainfrom
Conversation
1daa483 to
42b2ea0
Compare
… files Enables loading RSX templates from external files relative to CARGO_MANIFEST_DIR, with include_bytes!-based dependency tracking for automatic recompilation.
42b2ea0 to
876bf23
Compare
Author
|
Closing in favour of #185 |
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.
Closes #148
This MR adds two new macros,
rsx_file!andrsx_file_borrow!mirroringrsx!andrsx_borrow!, that allow users to split html code into separate.htmlfiles if they wish. This enables formatting and linting support for free using the default IDE language servers e.g. in Zed or VSCode.Design choices:
rsx_file!naming scheme for consistency with sqlxquery_file!templates/directory with askama.toml override, but rather let the user choose the complete path. But happy to change if we want to increase consistency with askama.Example
Let me know your thoughts!