mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-10-17 05:11:57 +08:00
69512f081e
* initial commit * radar and maintainer updates * add route grist * add grist changes * Update docs/en/new-media.md * Update lib/v2/grist/featured.js * get featured article via APi * docs: spoiler ---------
20 lines
666 B
JavaScript
20 lines
666 B
JavaScript
const { getData, getList } = require('./utils');
|
|
|
|
module.exports = async (ctx) => {
|
|
const baseUrl = 'https://grist.org';
|
|
const route = '/wp-json/wp/v2/posts?_embed';
|
|
|
|
const data = await getData(`${baseUrl}${route}`);
|
|
const items = await getList(data);
|
|
|
|
ctx.state.data = {
|
|
title: 'Gist Latest Articles',
|
|
link: `${baseUrl}/articles`,
|
|
item: items,
|
|
description: 'Latest Articles on grist.org',
|
|
logo: 'https://grist.org/wp-content/uploads/2021/03/cropped-Grist-Favicon.png?w=192',
|
|
icon: 'https://grist.org/wp-content/uploads/2021/03/cropped-Grist-Favicon.png?w=32',
|
|
language: 'en-us',
|
|
};
|
|
};
|