Skip to content

Chant00/hexo-generator-feed-rebulid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

hexo-generator-feed-rebulid

add css to support rss view better

Before

  • You are using node hexo
  • Your website(Wiki/Blog) are using hexo plugin - hexo-generator-feed
  • You want to make your rss looking better

Resolve

add css to the rss'xml
Watch my Demo

How to use

Ok, everybody.Let's begin.

  1. 
    

cd ./your website dir/node-modules/hexo-generator-feed/lib/ vim generator.js
2. change code undiffent.Also you can directly clone, but it's not recommend...

Undiffent code

  • css/rss.css in my gayhub is necessary!!
  • add this code:

var rssCssSrc = pathFn.join(__dirname, '../css/rss.css');
var rssCssTmpl = nunjucks.compile(fs.readFileSync(rssCssSrc, 'utf8'), env);
  • change this code on the end:

var rssCss = rssCssTmpl.render();
    return [
        {
            path: feedConfig.path,
            data: xml
        },
        {
            path: feedConfig.path.substr(0,feedConfig.path.length - 8) + "css/rss.css",
            data: rssCss
        }
    ];

About

add css to support rss view better!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published