Jekyll include_sass
tag which includes and converts SASS/SCSS file. This is useful for Google AMP HTML.
Like all web pages, AMP pages are styled with CSS, but you can’t reference external stylesheets.
All styles must live in the head of the document.
via. Supported CSS
- Add the following to your site's
Gemfile
:
gem 'jekyll-include_sass'
- Add the following to your site's
_config.yml
:
gems:
- jekyll-include_sass
Put your style.scss
in Jekyll's _includes
directory.
Add the following inside <head>
in your site's template(s):
<style type="text/css">
{% include_sass style.scss %}
</style>
<style amp-custom>
{% include_sass style.scss %}
</style>
You can include either SASS or SCSS with include_sass
depending on extension.
Bug reports and pull requests are welcome on GitHub at https://github.com/toshimaru/jekyll-include_sass.
The gem is available as open source under the terms of the MIT License.