Please use Hexo version 3.0.0 or above. This doesn't support 2.x.x and never will.
Some libraries ask you to place
@import [library] in your
.styl file. YASR takes care of this for you. To use a library you just have to enable it in the
_config.yml and start using it.
YASR can output sourcemaps to your CSS files. This is provided by Stylus, so if you encounter any bugs, let the Stylus developers know.
Warning: Some libraries can cause problems with sourcemaps.
The render is now able to fetch properties that are defined inside the theme configuration file and place them in your CSS.
I got the code from the original
We use Stylus built in compression flag to minify the outputted CSS files.
Check to see if you have installed
hexo-renderer-stylus (check inside the
node-modules directory, but don't delete it.). If you have it installed run:
npm un hexo-renderer-stylus --save
After you've removed the default renderer, or if you never installed it in the first place, run:
npm i hexo-renderer-yasr --save
Place the following code inside your
# YASR Configuration## Docs:yasr:axis: true # Enables Axis (Recommends Nib)compress: false # Disables Compressionjeet: true # Enables Jeetnib: true # Enables Nibrupture: true # Enables Rupturetypographic: true # Enables Typographicsourcemaps: # Sourcemaps configurationcomment: trueinline: truesourceRoot: ''basePath: 'css/'
sourceMappingURLto the generated CSS (default:
sourceRootproperty of the generated sourcemap