Use new html base plugin!

Removes all the url filters
This commit is contained in:
Zach Leatherman
2022-08-19 11:05:22 -05:00
parent f57760d4d6
commit 9acd192d0d
14 changed files with 44 additions and 32 deletions

View File

@ -9,28 +9,28 @@
{#- Uncomment this if youd like folks to know that you used Eleventy to build your site! #}
{#- <meta name="generator" content="{{ eleventy.generator }}"> #}
<link rel="stylesheet" href="{{ '/css/prism-theme.css' | url }}">
<link rel="stylesheet" href="{{ '/css/prism-diff.css' | url }}">
<link rel="stylesheet" href="{{ '/css/index.css' | url }}">
<link rel="alternate" href="{{ '/feed/feed.xml' | url }}" type="application/atom+xml" title="{{ metadata.title }}">
<link rel="alternate" href="{{ '/feed/feed.json' | url }}" type="application/json" title="{{ metadata.title }}">
<link rel="stylesheet" href="/css/prism-theme.css">
<link rel="stylesheet" href="/css/prism-diff.css">
<link rel="stylesheet" href="/css/index.css">
<link rel="alternate" href="/feed/feed.xml" type="application/atom+xml" title="{{ metadata.title }}">
<link rel="alternate" href="/feed/feed.json" type="application/json" title="{{ metadata.title }}">
{%- set alternateUrls = page.url | locale_links %}
{% if alternateUrls.length %}
<link rel="alternate" hreflang="{{ lang or metadata.language }}" href="{{ page.url | absoluteUrl(metadata.url) }}">
<link rel="alternate" hreflang="{{ lang or metadata.language }}" href="{{ page.url | htmlBaseUrl(metadata.url) }}">
{%- for link in alternateUrls %}
<link rel="alternate" hreflang="{{ link.lang }}" href="{{ link.url | absoluteUrl(metadata.url) }}">
<link rel="alternate" hreflang="{{ link.lang }}" href="{{ link.url | htmlBaseUrl(metadata.url) }}">
{%- endfor %}
{%- endif %}
</head>
<body>
<header>
<h1 class="home"><a href="{{ '/' | url }}">{{ metadata.title }}</a></h1>
<h1 class="home"><a href="/">{{ metadata.title }}</a></h1>
{#- Read more about `eleventy-navigation` at https://www.11ty.dev/docs/plugins/navigation/ #}
<ul class="nav">
{%- for entry in collections.all | eleventyNavigation %}
<li class="nav-item{% if entry.url == page.url %} nav-item-active{% endif %}"><a href="{{ entry.url | url }}">{{ entry.title | i18n }}</a></li>
<li class="nav-item{% if entry.url == page.url %} nav-item-active{% endif %}"><a href="{{ entry.url }}">{{ entry.title | i18n }}</a></li>
{%- endfor %}
</ul>
</header>
@ -53,6 +53,6 @@
<footer></footer>
<!-- Current page: {{ page.url | url }} -->
<!-- Current page: {{ page.url | htmlBaseUrl }} -->
</body>
</html>

View File

@ -8,7 +8,7 @@ templateClass: tmpl-post
<li><time datetime="{{ page.date | htmlDateString }}">{{ page.date | readableDate }}</time></li>
{%- for tag in tags | filterTagList %}
{%- set tagUrl %}/tags/{{ tag | slugify }}/{% endset %}
<li><a href="{{ tagUrl | url }}" class="post-tag">{{ tag }}</a>{%- if not loop.last %}, {% endif %}</li>
<li><a href="{{ tagUrl }}" class="post-tag">{{ tag }}</a>{%- if not loop.last %}, {% endif %}</li>
{%- endfor %}
</ul>
@ -35,8 +35,8 @@ templateClass: tmpl-post
{%- set nextPost = collections.posts | getNextCollectionItem %}
{%- if nextPost or previousPost %}
<ul>
{%- if previousPost %}<li>{{ "i18n.previous" | i18n }}: <a href="{{ previousPost.url | url }}">{{ previousPost.data.title }}</a></li>{% endif %}
{%- if nextPost %}<li>{{ "i18n.next" | i18n }}: <a href="{{ nextPost.url | url }}">{{ nextPost.data.title }}</a></li>{% endif %}
{%- if previousPost %}<li>{{ "i18n.previous" | i18n }}: <a href="{{ previousPost.url }}">{{ previousPost.data.title }}</a></li>{% endif %}
{%- if nextPost %}<li>{{ "i18n.next" | i18n }}: <a href="{{ nextPost.url }}">{{ nextPost.data.title }}</a></li>{% endif %}
</ul>
{%- endif %}
{%- endif %}