Skip to content

Commit 1c503a5

Browse files
Adds a benchmark page to the website
The page looks for images in a folder to display these
1 parent 0e115a9 commit 1c503a5

File tree

3 files changed

+41
-0
lines changed

3 files changed

+41
-0
lines changed

Diff for: _config.yml

+2
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ navigation:
3636
url: /blog
3737
- title: Docs
3838
url: /docs
39+
- title: Benchmarks
40+
url: /benchmarks
3941
- title: GitHub
4042
url: https://github.com/RustPython/RustPython/
4143
- title: Gitter

Diff for: _layouts/benchmarks.html

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
layout: default
3+
---
4+
5+
<section>
6+
<div class="w-80 m-auto mt-2">
7+
<div class="d-md-flex">
8+
<div class="d-sm-none">
9+
<img class="logo" src="{{site.baseurl}}/assets/img/rust-python-logo.svg" alt="RustPython Logo">
10+
</div>
11+
<div class="pl-md-2">
12+
<div class="section-title">Benchmarks</div>
13+
<div class="title">{{ site.title }} {{ page.title | escape }}</div>
14+
<small>{{ site.benchmarks-intro }}</small>
15+
</div>
16+
</div>
17+
</div>
18+
</section>
19+
20+
<div class="w-80 m-auto mt-2">
21+
<div class="benchmarks-intro">
22+
{{ content }}
23+
</div>
24+
25+
{% for image in site.static_files %}
26+
{% if image.path contains 'benchmarks' %}
27+
<figure>
28+
<img src="{{ site.baseurl }}{{ image.path }}" alt="image" width="30%" />
29+
<figcaption>{{ image.name }}</figcaption>
30+
</figure>
31+
{% endif %}
32+
{% endfor %}
33+
</div>

Diff for: benchmarks.markdown

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
layout: benchmarks
3+
title: Benchmarks
4+
---
5+
6+
RustPython is an awesome Python interpreter! On this page you can see how it compares to CPython.

0 commit comments

Comments
 (0)