Welcome to mirror list, hosted at ThFree Co, Russian Federation.

Rules - gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/Rules
blob: d1f56f211765034f2824c1331772a2bb43d26630 (plain)
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
#!/usr/bin/env ruby

compile '/**/*.html' do
  layout '/default.*'
end

compile '/**/*.md' do
  filter :kramdown,
    input: 'GFM',
    syntax_highlighter: 'rouge',
    hard_wrap: false

  layout '/default.*'

  filter :md_to_html_ext
end

compile '/**/*.scss' do
  filter :sass, syntax: :scss
  write item.identifier.without_ext + '.css'
end

compile '/index.*' do
  filter :erb
  layout '/home.*'
  write '/index.html'
end

compile '/sitemap.*' do
  filter :erb
  write '/sitemap.xml'
end

compile '/robots.*' do
  filter :erb
  write '/robots.txt'
end

route '/**/*.scss' do
  item.identifier.without_ext + '.css'
end

route '/**/*.{html,md}' do
  if item.identifier =~ '/index.*'
    '/index.html'
  else
    item.identifier.without_ext + '.html'
  end
end

compile '/**/*' do
  unless item.identifier.ext == 'scss'
    write item.identifier.to_s
  end
end

# Leave the favicon alone.
passthrough '/favicon.ico'

layout '/**/*', :erb