{% comment %} Bootstrap accordion feature, https://getbootstrap.com/docs/5.1/components/accordion/ e.g. --> {% include feature/accordion.html title1="Example section" text1=example1 title2="Section two" text2=example2 title3="Section three" text3=example3 %} Options: - "title1", "title2", "title3" = title for each section of accordion (max three) - "text1", "text2", "text3" = text for each section of accordion (max three). You will probably want to capture the text using a Liquid capture, then use the variable to provide text to this include. - "open" = optional, by default is "false". Add "true" to have the first section of the accordion open. - "heading_level" = customize the level of the heading if necessary for accessibility, choose "h1", "{{ include.heading_level | default: 'h2' | strip }}", "h3", etc (optional, default "{{ include.heading_level | default: 'h2' | strip }}") {%- endcomment -%}
<{{ include.heading_level | default: 'h2' | strip }} class="accordion-header" id="headingOne">
{{ include.text1 | markdownify }}
{% if include.title2 %}
<{{ include.heading_level | default: 'h2' | strip }} class="accordion-header" id="headingTwo">
{{ include.text2 | markdownify }}
{% endif %} {% if include.title3 %}
<{{ include.heading_level | default: 'h2' | strip }} class="accordion-header" id="headingThree">
{{ include.text3 | markdownify }}
{% endif %}