feat(route): add more popular reading tags

This commit is contained in:
pseudoyu 2024-10-25 12:28:26 +08:00
parent 4aa40e5205
commit e480f605f6
No known key found for this signature in database
6 changed files with 33 additions and 14 deletions

View File

@ -1,13 +1,25 @@
import { Route } from '@/types';
import { Route, ViewType } from '@/types';
import got from '@/utils/got';
import { load } from 'cheerio';
import { parseDate } from '@/utils/parse-date';
export const route: Route = {
path: '/:category',
categories: ['reading'],
categories: ['reading', 'popular'],
view: ViewType.Articles,
example: '/bookfere/skills',
parameters: { category: '分类名' },
parameters: {
category: {
description: '分类名',
options: [
{ value: 'weekly', label: '每周一书' },
{ value: 'skills', label: '使用技巧' },
{ value: 'books', label: '图书推荐' },
{ value: 'news', label: '新闻速递' },
{ value: 'essay', label: '精选短文' },
],
},
},
features: {
requireConfig: false,
requirePuppeteer: false,

View File

@ -1,12 +1,15 @@
import { Route } from '@/types';
import { Route, ViewType } from '@/types';
import got from '@/utils/got';
import { load } from 'cheerio';
import { parseDate } from '@/utils/parse-date';
export const route: Route = {
path: '/html_clip/:user/:tag',
name: 'Unknown',
maintainers: [],
example: '/inoreader/html_clip/1005137674/user-favorites',
categories: ['reading', 'popular'],
view: ViewType.Articles,
name: 'HTML Clip',
maintainers: ['EthanWng97'],
handler,
};

View File

@ -1,10 +1,11 @@
import { Route } from '@/types';
import { Route, ViewType } from '@/types';
import parser from '@/utils/rss-parser';
import { load } from 'cheerio';
export const route: Route = {
path: '/rss/:user/:tag',
categories: ['reading'],
categories: ['reading', 'popular'],
view: ViewType.Articles,
example: '/inoreader/rss/1005137674/user-favorites',
parameters: { user: 'user id, the interger after user/ in the example URL', tag: 'tag, the string after tag/ in the example URL' },
features: {

View File

@ -1,4 +1,4 @@
import { Route, DataItem, Data } from '@/types';
import { Route, DataItem, Data, ViewType } from '@/types';
import cache from '@/utils/cache';
import got from '@/utils/got';
import { load } from 'cheerio';
@ -7,7 +7,8 @@ import { processContent } from './utils';
export const route: Route = {
path: '/:lang/:category?',
categories: ['anime'],
categories: ['anime', 'popular'],
view: ViewType.Articles,
example: '/pixivision/zh-tw',
parameters: { lang: 'Language', category: 'Category' },
features: {

View File

@ -1,11 +1,12 @@
import { Data, DataItem, Route } from '@/types';
import { Data, DataItem, Route, ViewType } from '@/types';
import cache from '@/utils/cache';
import got from '@/utils/got';
import { load } from 'cheerio';
export const route: Route = {
path: '/',
categories: ['reading'],
categories: ['reading', 'popular'],
view: ViewType.Articles,
example: '/yilinzazhi',
radar: [
{

View File

@ -1,4 +1,4 @@
import { Data, DataItem, Route } from '@/types';
import { Data, DataItem, Route, ViewType } from '@/types';
import cache from '@/utils/cache';
import got from '@/utils/got';
import { load } from 'cheerio';
@ -6,7 +6,8 @@ import dayjs from 'dayjs';
export const route: Route = {
path: '/latest',
categories: ['reading'],
categories: ['reading', 'popular'],
view: ViewType.Articles,
example: '/yilinzazhi/latest',
radar: [
{