Error: Reason: Failed to render 'shortcodes/warning.html'Error: Reason: Filter call 'markdown' failedError: Reason: Failed to render markdown filter: Failed to render warning_box_only shortcodeCaused by:0: Failed to render 'shortcodes/warning_box_only.html'1: Filter 'markdown' not found
Calling {{ warning_box_only(body="nested warning!") }} is essentially asking to inject html in place of the shortcode. However, if you look at warning_box_only.html:
<blockquoteclass="warning_box_only"><divclass="content"> {{ body | markdown | safe }}
</div></blockquote>
it is expecting the body to be MARKDOWN, not HTML. If you remove the markdown filter from warning_box_only.html, then it will work -- but the markdown within the warning_box_only will not be rendered properly.
Custom boxes
important
{% important(header = "important header") %}
test
Press <kbd>CTRL+ALT+Delete</kbd> to end the
So it turns out you CAN put shortcodes inside other shortcodes, but it cannot be the % % with a body type.
{{ contributors(authors=["Alice Smith", "Bob Johnson"], editors=["Charlie Brown"], staff_reviewers=["David Lee"]) }}
{% end %}
important header
test
Press CTRL+ALT+Delete to end the
So it turns out you CAN put shortcodes inside other shortcodes, but it cannot be the % % with a body type.
{% warning(header = "warning header") %}
This is a warning section.
Here is an attempt at the % % nested shortcode.
{% important_box_only() %}
important bx only!!!
{% end %}
{% end %}
warning header
This is a warning section.
Here is an attempt at the % % nested shortcode.
important bx only!!!
question
{% question(question= "this is the question. now lets make it very long to the point where it probably needs to wrap around because its so large and fat and i hope this doesn't look bad.<br><br>1) this or that<br>2)this") %}
This is the question answer
{% end %}
QUESTION
this is the question. now lets make it very long to the point where it probably needs to wrap around because its so large and fat and i hope this doesn't look bad.
1) this or that 2)this
important_box_only
{% important_box_only() %}
important bx only!!!
{% end %}
important bx only!!!
warning_box_only
{% warning_box_only() %}
warning box only content
{% end %}
warning box only content
admonition
Credit to tabi for the styling. It's more pleasant colour scheme wise and it changes with the light/dark mode.
Options for type/icon: note, tip, info, warning, danger, pearl, question (only the icon)
These can be mixed and matched.
{% admonition(type="danger", icon="danger", title="Warning DANGER") %}
This is a danger admonition with a danger icon.
**Markdown can be used here :)**{% end %}
DANGER
This is a danger admonition with a danger icon.
Markdown can be used here :)
DANGER
There's also a FLAG icon you can add as well!
WARNING
Blah blah here is a wall of text wall of text Blah blah here is a wall of text wall of text Blah blah here is a wall of text wall of text Blah blah here is a wall of text wall of text
INFO
BLah blah
TIP
Blah blah
NOTE
blah blah
question icon
blah blah
We also have the elusive pearl mode:
{% admonition(type="pearl", icon="pearl", title="PEARL") %}
Insert sage clinical pearl
{% end %}
PEARL
Insert sage clinical pearl
text_image
Of note; you cannot nest a shortcode easily within a shortcode. Ie. I could not use {{ shortcode }} within the text image to right text.
{% text_image(src="/images/example.png", alt="An image description", caption = "test caption") %}
_Here is some text_ on the left.</br><kbd>CTRL+ALT+Delete</kbd>{% end %}
Here is some text on the left.CTRL+ALT+Delete
test caption
{% text_image(text_position = "right", src="/images/example.png", alt="An image description", caption = "test caption") %}
_Here is some text_ on the right.</br><kbd>CTRL+ALT+Delete</kbd>{% end %}
Here is some text on the right.CTRL+ALT+Delete
test caption
two_columns
{% two_columns() %}
Left column text goes here.
###Markdown should be supported<!-- split -->Right column text goes here.
{% end %}
Left column text goes here.
Right column text goes here.
two_columns_fancy
{% two_columns_fancy() %}
Left column text goes here.
<!-- split -->Right column text goes here.
{% end %}
Left column text goes here.
Right column text goes here.
spoiler
this is a spoiler that you can click: {{ spoiler(body="text to hide", fixed_blur=false) }}
this is a spoiler that you can click:
You can also use it like so (fixed_blur = true means you can't see it ever):
{% spoiler(fixed_blur = true) %}
testing this
{% end %}
dropdown
{% dropdown(header="this is what the user will click on to get more info") %}
This text will appear in the dropdown
And it will **LOOK GOOD** with markdown!
<ahref="allergyguide.ca">link</a>{% admonition(type="danger", icon="danger", title="DANGER") %}
This is a danger admonition with a danger icon.
**Markdown can be used here :)**{% end %}
{% end %}
this is what the user will click on to get more info
This text will appear in the dropdown
And it will **LOOK GOOD** with markdown!
link
{% timeline() %}
[{
"title":"Lorem Ipsum Event",
"body":"Lorem Ipsum is simply dummy text of the printing and typesetting industry.",
"date":"Jul-2023"
},
{
"title":"Lorem Ipsum event 2",
"body":"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.",
"date":"Jun-2022"
}]
{% end %}
Lorem Ipsum Event
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
Lorem Ipsum event 2
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.
mermaid
{% mermaid() %}
sequenceDiagram
Alice ->> Bob: Hello Bob, how are you?
Bob-->>John: How about you John?
Bob--x Alice: I am good thanks!
Bob-x John: I am good thanks!
Note right of John: Bob thinks a long<br/>long time, so long<br/>that the text does<br/>not fit on a row.
Bob-->Alice: Checking with John...
Alice->John: Yes... John, how are you?
{% end %}
sequenceDiagram
Alice ->> Bob: Hello Bob, how are you?
Bob-->>John: How about you John?
Bob--x Alice: I am good thanks!
Bob-x John: I am good thanks!
Note right of John: Bob thinks a long<br/>long time, so long<br/>that the text does<br/>not fit on a row.
Bob-->Alice: Checking with John...
Alice->John: Yes... John, how are you?
Other examples of mermaid charts (taken from their docs):
gantt
dateFormat YYYY-MM-DD
title Adding GANTT diagram functionality to mermaid
excludes weekends
%% (`excludes` accepts specific dates in YYYY-MM-DD format, days of the week ("sunday") or "weekends", but not the word "weekdays".)
section A section
Completed task :done, des1, 2014-01-06,2014-01-08
Active task :active, des2, 2014-01-09, 3d
Future task : des3, after des2, 5d
Future task2 : des4, after des3, 5d
section Critical tasks
Completed task in the critical line :crit, done, 2014-01-06,24h
Implement parser and jison :crit, done, after des1, 2d
Create tests for parser :crit, active, 3d
Future task in critical line :crit, 5d
Create tests for renderer :2d
Add to mermaid :until isadded
Functionality added :milestone, isadded, 2014-01-25, 0d
section Documentation
Describe gantt syntax :active, a1, after des1, 3d
Add gantt diagram to demo page :after a1 , 20h
Add another diagram to demo page :doc1, after a1 , 48h
section Last section
Describe gantt syntax :after doc1, 3d
Add gantt diagram to demo page :20h
Add another diagram to demo page :48h
widget_penfast
{{ widget_penfast() }}
PEN-FAST
F
- Five years or less since reaction
A
- Anaphylaxis or angioedema
S
- Severe cutaneous adverse reaction
T
- Treatment recieved for reaction (or unsure)
CALCULATED RISK:
wide_contact_card
{{ wide_contact_card(title="example title", text = "test text", src="/images/example.png", url="/research/") }}
##Content-guideline compilation section (not sure if there's a way to automate this unfortunately)
- Allergic rhinitis seasonal calendar for allergens?
- creation of video resources if time permits
- Billing tips (would have to be province specific -- VERY fellow focused)
##Shortcodes-port original pen-fast questions over with extra options; need to see if .PDF js packages are possible.
- Finalize medication card specs. Ie. format for age to be used. Right now it's not consistent.
##Misc-Reach out to staff re: supporting the project / funding -- once example pages completed and overall structure of site more solidified
- main staff TBD
- other editors/contributors -- TBD
- team structure?
references
This sentence needs two references <spanclass="references">1,2,3,1,1,1</span> and some of this
Here is another sentence with one reference <spanclass="references">2</span>... rest of the document content
{% references(showBib = true) %}
[{
"id": "1",
"bib": "Netting MJ, Campbell DE, Koplin JJ, et al. An Australian Consensus on Infant Feeding Guidelines to Prevent Food Allergy: Outcomes From the Australian Infant Feeding Summit. Journal of Allergy and Clinical Immunology: In Practice. 2017;5(6):1617-1624. doi:10.1016/j.jaip.2017.03.013",
"url": "https://pubmed.ncbi.nlm.nih.gov/28499774/",
"notes": ""
}, {
"id": "2",
"bib": "Khan DA, Banerji A, Blumenthal KG, et al. Drug allergy: A 2022 practice parameter update. Journal of Allergy and Clinical Immunology. 2022;150(6):1333-1393. doi:10.1016/j.jaci.2022.08.028",
"url": "https://www.jacionline.org/article/S0091-6749(22)01186-1/fulltext",
"notes": "This study was good!"
}, {
"id": "3",
"bib": "Another reference here with its own details.",
"url": "https://example.com",
"notes": ""
}]
{% end %}
This sentence needs two references the world,2,3,1,1,1 and some of this
Here is another sentence with one reference 2
... rest of the document content
×
1. Netting MJ, Campbell DE, Koplin JJ, et al. An Australian Consensus on Infant Feeding Guidelines to Prevent Food Allergy: Outcomes From the Australian Infant Feeding Summit. Journal of Allergy and Clinical Immunology: In Practice. 2017;5(6):1617-1624. doi:10.1016/j.jaip.2017.03.013.
Link.
2. Khan DA, Banerji A, Blumenthal KG, et al. Drug allergy: A 2022 practice parameter update. Journal of Allergy and Clinical Immunology. 2022;150(6):1333-1393. doi:10.1016/j.jaci.2022.08.028.
Link.
3. Another reference here with its own details..
Link.
mobile_warning
This will display a warning admonition if viewed from Mobile.
{{ mobile_warning() }}
json_to_table
body -- the JSON
show_headers: bool, default true
output_md: bool, default false (when true it outputs in a ```md block)
4176 patients with mild persistent asthma (≥12 years) were analyzed, including those with previously controlled and uncontrolled symptoms on minimal therapy.
At 52 weeks, the PRN budesonide–formoterol group had an annualized rate of severe exacerbations of 0.11 events/patient-year compared to 0.12 events/patient-year in the budesonide group (RR 0.97; upper one-sided 95% CI, 1.16). ACQ-5 scoreimproved by 0.35 in the as-needed group versus 0.46 in the maintenance group (Δ0.11 units; 95% CI, 0.07 to 0.15; p<0.001). Median daily inhaled glucocorticoid exposure in the as-needed group was 66μg vs 267μg in the maintenance group.
Bottom Line
For mild asthma, PRN budesonide–formoterol was noninferior to daily budesonide in preventing severe exacerbations, with a relatively smaller improvement in ACQ-5 and much less overall steroid exposure.
4176 patients with mild persistent asthma (≥12 years) were analyzed, including those with previously controlled and uncontrolled symptoms on minimal therapy.
At 52 weeks, the PRN budesonide–formoterol group had an annualized rate of severe exacerbations of 0.11 events/patient-year compared to 0.12 events/patient-year in the budesonide group (RR 0.97; upper one-sided 95% CI, 1.16). ACQ-5 scoreimproved by 0.35 in the as-needed group versus 0.46 in the maintenance group (Δ0.11 units; 95% CI, 0.07 to 0.15; p<0.001). Median daily inhaled glucocorticoid exposure in the as-needed group was 66μg vs 267μg in the maintenance group.
Bottom Line
For mild asthma, PRN budesonide–formoterol was noninferior to daily budesonide in preventing severe exacerbations, with a relatively smaller improvement in ACQ-5 and much less overall steroid exposure.
D1
D2
D3
D4
D5
Overall RoB
Severe ex. rate
+
+
+
+
+
+
tabs
{% tabs() %}
<!-- TAB -->Overview<!-- CONTENT --><p>This is an <strong>overview</strong> of the feature.</p><!-- TAB -->Details<!-- CONTENT --><ul><li>Fast</li><li>Secure</li><li>Reliable</li></ul>{% admonition(type="danger", icon="danger", title="DANGER") %}
This is a danger admonition with a danger icon.
**Markdown can be used here :)**{% end %}
<!-- TAB -->Pricing<!-- CONTENT --><p>Starting at <em>$9.99/month</em>.</p>{% end %}
Requires a script to be placed in the bottom of the page: