Преглед на файлове

fix dates in blog layout

main
James Fenn преди 7 месеца
родител
ревизия
15860284fc
променени са 5 файла, в които са добавени 9 реда и са изтрити 3 реда
  1. +5
    -0
      .eleventy.js
  2. +1
    -1
      _includes/item/blog-compact.liquid
  3. +1
    -1
      _includes/layouts/blog.liquid
  4. +1
    -1
      blog/2018-7-28-Hello-World.md
  5. +1
    -0
      package.json

+ 5
- 0
.eleventy.js Целия файл

@@ -2,6 +2,7 @@ const _fs = require("fs");
const _markdown = require("markdown-it");
const _markdownAnchor = require("markdown-it-anchor");
const _yaml = require("js-yaml");
const _moment = require("moment");

module.exports = function(eleventyConfig) {
eleventyConfig.setDataDeepMerge(true);
@@ -27,6 +28,10 @@ module.exports = function(eleventyConfig) {
return array.filter((item) => item[prop] == value);
});

eleventyConfig.addFilter("dateUTC", function(date, format) {
return _moment.utc(date).format(format);
});

/*eleventyConfig.setBrowserSyncConfig({
callbacks: {
ready: function(err, browserSync) {


+ 1
- 1
_includes/item/blog-compact.liquid Целия файл

@@ -3,7 +3,7 @@

<a class="link d-flex align-items-start my-2" href="{{ url }}">
<span class="mr-2 text-tertiary" style="white-space: nowrap;">
<code><time datetime="{{ blog.date }}">{{ blog.date | date: "%b %d" }}</time></code>
<code><time datetime="{{ blog.date }}">{{ blog.date | dateUTC: "MMM DD" }}</time></code>
</span>
{% if blog.data.redirect %}
{% assign domain = blog.data.redirect | split: '/' %}


+ 1
- 1
_includes/layouts/blog.liquid Целия файл

@@ -12,7 +12,7 @@ layout: page
<p class="text-meta mb-3">
<a class="p-author h-card" href="{{ meta.url }}">{{ meta.name }}</a> |
<a class="u-url" href="{% if redirect %}{{ redirect }}{% else %}{{ url }}{% endif %}">
<time class="dt-published" datetime="{{ date }}">{{ date | date: "%B %e, %Y" }}</time></a>
<time class="dt-published" datetime="{{ date }}">{{ date | dateUTC: "MMMM DD, YYYY" }}</time></a>
</p>

{% for link in links %}


+ 1
- 1
blog/2018-7-28-Hello-World.md Целия файл

@@ -1,7 +1,7 @@
---
layout: layouts/blog
title: Hello World
date: "2018-07-28"
date: 2018-07-28
description: "I made a blog."
tags: blog
---


+ 1
- 0
package.json Целия файл

@@ -30,6 +30,7 @@
"markdown-it": "^10.0.0",
"markdown-it-anchor": "^5.2.5",
"markdown-it-highlightjs": "^3.2.0",
"moment": "^2.27.0",
"node-fetch": "^2.6.0",
"nodegit": "^0.27.0",
"sass": "^1.23.2"


Зареждане…
Отказ
Запис