hexo-renderer-dartsass
v1.2.0
Published
Sass renderer plugin for Hexo (use dartsass instead of libsass)
Readme
Sass renderer plugin for Hexo using Dart Sass
Install
$ npm install --save hexo-renderer-dartsassConfig
Anything specified under the key sass in your _config.yml files will be passed directly to the sass.compileAsync() call.
Check out the Sass API docs for all available settings.
Additional features
- Export some handy hexo related global functions to the Sass compiler context like mamboer/hexo-renderer-scss.
hexo-config($key)
Now you can use
hexo-configfunction in your 'scss' files to access your hexo app's site configuration.$highlight_theme: hexo-config('highlight_theme')hexo-theme-config($key)
Similar to the
hexo-config, you can usehexo-theme-configto access your hexo theme's configuration.
_config.yml
sass:
outputStyle: expanded # "expanded" or "compressed"Inheritance
The config object passed to dart sass is constructed by merging properties from the following locations using a least-specific-first order:
- Theme specific
_config.yml - Blog root
_config.yml - Since
fileis the path to be rendered, config is ignored. The same applies to data.
Thanks
This plugin was created with reference to knksmith57/hexo-renderer-sass. Thank you for publishing the nice software.
