Skip to content

Commit 4e2c200

Browse files
committed
build: cache footer
1 parent e56f3a0 commit 4e2c200

17 files changed

Lines changed: 77 additions & 77 deletions

File tree

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ group :jekyll_plugins do
1212
end
1313

1414
gem "jekyll-multiple-languages-plugin", "~> 1.8"
15+
16+
gem "jekyll-include-cache", "~> 0.2.1"

Gemfile.lock

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ GEM
4343
terminal-table (>= 1.8, < 4.0)
4444
webrick (~> 1.7)
4545
jekyll-datapage-generator (1.4.0)
46+
jekyll-include-cache (0.2.1)
47+
jekyll (>= 3.7, < 5.0)
4648
jekyll-maps (2.4.0)
4749
jekyll (>= 3.0, < 5.0)
4850
jekyll-multiple-languages-plugin (1.8.0)
@@ -96,6 +98,7 @@ PLATFORMS
9698
DEPENDENCIES
9799
jekyll
98100
jekyll-datapage-generator
101+
jekyll-include-cache (~> 0.2.1)
99102
jekyll-maps
100103
jekyll-multiple-languages-plugin (~> 1.8)
101104
jekyll-seo-tag

_config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ collections:
3939
permalink: /archive/:title/index:output_ext
4040

4141
plugins:
42+
- jekyll-include-cache
4243
- jekyll-sitemap
4344
- jekyll-seo-tag
4445
- jekyll-datapage-generator

_i18n/de/trademark/pycon.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
PyCon ist ein eingetragenes Warenzeichen der Python Software Foundation. Diese Website, pythondeadlin.es, ist nicht mit der Python Software Foundation oder einer PyCon-Veranstaltung verbunden, wird nicht von ihr unterstützt oder gesponsert. Alle auf dieser Website verwendeten Marken und Logos sind Eigentum der jeweiligen Inhaber. Jeder Verweis auf PyCon oder andere Marken dient nur zu Informationszwecken und impliziert keine Verbindung mit den Markeninhabern.
1+
Python, PyCon, und PyLadies sind eingetragene Warenzeichen der Python Software Foundation. Diese Website, pythondeadlin.es, ist nicht mit der Python Software Foundation oder einer PyCon-Veranstaltung verbunden, wird nicht von ihr unterstützt oder gesponsert. Alle auf dieser Website verwendeten Marken und Logos sind Eigentum der jeweiligen Inhaber. Jeder Verweis auf PyCon oder andere Marken dient nur zu Informationszwecken und impliziert keine Verbindung mit den Markeninhabern.

_i18n/en/trademark/pycon.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
PyCon is a registered trademark of the Python Software Foundation. This website, pythondeadlin.es, is not affiliated with, endorsed by, or sponsored by the Python Software Foundation or any PyCon event. All trademarks and logos used on this site remain the property of their respective owners. Any reference to PyCon or other trademarks is for informational purposes only and does not imply association with the trademark holders.
1+
Python, PyCon, and PyLadies are registered trademarks of the Python Software Foundation. This website, pythondeadlin.es, is not affiliated with, endorsed by, or sponsored by the Python Software Foundation or any PyCon event. All trademarks and logos used on this site remain the property of their respective owners. Any reference to PyCon or other trademarks is for informational purposes only and does not imply association with the trademark holders.

_i18n/es/trademark/pycon.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
PyCon es una marca registrada de la Python Software Foundation. Este sitio web, pythondeadlin.es, no está afiliado, respaldado ni patrocinado por la Python Software Foundation ni por ningún evento de la PyCon. Todas las marcas comerciales y logotipos utilizados en este sitio son propiedad de sus respectivos dueños. Cualquier referencia a PyCon o a otras marcas comerciales se hace únicamente con fines informativos y no implica asociación alguna con los titulares de dichas marcas.
1+
Python, PyCon, y PyLadies son marcas registradas de la Python Software Foundation. Este sitio web, pythondeadlin.es, no está afiliado, respaldado ni patrocinado por la Python Software Foundation ni por ningún evento de la PyCon. Todas las marcas comerciales y logotipos utilizados en este sitio son propiedad de sus respectivos dueños. Cualquier referencia a PyCon o a otras marcas comerciales se hace únicamente con fines informativos y no implica asociación alguna con los titulares de dichas marcas.

_layouts/conference.html

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -210,19 +210,26 @@ <h3 id="conf-subtitle">a.k.a. {{page.alt_name}} {{page.year}}</h3>
210210
{% endif %}
211211
</div>
212212
<footer>
213-
{% include footer.html %}
214-
{% if page.title contains "PyCon" %}
215-
{% tf trademark/pycon.md %}
216-
{% endif %}
217-
{% if page.title contains "PyData" %}
218-
{% tf trademark/pydata.md %}
219-
{% else %}
220-
{% unless page.title contains "PyCon" %}
221-
{% tf trademark/generic.md %}
222-
{% endunless %}
223-
{% endif %}
224213
</footer>
225214
</div>
215+
{% include_cached footer.html %}
216+
{% assign trademarks = "" | split: "" %}
217+
218+
{% if page.title contains "PyCon" or page.title contains "PyLadies" %}
219+
{% assign trademarks = trademarks | push: "pycon" %}
220+
{% endif %}
221+
222+
{% if page.title contains "PyData" %}
223+
{% assign trademarks = trademarks | push: "pydata" %}
224+
{% endif %}
225+
226+
{% if trademarks.size == 0 %}
227+
{% assign trademarks = trademarks | push: "generic" %}
228+
{% endif %}
229+
230+
{% for trademark in trademarks %}
231+
{% tf trademark/{{ trademark }}.md %}
232+
{% endfor %}
226233
<script type="text/javascript" charset="utf-8">
227234
$(function () {
228235
// Timezone deadline shenanigans

_layouts/post.html

Lines changed: 26 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,30 @@
22
---
33

44
<html>
5-
<head>
6-
{% include head.html %}
7-
</head>
8-
<body>
9-
{% include header.html %}
10-
<div class="container">
11-
<div class="page-header">
12-
<div class="row">
13-
<div class="col-12 col-sm-12">
14-
{% include breadcrumbs.html %}
15-
<h1>
16-
{{ title }}
17-
</h1>
18-
</div>
19-
</div>
20-
<br>
21-
<div class="row">
22-
<div class="meta col-12">
23-
{{page.author}} - {% if page.tags %}<strong>Tags:</strong> {{ page.tags | sort | join: ", " }} {% endif %}
24-
</div>
25-
</div>
26-
</div>
27-
<div id="confs">
28-
{{ content }}
29-
</div>
30-
<footer>
31-
{% include footer.html %}
32-
</footer>
33-
<br><br>
34-
</div>
35-
</body>
5+
<head>
6+
{% include head.html %}
7+
</head>
8+
<body>
9+
{% include header.html %}
10+
<div class="container">
11+
<div class="page-header">
12+
<div class="row">
13+
<div class="col-12 col-sm-12">
14+
{% include breadcrumbs.html %}
15+
<h1>{{ title }}</h1>
16+
</div>
17+
</div>
18+
<br />
19+
<div class="row">
20+
<div class="meta col-12">
21+
{{page.author}} - {% if page.tags %}<strong>Tags:</strong> {{ page.tags | sort | join: ", " }}
22+
{% endif %}
23+
</div>
24+
</div>
25+
</div>
26+
<div id="confs">{{ content }}</div>
27+
<footer>{% include_cached footer.html %}</footer>
28+
<br /><br />
29+
</div>
30+
</body>
3631
</html>

_layouts/search.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
{% endcapture %} {% include masthead.html title=search_title hook=search_hook description=search_description %}
2424
<div class="container">
2525
<div id="confs">{{ content }}</div>
26-
<footer>{% include footer.html %}</footer>
26+
<footer>{% include_cached footer.html %}</footer>
2727
<br /><br />
2828
</div>
2929
</body>

_layouts/summary.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ <h1>
250250
{% endif %}
251251
</div>
252252
<footer>
253-
{% include footer.html %}
253+
{% include_cached footer.html %}
254254
</footer>
255255
<br><br>
256256
</div>

0 commit comments

Comments
 (0)