Skip to content

支持通过配置文件添加源 #349

@josherich

Description

@josherich

一个提议,即用模板生成新的源。
在自己的分支中实现过,不确定是否适用这里的需求。

  1. 模板 template_page.js (我在自己分支中的一种实现)

  2. 配置写法的一个例子

const template = require('../template_page');

const options = {
    feed_title: '海关总署 - 动态',
    feed_desc: '海关总署 - 动态',
    feed_image: 'http://www.customs.gov.cn/customs/template/common/nav/logo.png',
    feed_url: 'http://www.customs.gov.cn/customs/xwfb34/302262/302263/index.html',
    url: 'http://www.customs.gov.cn/customs/xwfb34/302262/302263/index.html',
    baseUrl: 'http://www.customs.gov.cn/',
    list_slr: ['li', '.conList_ul'],
    title_slr: 'a',
    link_slr: 'a',
    desc_slr: 'a',
    time_slr: 'span',
    link_rel: true,
    cn: false,
};

module.exports = template(options);

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions