Skip to content

Option in inline css with css helper #1295

@bjankord

Description

@bjankord

Currently I'm using Jekyll and switching over to Hexo, I've been really surprised with how easy the transition was. One feature I had working in my jekyll site was the ability inline raw css the head element of my page for critical css.

Looking through hexo, it looks like the best place to do this is in the css helper. It would be nice to pass in an option to let the helper know you don't want to output a link element to a css file, but rather, output the raw css of the file referenced.

Something like:

<%- css('style.css','inline') %>
// outputs raw css in style element
<style>
.foo {
  color: #f00;
}
</style>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions