LinkSearchMenuExpandDocument
Table of contents

Jekyll-assets

Gem Version

Tags: ,,,,,,,,,,

Jekyllのアセットパイプライン

JavaScript, CSS, SASS, SCSSのアセットパイプラインを提供するJekyllプラグインです。 (Railsの) Sprocketsをベースにしており、Jekyllでアセットを管理するために必要な すべての機能を提供します。

システム要件

  • ruby: 2.3+
  • sprockets: 3.3+
  • jekyll: 3.5+

インストール

  1. Gemfileを編集

    # Gemfile
    group :jekyll_plugins do
      gem 'jekyll-assets'
    end
    
  2. Pluginのインストール

    bundle
    

設定

# _config.yml
source_maps: true # false on JEKYLL_ENV=production
destination: "/assets"
compression: true
gzip: false
defaults:
   js: { integrity: false } # true on JEKYLL_ENV=production
  css: { integrity: false } # true on JEKYLL_ENV=production
  img: { integrity: false } # true on JEKYLL_ENV=production
caching:
  path: ".jekyll-cache/assets"
  type: file # Possible values: memory, file
  enabled: true
# --
# Assets you wish to always have compiled.
#   This can also be combined with raw_precompile which
#   copies assets without running through the pipeline
#   making them ultra fast.
# --
precompile: []
raw_precompile: [
  #
]
# --
# baseurl: whether or not to append site.baseurl
# destination: the folder you store them in on the CDN.
# url: the CDN url (fqdn, or w/ identifier).
# --
cdn:
  baseurl: false
  destination: false
  url: null
# --
# These are all default. No need to add them
#   Only use this if you have more.
# --
sources:
  - assets/css
  - assets/fonts
  - assets/images
  - assets/videos
  - assets/javascript
  - assets/video
  - assets/image
  - assets/img
  - assets/js
  - _assets/css
  - _assets/fonts
  - _assets/images
  - _assets/videos
  - _assets/javascript
  - _assets/video
  - _assets/image
  - _assets/img
  - _assets/js
  - css
  - fonts
  - images
  - videos
  - javascript
  - video
  - image
  - img
  - js
plugins:
  css: { autoprefixer: {}}
  img: { optim: {}}

ブログ記事

下記に掲載を希望される方はご連絡ください (詳細)

Back to top


Back to top

Copyright © 2021 Otti

Page last modified: