Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit f80355d

Browse files
authoredNov 1, 2024
Update example page syntax highlighting (#138)
1 parent 0fd43cb commit f80355d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎_layouts/example.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,12 @@ <h4>Scripts</h4>
6262
replace each tab with 4 spaces to have consistent indentations
6363
{% endcomment %}
6464
{% capture script_content %}{% include examples/{{ collection }}/{{ script | lstrip | replace: ".script", "_script.md" | replace: ".gui_script", "_gui_script.md" | replace: ".vp", "_vp.md" | replace: ".fp", "_fp.md" }} %}{% endcapture %}
65+
{% assign script_ext = script | split:'.' | last %}
66+
{% if script_ext == "vp" or script_ext == "fp" %}
67+
{% highlight glsl %}{{ script_content | replace: " ", " " }}{% endhighlight %}
68+
{% else %}
6569
{% highlight lua %}{{ script_content | replace: " ", " " }}{% endhighlight %}
70+
{% endif %}
6671
{% endfor %}
6772
</div>
6873
<div class="columns two">

0 commit comments

Comments
 (0)
Failed to load comments.