Class: Jekyll::Turbolinks

Inherits:
Object
  • Object
show all
Defined in:
lib/jekyll-turbolinks.rb

Overview

Access Turbolinks source

Class Method Summary collapse

Class Method Details

.config(site) ⇒ Object



14
15
16
17
18
19
# File 'lib/jekyll-turbolinks.rb', line 14

def config(site)
  {
    'enabled' => true,
    'url' => 'turbolinks.js'
  }.merge(site.config.dig('turbolinks') || {})
end

.dest(site, config) ⇒ Object



21
22
23
# File 'lib/jekyll-turbolinks.rb', line 21

def dest(site, config)
  File.join site.source, config['url']
end

.pathObject



10
11
12
# File 'lib/jekyll-turbolinks.rb', line 10

def path
  File.join ::Turbolinks::Source.asset_path, 'turbolinks.js'
end