-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.rb
38 lines (32 loc) · 844 Bytes
/
config.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
require "extensions/views"
activate :views
activate :directory_indexes
set :relative_links, true
set :css_dir, 'assets/stylesheets'
set :js_dir, 'assets/javascripts'
set :images_dir, 'assets/images'
set :fonts_dir, 'assets/fonts'
set :layout, 'layouts/application'
configure :development do
activate :livereload
end
configure :build do
# Relative assets needed to deploy to Github Pages
activate :relative_assets
end
activate :deploy do |deploy|
deploy.build_before = true
deploy.method = :git
end
helpers do
def nav_link(link_text, page_url, options = {})
options[:class] ||= ""
if current_page.url.length > 1
current_url = current_page.url.chop
else
current_url = current_page.url
end
options[:class] << " active" if page_url == current_url
link_to(link_text, page_url, options)
end
end