Merge branch 'master' into last-x-posts
This commit is contained in:
commit
81a2f8c135
@ -17,6 +17,11 @@ module.exports = function(eleventyConfig) {
|
||||
return array.slice(0, n);
|
||||
});
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#valid-date-string
|
||||
eleventyConfig.addFilter('htmlDateString', (dateObj) => {
|
||||
return DateTime.fromJSDate(dateObj).toFormat('yyyy-LL-dd');
|
||||
});
|
||||
|
||||
// only content in the `posts/` directory
|
||||
eleventyConfig.addCollection("posts", function(collection) {
|
||||
return collection.getAllSorted().filter(function(item) {
|
||||
|
1
404.md
1
404.md
@ -1,6 +1,7 @@
|
||||
---
|
||||
layout: layouts/home.njk
|
||||
permalink: 404.html
|
||||
excludeFromSitemap: true
|
||||
---
|
||||
# Content not found.
|
||||
|
||||
|
@ -2,13 +2,13 @@
|
||||
{% for post in postslist | reverse %}
|
||||
<li class="postlist-item{% if post.url == url %} postlist-item-active{% endif %}">
|
||||
<a href="{{ post.url | url }}" class="postlist-link">{% if post.data.title %}{{ post.data.title }}{% else %}<code>{{ post.url }}</code>{% endif %}</a>
|
||||
<span class="postlist-date">{{ post.date | readableDate }}</span>
|
||||
<time class="postlist-date" datetime="{{ post.date | htmlDateString }}">{{ post.date | readableDate }}</time>
|
||||
{% for tag in post.data.tags %}
|
||||
{%- if tag != "post" -%}
|
||||
{% set tagUrl %}/tags/{{ tag }}/{% endset %}
|
||||
<a href="{{ tagUrl | url }}" class="tag">{{ tag }}</a>
|
||||
{%- endif -%}
|
||||
{% endfor %}
|
||||
{%- if tag != "post" -%}
|
||||
{% set tagUrl %}/tags/{{ tag }}/{% endset %}
|
||||
<a href="{{ tagUrl | url }}" class="tag">{{ tag }}</a>
|
||||
{%- endif -%}
|
||||
{% endfor %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
|
@ -1,5 +1,6 @@
|
||||
---
|
||||
permalink: feed/feed.xml
|
||||
excludeFromSitemap: true
|
||||
---
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<feed xmlns="http://www.w3.org/2005/Atom">
|
||||
|
@ -1,5 +1,6 @@
|
||||
---
|
||||
permalink: feed/.htaccess
|
||||
excludeFromSitemap: true
|
||||
---
|
||||
# For Apache, to show `{{ metadata.feed.filename }}` when browsing to directory /feed/ (hide the file!)
|
||||
DirectoryIndex {{ metadata.feed.filename }}
|
@ -19,4 +19,7 @@ function myCommand() {
|
||||
let counter = 0;
|
||||
counter++;
|
||||
}
|
||||
|
||||
// Test with a line break above this line.
|
||||
console.log('Test');
|
||||
```
|
||||
|
@ -13,6 +13,9 @@ function myCommand() {
|
||||
let counter = 0;
|
||||
counter++;
|
||||
}
|
||||
|
||||
// Test with a line break above this line.
|
||||
console.log('Test');
|
||||
```
|
||||
|
||||
Bring to the table win-win survival strategies to ensure proactive domination. At the end of the day, going forward, a new normal that has evolved from generation X is on the runway heading towards a streamlined cloud solution. User generated content in real-time will have multiple touchpoints for offshoring.
|
||||
|
16
sitemap.xml.njk
Normal file
16
sitemap.xml.njk
Normal file
@ -0,0 +1,16 @@
|
||||
---
|
||||
permalink: /sitemap.xml
|
||||
excludeFromSitemap: true
|
||||
---
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||
{%- for page in collections.all %}
|
||||
{%- if not page.data.excludeFromSitemap %}
|
||||
{% set absoluteUrl %}{{ page.url | url | absoluteUrl(metadata.url) }}{% endset %}
|
||||
<url>
|
||||
<loc>{{ absoluteUrl }}</loc>
|
||||
<lastmod>{{ page.date | htmlDateString }}</lastmod>
|
||||
</url>
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
</urlset>
|
Loading…
Reference in New Issue
Block a user