Switch last updated to relative timestamp (#348)

Switch from American timestamp to relative date marker.

E.g: "2 months ago" instead of "9/14/2020, 8:40:00 PM"

Also switch to mr-hope variants of sitemap/last-update
This commit is contained in:
Soitora 2020-09-15 19:41:19 +02:00 committed by GitHub
parent 5cdffdc278
commit 42602ae992
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 1741 additions and 3498 deletions

5222
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -39,7 +39,8 @@
"node-sass": "^4.14.1"
},
"dependencies": {
"vuepress-plugin-sitemap": "^2.3.1",
"@mr-hope/vuepress-plugin-sitemap": "^0.7.2",
"@mr-hope/vuepress-plugin-last-update": "^0.7.2",
"vuepress-plugin-robots": "^1.0.1",
"vue": "^2.6.12",
"vuex": "^3.5.1",

View File

@ -35,7 +35,7 @@ module.exports = {
searchPlaceholder: "Search...",
editLinks: true,
editLinkText: "Help us improve this page",
lastUpdated: "Last Updated",
lastUpdated: "Last updated",
nav: navBarConfig,
sidebar: {
"/help/guides/": sideBarConfig.guides,

View File

@ -1,10 +1,20 @@
module.exports = [
[
"vuepress-plugin-sitemap",
"@mr-hope/vuepress-plugin-sitemap",
{
hostname: "https://tachiyomi.org",
},
],
[
"@mr-hope/vuepress-plugin-last-update",
{
transformer: (timestamp, lang) => {
const moment = require("moment");
moment.locale(lang);
return moment(timestamp).fromNow();
},
},
],
[
"vuepress-plugin-robots",
{