You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: execute hexo filter with stylus context [#45]
It's now possible to interact with stylus API via hexo's filter API, see our guide.
hexo.extend.filter.register('stylus:renderer',function(style){style// we may define a global variable by passing a `Node`.define('has-canvas',require('stylus').nodes.false);// stylus also casts JavaScript values to their Stylus equivalents when possible.define('families',['Helvetica Neue','Helvetica','sans-serif'])// also allows you to provide a JavaScript-defined function to Stylus.define('get-list',function(){return['foo','bar','baz'];});})