mirror of
https://github.com/ckaczor/Blog.git
synced 2026-01-14 01:25:37 -05:00
Reformatting
This commit is contained in:
@@ -7,4 +7,4 @@ const eleventyNavigation = {
|
||||
<h1>Archive</h1>
|
||||
|
||||
{% set postslist = collections.posts %}
|
||||
{% include "postslist.njk" %}
|
||||
{% include "postslist.njk" %}
|
||||
@@ -1,3 +1,3 @@
|
||||
export default {
|
||||
layout: "layouts/home.njk",
|
||||
layout: "layouts/home.njk"
|
||||
};
|
||||
|
||||
@@ -8,7 +8,8 @@ const numberOfLatestPostsToShow = 3;
|
||||
---
|
||||
{% set postsCount = collections.posts | length %}
|
||||
{% set latestPostsCount = postsCount | min(numberOfLatestPostsToShow) %}
|
||||
<h1>Latest {{ latestPostsCount }} Post{% if latestPostsCount != 1 %}s{% endif %}</h1>
|
||||
<h1>Latest {{ latestPostsCount }} Post{% if latestPostsCount != 1 %}s{% endif %}
|
||||
</h1>
|
||||
|
||||
{% set postslist = collections.posts | head(-1 * numberOfLatestPostsToShow) %}
|
||||
{% set postslistCounter = postsCount %}
|
||||
@@ -16,7 +17,7 @@ const numberOfLatestPostsToShow = 3;
|
||||
|
||||
{% set morePosts = postsCount - numberOfLatestPostsToShow %}
|
||||
{% if morePosts > 0 %}
|
||||
<p>{{ morePosts }} more post{% if morePosts != 1 %}s{% endif %} can be found in <a href="blog.njk">the archive</a>.</p>
|
||||
<p>{{ morePosts }} more post{% if morePosts != 1 %}s{% endif %} can be found in <a href="blog.njk">the archive</a>.</p>
|
||||
{% endif %}
|
||||
|
||||
{# List every content page in the project #}
|
||||
@@ -26,4 +27,4 @@ const numberOfLatestPostsToShow = 3;
|
||||
<li><a href="{{ entry.url }}"><code>{{ entry.url }}</code></a></li>
|
||||
{%- endfor %}
|
||||
</ul>
|
||||
#}
|
||||
#}
|
||||
@@ -5,11 +5,11 @@ eleventyExcludeFromCollections: true
|
||||
---
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
|
||||
{%- for page in collections.all %}
|
||||
{% set absoluteUrl %}{{ page.url | htmlBaseUrl(metadata.url) }}{% endset %}
|
||||
<url>
|
||||
<loc>{{ absoluteUrl }}</loc>
|
||||
<lastmod>{{ page.date | htmlDateString }}</lastmod>
|
||||
</url>
|
||||
{%- endfor %}
|
||||
</urlset>
|
||||
{%- for page in collections.all %}
|
||||
{% set absoluteUrl %}{{ page.url | htmlBaseUrl(metadata.url) }}{% endset %}
|
||||
<url>
|
||||
<loc>{{ absoluteUrl }}</loc>
|
||||
<lastmod>{{ page.date | htmlDateString }}</lastmod>
|
||||
</url>
|
||||
{%- endfor %}
|
||||
</urlset>
|
||||
@@ -19,7 +19,7 @@ const eleventyComputed = {
|
||||
---
|
||||
<h1>Tagged “{{ tag }}”</h1>
|
||||
|
||||
{% set postslist = collections[ tag ] %}
|
||||
{% set postslist = collections[tag] %}
|
||||
{% include "postslist.njk" %}
|
||||
|
||||
<p>See <a href="tags.njk">all tags</a>.</p>
|
||||
<p>See <a href="tags.njk">all tags</a>.</p>
|
||||
@@ -1,8 +1,10 @@
|
||||
<h1>Tags</h1>
|
||||
|
||||
<ul>
|
||||
{% for tag in collections | getKeys | filterTagList %}
|
||||
{% set tagUrl %}/tags/{{ tag | slugify }}/{% endset %}
|
||||
<li><a href="{{ tagUrl }}" class="post-tag">{{ tag }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% for tag in collections | getKeys | filterTagList %}
|
||||
{% set tagUrl %}/tags/{{ tag | slugify }}/{% endset %}
|
||||
<li>
|
||||
<a href="{{ tagUrl }}" class="post-tag">{{ tag }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
Reference in New Issue
Block a user