-
Notifications
You must be signed in to change notification settings - Fork 41
/
config.rb
82 lines (65 loc) · 1.33 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
activate :automatic_image_sizes
activate :directory_indexes
activate :livereload
helpers do
def installation_path
"/installation"
end
def guides_path
"/guides"
end
def getting_started_path
"/guides/getting-started"
end
def bug_reports_path
"/bug-reports"
end
def community_path
"/community"
end
def manual_path
"/manual"
end
def manual_master_path
"/manual/master"
end
def manual_stable_path
"/manual/stable"
end
def github_path
"https://github.com/mpv-player/mpv"
end
def twitter_path
"https://twitter.com/mpv_player"
end
def issues_path
"https://github.com/mpv-player/mpv/issues"
end
def nav_class(path)
if /^#{path}/ =~ current_page.url
{:class => 'selected'}
else
{}
end
end
def homepage?
current_page.url == "/"
end
def package_row(title, url, icon=:globe)
partial("package-row", locals: { title: title, url: url, icon: icon })
end
def fetch_pages(doctype=nil)
query = sitemap
query = query.where(:doctype.equal => doctype) if doctype.present?
query.order_by(:order).all
end
end
set :css_dir, 'stylesheets'
set :js_dir, 'javascripts'
set :fonts_dir, "fonts"
set :images_dir, 'images'
configure :build do
activate :minify_css
activate :minify_javascript
activate :asset_hash
end