feat(route): remnote (#10588)

This commit is contained in:
Tony
2022-08-24 00:56:39 +08:00
committed by GitHub
parent 59ad249cb2
commit 3c2731d7fb
6 changed files with 64 additions and 0 deletions
+6
View File
@@ -430,6 +430,12 @@ Refer to [#minecraft](/en/game.html#minecraft)
<RouteEn author="nczitzk" example="/qttabbar/change-log" path="/qttabbar/change-log"/>
## RemNote
### Changelog
<RouteEn author="TonyRL" example="/remnote/changelog" path="/remnote/changelog" radar="1" rssbud="1"/>
## RescueTime
### Release Notes
+6
View File
@@ -485,6 +485,12 @@ pageClass: routes
<Route author="Cesaryuan nczitzk" example="/quicker/versions" path="/quicker/versions"/>
## RemNote
### 变更日志
<Route author="TonyRL" example="/remnote/changelog" path="/remnote/changelog" radar="1" rssbud="1"/>
## RescueTime
### Release Notes
+33
View File
@@ -0,0 +1,33 @@
const got = require('@/utils/got');
const { parseDate } = require('@/utils/parse-date');
const FQDN = 'feedback.remnote.com';
const apiGateway = 'https://gateway.hellonext.co';
module.exports = async (ctx) => {
const { data } = await got(`${apiGateway}/api/v2/changelogs`, {
headers: {
'x-organization': FQDN,
},
searchParams: {
page: 1,
status: 'published',
},
});
const items = data.map((item) => ({
title: item.title,
description: item.description_html,
link: `https://${FQDN}/changelog/${item.slug}`,
pubDate: parseDate(item.published_at.timestamp),
author: item.user.name,
}));
ctx.state.data = {
title: 'Changelog | RemNote',
description: 'Vote or request new RemNote features. Subscribe to get updates about new features from RemNote.',
link: `https://${FQDN}/changelog`,
image: 'https://vault.hnxt.dev/uploads/organization_customization/favicon/3970/88153ff13b4b03492ddfee6e675228c1.png',
item: items,
language: 'en-US',
};
};
+3
View File
@@ -0,0 +1,3 @@
module.exports = {
'/changelog': ['TonyRL'],
};
+13
View File
@@ -0,0 +1,13 @@
module.exports = {
'remnote.com': {
_name: 'RemNote',
'.': [
{
title: 'Changelog',
docs: 'https://docs.rsshub.app/program-update.html#remnote',
source: ['/changelog', '/'],
target: '/remnote/changelog',
},
],
},
};
+3
View File
@@ -0,0 +1,3 @@
module.exports = (router) => {
router.get('/changelog', require('./changelog'));
};