feat(route): remnote (#10588)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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',
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,3 @@
|
||||
module.exports = {
|
||||
'/changelog': ['TonyRL'],
|
||||
};
|
||||
@@ -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',
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,3 @@
|
||||
module.exports = (router) => {
|
||||
router.get('/changelog', require('./changelog'));
|
||||
};
|
||||
Reference in New Issue
Block a user