aboutsummaryrefslogtreecommitdiff
path: root/_layouts/default.html
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2020-08-12 06:34:38 -0300
committerEuAndreh <eu@euandre.org>2020-08-12 06:56:04 -0300
commit191728a2cac217e96a7f1e4e9a4710606f6ad920 (patch)
treebbcf9c17bb3bd462f8d1c41169d1122b08161d18 /_layouts/default.html
parentassert-content.sh: Look at post refs too, not only pages (diff)
downloadeuandre.org-191728a2cac217e96a7f1e4e9a4710606f6ad920.tar.gz
euandre.org-191728a2cac217e96a7f1e4e9a4710606f6ad920.tar.xz
Add TILs section, with Atom support and i18n
- add i18n logic to support translated TIL entries and listing; - make the website title less tied to a blog: "EuAndreh::blog" -> <web>EuAndreh</web>; - remove old Atom feed link aliases; - remove feed.all.atom and it's link in the about page; - create Atom feed for TIL entries; - show blog and TIL Atom feed on their listing pages (index and tils-listing); - add root alias: / -> /en/ - remove explicit list of feeds from $IGNORED_PAGES and use a '*.atom' glob instead; - also lint, assert-content and assert-unique-ref of TILs; - fix wrong "post.date" in pastebin entry in site.json;
Diffstat (limited to '_layouts/default.html')
-rw-r--r--_layouts/default.html46
1 files changed, 26 insertions, 20 deletions
diff --git a/_layouts/default.html b/_layouts/default.html
index 6a0587b..f97f5ef 100644
--- a/_layouts/default.html
+++ b/_layouts/default.html
@@ -5,7 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/styles.css">
- <link rel="alternate" type="application/atom+xml" href="{{ site.t.feed_url[page.lang] }}" title="{{ site.t.feed_title[page.lang] }}" />
+ <link rel="alternate" type="application/atom+xml" href="{{ site.t.feed_url[page.lang] }}" title="{{ site.t.feed.title[page.lang] }}" />
<title>{{ page.title }}</title>
<meta property="og:site_name" content="{{ site.title }}" />
@@ -29,29 +29,35 @@
</div>
<div id="nav-right">
{% if page.ref != nil %}
- {% if site.posts.size > 0 or site.pages.size > 0 %}
- <ul>
- {% assign lposts=site.posts | where:"ref", page.ref | sort: 'lang' %}
- {% for lpost in lposts %}
- <li>
- <a href="{{ lpost.url }}" class="{{ lpost.lang }}">{{ lpost.lang }}</a>
- </li>
- {% endfor %}
+ <ul>
+ {% assign lposts=site.posts | where:"ref", page.ref | sort: 'lang' %}
+ {% for lpost in lposts %}
+ <li>
+ <a href="{{ lpost.url }}" class="{{ lpost.lang }}">{{ lpost.lang }}</a>
+ </li>
+ {% endfor %}
+ {% if page.ref == "root" %}
+ {% assign lpages=site.pages | where:"ref", "index" | sort: 'lang' %}
+ {% else %}
{% assign lpages=site.pages | where:"ref", page.ref | sort: 'lang' %}
- {% for lpage in lpages %}
- <li>
- <a href="{{ lpage.url }}" class="{{ lpage.lang }}">{{ lpage.lang }}</a>
- </li>
- {% endfor %}
- </ul>
- {% endif %}
- {% endif %}
+ {% endif %}
+ {% for lpage in lpages %}
+ <li>
+ <a href="{{ lpage.url }}" class="{{ lpage.lang }}">{{ lpage.lang }}</a>
+ </li>
+ {% endfor %}
+ {% assign ltils=site.tils | where:"ref", page.ref | sort: 'lang' %}
+ {% for ltil in ltils %}
+ <li>
+ <a href="{{ ltil.url }}" class="{{ ltil.lang }}">{{ ltil.lang }}</a>
+ </li>
+ {% endfor %}
+ </ul>
+ {% endif %}
+ <a href="{{ site.t.til_url[page.lang] }}">{{ site.t.til[page.lang] }}</a>
<a href="{{ site.t.about_url[page.lang] }}">{{ site.t.about[page.lang] }}</a>
- <a href="{{ site.t.feed_url[page.lang] }}">
- <img class="simple-icon" src="/images/atom.svg" alt="{{ site.t.alt.blog_feed[page.lang] }}" />
- </a>
</div>
</nav>
</header>