-
Notifications
You must be signed in to change notification settings - Fork 171
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
Show Jinja Macro usage in pattern code snippets #5321
Show Jinja Macro usage in pattern code snippets #5321
Conversation
Added the base behavior of showing both Jinja and HTML in the docs. This needs to be accompanied by the following:
FYI @pastelcyborg @advl |
2e6cc32
to
dd319da
Compare
Updated this to syntax-highlight the HTML within macro slots, as I noticed they weren't highlighted in #5331 |
dd319da
to
ab2804c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I'd default to showing Jinja for the examples with macros - I think HTML is always the best default. We should probably assume our default user is external and would get limited value out of the macros.
Good call, switched so HTML is the default rather than Jinja |
f8c2147
to
4059b1b
Compare
fb2ea13
to
fcbfdf3
Compare
5692509
to
589e9a9
Compare
Done
data-lang="jinja"
to the placement element in the docs.example()
function. Added a route for/docs/example/<example_file_path>?raw=true
that serves raw template files. This was necessary to expose the Jinja templates of examples to the front-end so they can be rendered in docs page code snippets.example.js
filevar
inexample.js
tolet
orconst
throttle()
to a shared utils scriptXMLHttpRequest
to the more modernfetch
. Extracted the remote fetching logic into its ownasync
function, for simpler handling of multiple network requests.js-beautify
(fixes Format Codepen Code #5332)Fixes #5254
Fixes #5332
Fixes WD-13705
QA
build.css
is not loaded on a hard-refresh.Check if PR is ready for release
If this PR contains Vanilla SCSS code changes, it should contain the following changes to make sure it's ready for the release:
Feature 🎁
,Breaking Change 💣
,Bug 🐛
,Documentation 📝
,Maintenance 🔨
.package.json
should be updated relative to the most recent release, following semver convention:Screenshots