Skip to content

Commit ccb78e7

Browse files
benchmarks: Hide data/ folder
The `data/` folder contains raw data. It should not be displayed in the tabs, and its `*.cbor` files should not be rendered
1 parent a4ca4cd commit ccb78e7

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

_layouts/benchmarks.html

+9-5
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,16 @@
2525
{% assign folders = "" | split: ", " %}
2626
{% for folder in site.static_files %}
2727
{% if folder.path contains 'criterion/' %}
28+
{% unless folder.path contains 'criterion/data/' %}
2829
{% assign temp = folder.path | split: 'criterion/' %}
29-
{% assign pathName = temp[1] | split: '/' | first %}
30-
{% assign pathName = pathName | split: ", " %}
31-
{% assign folders = folders | concat: pathName %}
30+
{% assign directoryName = temp[1] | split: '/' | first %}
31+
{% assign pathName = 'criterion/' | append: directoryName %}
32+
{% assign pathNameArray = pathName | split: ", " %}
33+
{% assign folders = folders | concat: pathNameArray %}
34+
{% endunless %}
3235
{% endif %}
33-
{% endfor%}
36+
{% endfor %}
37+
{% comment %}folders = ['criterion/execution', 'criterion/microbenchmarks', ...]{% endcomment %}
3438
{% assign folders = folders | uniq %}
3539

3640
{% if folders.size == 0 %}
@@ -41,7 +45,7 @@
4145
<ul class="tab" data-tab="benchmarks">
4246
{% for folder in folders %}
4347
<li {% if forloop.index==1 %} class="active" {% endif %} style="font-weight: bold;">
44-
<a href="">{{ folder }}</a>
48+
<a href="">{{ folder | split: '/' | last }}</a>
4549
</li>
4650
{% endfor%}
4751
</ul>

0 commit comments

Comments
 (0)