Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
hexo-renderer-yasr
Advanced tools
A Stylus CSS renderer for Hexo that uses Nib, Axis, Rupture, Jeet, and Typographic.
A Stylus renderer for Hexo that uses Nib, Axis, Rupture, Jeet, and Typographic. It used to have Autoprefixer but it got deprecated, so I had to let it go. For now.
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 hexo-renderer-stylus
.
Theme's _config.yml
:
img: 'http://loremflickr.com/800/600/'
Stylus:
.class
background-image hexo-config('img')
Resulting CSS:
.class {
background-image: 'http://loremflickr.com/800/600/';
}
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 _config.yml
.
# YASR Configuration
## Docs: https://github.com/celsomiranda/hexo-renderer-yasr
yasr:
axis: true # Enables Axis (Recommends Nib)
compress: false # Disables Compression
jeet: true # Enables Jeet
nib: true # Enables Nib
rupture: true # Enables Rupture
typographic: true # Enables Typographic
sourcemaps: # Sourcemaps configuration
comment: true
inline: true
sourceRoot: ''
basePath: 'css/'
sourceMappingURL
to the generated CSS (default: true
)false
)sourceRoot
property of the generated sourcemap.
)FAQs
A Stylus CSS renderer for Hexo that uses Nib, Axis, Rupture, Jeet, and Typographic.
The npm package hexo-renderer-yasr receives a total of 6 weekly downloads. As such, hexo-renderer-yasr popularity was classified as not popular.
We found that hexo-renderer-yasr demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.