Module: Jekyll::Vite::Config

Defined in:
lib/jekyll/vite/config.rb

Instance Method Summary collapse

Instance Method Details

#config_defaults(**opts) ⇒ Object

Override: Provide default values for a typical Jekyll site.



5
6
7
8
9
10
11
12
# File 'lib/jekyll/vite/config.rb', line 5

def config_defaults(**opts)
  require 'jekyll'
  cache_dir = Jekyll.configuration['cache_dir'] || '.jekyll-cache'
  super(**opts, mode: Jekyll.env).tap do |defaults|
    defaults['public_dir'] = cache_dir
    defaults['build_cache_dir'] = File.join(cache_dir, 'vite-build')
  end
end