frontman-ssg 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. checksums.yaml +7 -0
  2. data/.circleci/config.yml +42 -0
  3. data/.github/CODE_OF_CONDUCT.md +9 -0
  4. data/.github/ISSUE_TEMPLATE/bug_report.md +25 -0
  5. data/.github/ISSUE_TEMPLATE/feature_request.md +22 -0
  6. data/.github/PULL_REQUEST_TEMPLATE.md +22 -0
  7. data/.gitignore +5 -0
  8. data/.rubocop.yml +88 -0
  9. data/CHANGELOG.md +11 -0
  10. data/CONTRIBUTING.md +42 -0
  11. data/Gemfile +5 -0
  12. data/LICENSE.md +21 -0
  13. data/Rakefile +94 -0
  14. data/SECURITY.md +6 -0
  15. data/bin/frontman +6 -0
  16. data/frontman-ssg.gemspec +48 -0
  17. data/frontman.svg +2 -0
  18. data/lib/frontman.rb +15 -0
  19. data/lib/frontman/app.rb +175 -0
  20. data/lib/frontman/bootstrapper.rb +70 -0
  21. data/lib/frontman/builder/asset_pipeline.rb +55 -0
  22. data/lib/frontman/builder/builder.rb +193 -0
  23. data/lib/frontman/builder/file.rb +55 -0
  24. data/lib/frontman/builder/mapping.rb +54 -0
  25. data/lib/frontman/builder/statistics_collector.rb +37 -0
  26. data/lib/frontman/cli.rb +6 -0
  27. data/lib/frontman/commands/build.rb +76 -0
  28. data/lib/frontman/commands/init.rb +58 -0
  29. data/lib/frontman/commands/serve.rb +110 -0
  30. data/lib/frontman/concerns/dispatch_events.rb +56 -0
  31. data/lib/frontman/concerns/forward_calls_to_app.rb +28 -0
  32. data/lib/frontman/config.rb +52 -0
  33. data/lib/frontman/context.rb +125 -0
  34. data/lib/frontman/custom_struct.rb +44 -0
  35. data/lib/frontman/data_store.rb +106 -0
  36. data/lib/frontman/data_store_file.rb +60 -0
  37. data/lib/frontman/helpers/app_helper.rb +18 -0
  38. data/lib/frontman/helpers/link_helper.rb +35 -0
  39. data/lib/frontman/helpers/render_helper.rb +76 -0
  40. data/lib/frontman/helpers/url_helper.rb +11 -0
  41. data/lib/frontman/iterator.rb +48 -0
  42. data/lib/frontman/process/chain.rb +43 -0
  43. data/lib/frontman/process/processor.rb +11 -0
  44. data/lib/frontman/renderers/erb_renderer.rb +21 -0
  45. data/lib/frontman/renderers/haml_renderer.rb +22 -0
  46. data/lib/frontman/renderers/markdown_renderer.rb +26 -0
  47. data/lib/frontman/renderers/renderer.rb +26 -0
  48. data/lib/frontman/renderers/renderer_resolver.rb +26 -0
  49. data/lib/frontman/resource.rb +279 -0
  50. data/lib/frontman/sitemap_tree.rb +211 -0
  51. data/lib/frontman/toolbox/timer.rb +49 -0
  52. data/lib/frontman/version.rb +6 -0
  53. data/project-templates/default/.gitignore +2 -0
  54. data/project-templates/default/Gemfile +3 -0
  55. data/project-templates/default/config.rb +17 -0
  56. data/project-templates/default/data/site.yml +4 -0
  57. data/project-templates/default/helpers/site_helper.rb +7 -0
  58. data/project-templates/default/public/code.css +77 -0
  59. data/project-templates/default/public/frontman-logo.svg +2 -0
  60. data/project-templates/default/public/main.css +27 -0
  61. data/project-templates/default/public/main.js +1 -0
  62. data/project-templates/default/source/index.html.md.erb +7 -0
  63. data/project-templates/default/source/sitemap.xml.erb +11 -0
  64. data/project-templates/default/views/layouts/main.erb +19 -0
  65. data/project-templates/default/views/layouts/main.haml +15 -0
  66. data/project-templates/default/views/partials/menu.erb +7 -0
  67. data/project-templates/webpack/.gitignore +4 -0
  68. data/project-templates/webpack/Gemfile +3 -0
  69. data/project-templates/webpack/README.md +54 -0
  70. data/project-templates/webpack/assets/css/code.css +77 -0
  71. data/project-templates/webpack/assets/css/style.css +27 -0
  72. data/project-templates/webpack/assets/images/.gitkeep +0 -0
  73. data/project-templates/webpack/assets/images/frontman_logo.svg +2 -0
  74. data/project-templates/webpack/assets/js/index.js +1 -0
  75. data/project-templates/webpack/config.rb +24 -0
  76. data/project-templates/webpack/data/site.yml +4 -0
  77. data/project-templates/webpack/helpers/assets_helper.rb +24 -0
  78. data/project-templates/webpack/helpers/site_helper.rb +7 -0
  79. data/project-templates/webpack/package-lock.json +7603 -0
  80. data/project-templates/webpack/package.json +34 -0
  81. data/project-templates/webpack/source/index.html.md.erb +7 -0
  82. data/project-templates/webpack/source/sitemap.xml.erb +11 -0
  83. data/project-templates/webpack/views/layouts/main.erb +20 -0
  84. data/project-templates/webpack/views/layouts/main.haml +14 -0
  85. data/project-templates/webpack/views/partials/menu.erb +7 -0
  86. data/project-templates/webpack/views/partials/script_with_vendors.haml +5 -0
  87. data/project-templates/webpack/webpack/base.config.js +51 -0
  88. data/project-templates/webpack/webpack/dev.config.js +6 -0
  89. data/project-templates/webpack/webpack/prod.config.js +30 -0
  90. data/readme.md +80 -0
  91. data/sorbet/config +2 -0
  92. data/sorbet/rbi/hidden-definitions/errors.txt +27259 -0
  93. data/sorbet/rbi/hidden-definitions/hidden.rbi +45122 -0
  94. data/sorbet/rbi/sorbet-typed/lib/rainbow/all/rainbow.rbi +276 -0
  95. data/sorbet/rbi/todo.rbi +6 -0
  96. data/spec/frontman/app_spec.rb +48 -0
  97. data/spec/frontman/bootstrapper_spec.rb +26 -0
  98. data/spec/frontman/builder/builder_spec.rb +79 -0
  99. data/spec/frontman/builder/file_spec.rb +45 -0
  100. data/spec/frontman/builder/mapping_spec.rb +8 -0
  101. data/spec/frontman/concerns/dispatch_events_spec.rb +70 -0
  102. data/spec/frontman/concerns/forward_calls_to_app_spec.rb +21 -0
  103. data/spec/frontman/config_spec.rb +54 -0
  104. data/spec/frontman/context_spec.rb +48 -0
  105. data/spec/frontman/custom_struct_spec.rb +51 -0
  106. data/spec/frontman/data_store_file_spec.rb +9 -0
  107. data/spec/frontman/data_store_spec.rb +36 -0
  108. data/spec/frontman/frontman_ssg_spec.rb +7 -0
  109. data/spec/frontman/helpers/app_helper_spec.rb +24 -0
  110. data/spec/frontman/helpers/link_helper_spec.rb +37 -0
  111. data/spec/frontman/helpers/render_helper_spec.rb +55 -0
  112. data/spec/frontman/helpers/url_helper_spec.rb +21 -0
  113. data/spec/frontman/iterator_spec.rb +47 -0
  114. data/spec/frontman/mocks/asset.css +3 -0
  115. data/spec/frontman/mocks/config.rb +0 -0
  116. data/spec/frontman/mocks/helpers/formatting_helper.rb +5 -0
  117. data/spec/frontman/mocks/helpers/language_helper.rb +5 -0
  118. data/spec/frontman/mocks/helpers/link_helper.rb +5 -0
  119. data/spec/frontman/mocks/helpers/test_command.rb +5 -0
  120. data/spec/frontman/mocks/html_file.html +8 -0
  121. data/spec/frontman/mocks/html_file.html.md.erb +9 -0
  122. data/spec/frontman/mocks/html_file.md.html +8 -0
  123. data/spec/frontman/mocks/info.yml +4 -0
  124. data/spec/frontman/mocks/layouts/raw_without_body.haml +1 -0
  125. data/spec/frontman/mocks/nested/data.yml +4 -0
  126. data/spec/frontman/mocks/nested/more_data.yml +4 -0
  127. data/spec/frontman/mocks/partials/paragraph.haml +2 -0
  128. data/spec/frontman/mocks/snippet/html_file.html +8 -0
  129. data/spec/frontman/mocks/snippet/html_file.yml +670 -0
  130. data/spec/frontman/mocks/test.html +8 -0
  131. data/spec/frontman/mocks/wrap.haml +3 -0
  132. data/spec/frontman/process/chain_spec.rb +56 -0
  133. data/spec/frontman/renderers/erb_renderer_spec.rb +22 -0
  134. data/spec/frontman/renderers/haml_renderer_spec.rb +12 -0
  135. data/spec/frontman/renderers/markdown_renderer_spec.rb +12 -0
  136. data/spec/frontman/renderers/renderer_spec.rb +16 -0
  137. data/spec/frontman/resource_spec.rb +151 -0
  138. data/spec/frontman/sitemap_tree_spec.rb +128 -0
  139. data/spec/frontman/toolbox/timer_spec.rb +34 -0
  140. data/spec/spec_setup.rb +19 -0
  141. metadata +507 -0
@@ -0,0 +1,211 @@
1
+ # typed: false
2
+ # frozen_string_literal: true
3
+
4
+ module Frontman
5
+ class SitemapTree
6
+ attr_reader :path, :children, :url_part
7
+ attr_accessor :parent, :position, :resource, :url
8
+
9
+ class << self
10
+ def resources
11
+ @@resources ||= []
12
+ end
13
+
14
+ def proxy_resources
15
+ @@proxy_resources ||= {}
16
+ end
17
+
18
+ def proxy_resources_from_template(template)
19
+ proxy_resources[format_url(template)] || []
20
+ end
21
+
22
+ def format_url(url)
23
+ url.chomp('index.html').gsub('.html', '')
24
+ end
25
+ end
26
+
27
+ def resources
28
+ @@resources ||= []
29
+ end
30
+
31
+ def add(resource)
32
+ return if resource.destination_path.end_with?('.js', '.css', '.yml')
33
+
34
+ url = format_url(resource.destination_path)
35
+ existing_resource = from_url(url)&.resource
36
+
37
+ unless existing_resource.nil?
38
+ raise DuplicateResourceError.create(resource, url, existing_resource)
39
+ end
40
+
41
+ if Frontman::App.instance.get_redirect(url)
42
+ raise ExistingRedirectError.create(resource, url)
43
+ end
44
+
45
+ SitemapTree.resources.push(resource)
46
+ parts = url.split('/')
47
+ used_parts = []
48
+ add_parts(parts, used_parts, resource)
49
+ end
50
+
51
+ def add_proxy(destination, template, data = {})
52
+ resource = Resource.from_path(template, destination, true)
53
+ resource.data = resource.data.to_h.merge(data.to_h).to_ostruct
54
+
55
+ key = format_url(template)
56
+
57
+ SitemapTree.proxy_resources[key] ||= []
58
+ T.must(SitemapTree.proxy_resources[key]).push(resource)
59
+
60
+ add(resource)
61
+ end
62
+
63
+ def initialize(url_part)
64
+ @parent = nil
65
+ @children = []
66
+ @resource = nil
67
+ @url_part = url_part
68
+ @@urls ||= {}
69
+ @position = nil
70
+ @url = nil
71
+ end
72
+
73
+ def format_url(url)
74
+ url.chomp('index.html').gsub('.html', '')
75
+ end
76
+
77
+ def final_url
78
+ "/#{format_url(@url)}/"
79
+ end
80
+
81
+ def from_resource(resource)
82
+ from_url(format_url(resource.destination_path))
83
+ end
84
+
85
+ def from_url(url)
86
+ return self if url == '/'
87
+
88
+ @@urls[url.gsub(%r{^/}, '').gsub(%r{/$}, '').to_sym]
89
+ end
90
+
91
+ def ancestor(part, level = 0)
92
+ ancestors = [self]
93
+ ancestor = self
94
+
95
+ while !ancestor.nil? && (ancestor.url_part != part)
96
+ ancestor = ancestor.parent
97
+ ancestors.unshift(ancestor)
98
+ end
99
+
100
+ ancestors[level] if !ancestor.nil? && (ancestor.url_part == part)
101
+ end
102
+
103
+ def flatten(take = false)
104
+ resources = []
105
+
106
+ resources.push(self) if take && @resource && @children.empty?
107
+
108
+ children.each do |child|
109
+ resources += child.flatten(true)
110
+ end
111
+
112
+ resources
113
+ end
114
+
115
+ def get_all_pages(options = {})
116
+ resources = []
117
+ resources.push(self) if @resource
118
+
119
+ @children.each do |child|
120
+ resources.push(child) unless child.resource.nil?
121
+
122
+ resources += child.get_all_pages(options)
123
+ end
124
+
125
+ resources.uniq
126
+ end
127
+
128
+ def add_parts(parts, used_parts, resource)
129
+ if parts.length <= 0
130
+ @resource = resource
131
+ return
132
+ end
133
+
134
+ current_part = parts.shift
135
+ used_parts.push(current_part)
136
+ child = @children.select { |c| c.url_part == current_part }
137
+ child = !child.empty? ? child[0] : nil
138
+
139
+ if child.nil?
140
+ child = SitemapTree.new(current_part)
141
+ child.parent = self
142
+ url = used_parts.join('/')
143
+ child.url = url
144
+ @@urls[url.to_sym] = child
145
+ child.position = @children.length
146
+ @children.push(child)
147
+ end
148
+
149
+ child.add_parts(parts, used_parts, resource)
150
+ end
151
+
152
+ def find(parts)
153
+ return self if parts.length <= 0
154
+
155
+ current_part = parts.shift
156
+ child = @children.select { |c| c.url_part == current_part }
157
+
158
+ child[0].find(parts) unless child.empty?
159
+ end
160
+
161
+ def siblings
162
+ @parent.children
163
+ end
164
+
165
+ def pages
166
+ children.select(&:resource)
167
+ end
168
+
169
+ def folder?
170
+ !children.empty?
171
+ end
172
+
173
+ def languages
174
+ children.select { |c| @@languages.include?(c.url_part) }
175
+ end
176
+
177
+ def pretty_print(space)
178
+ spaces = space >= 0 ? ' ' * space : ''
179
+
180
+ print(spaces + @url_part + "\n") if @url_part
181
+
182
+ print(spaces + " -> r\n") if @resource
183
+
184
+ @children.each do |child|
185
+ child.pretty_print(space + 1)
186
+ end
187
+ end
188
+
189
+ def all_urls
190
+ @@urls
191
+ end
192
+
193
+ def inspect
194
+ "SitemapTree: #{@resource ? @resource.destination_path : @url_part}"
195
+ end
196
+ end
197
+
198
+ class DuplicateResourceError < StandardError
199
+ def self.create(resource, url, existing_resource)
200
+ new("Unable to add #{resource.file_path} as #{url}.
201
+ Resource #{existing_resource.file_path} already exists on this URL.")
202
+ end
203
+ end
204
+
205
+ class ExistingRedirectError < StandardError
206
+ def self.create(resource, url)
207
+ new("Unable to add #{resource.file_path} as #{url}.
208
+ A redirect already exists for this URL.")
209
+ end
210
+ end
211
+ end
@@ -0,0 +1,49 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ require 'sorbet-runtime'
5
+
6
+ module Frontman
7
+ module Toolbox
8
+ class Timer
9
+ extend T::Sig
10
+
11
+ sig { returns(Frontman::Toolbox::Timer) }
12
+ def self.start
13
+ timer = new
14
+ timer.begin
15
+ timer
16
+ end
17
+
18
+ sig { returns(Time) }
19
+ def begin
20
+ @start = Time.now
21
+ end
22
+
23
+ sig { returns(Time) }
24
+ def stop
25
+ @end = Time.now
26
+ end
27
+
28
+ sig { returns(Float) }
29
+ def diff
30
+ @end - @start
31
+ end
32
+
33
+ sig { returns(T.nilable(Time)) }
34
+ def started_at
35
+ @start
36
+ end
37
+
38
+ sig { returns(T.nilable(Time)) }
39
+ def ended_at
40
+ @end
41
+ end
42
+
43
+ sig { returns(String) }
44
+ def output
45
+ "Elapsed time: ~#{(diff * 1000).ceil} milliseconds.\n"
46
+ end
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Frontman
4
+ # Current Version
5
+ VERSION = '0.0.2'
6
+ end
@@ -0,0 +1,2 @@
1
+ build/
2
+ _build.json
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ gem 'frontman-ssg'
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ register_data_dirs(['data'])
4
+ register_helper_dir('helpers')
5
+
6
+ register_layout 'sitemap.xml', nil
7
+ register_layout '*', 'main.erb'
8
+ # Or use 'main.haml' if you prefer using HAML:
9
+ # register_layout '*', 'main.haml'
10
+
11
+ Frontman::Config.set(:domain, 'https://example.com')
12
+
13
+ Frontman::Bootstrapper.resources_from_dir(
14
+ 'source/'
15
+ ).each do |resource|
16
+ sitemap_tree.add(resource)
17
+ end
@@ -0,0 +1,4 @@
1
+ title: MySite
2
+ links:
3
+ Source code: https://github.com/algolia/frontman
4
+ Documentation: https://github.com/algolia/frontman/wiki
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SiteHelper
4
+ def page_title(current_page)
5
+ current_page.data.title || data.site.title
6
+ end
7
+ end
@@ -0,0 +1,77 @@
1
+ .highlight table td { padding: 5px; }
2
+ .highlight table pre { margin: 0; }
3
+ .highlight, .highlight .w {
4
+ color: #303030;
5
+ }
6
+ .highlight .err {
7
+ color: #151515;
8
+ background-color: #ac4142;
9
+ }
10
+ .highlight .c, .highlight .ch, .highlight .cd, .highlight .cm, .highlight .cpf, .highlight .c1, .highlight .cs {
11
+ color: #505050;
12
+ }
13
+ .highlight .cp {
14
+ color: #f4bf75;
15
+ }
16
+ .highlight .nt {
17
+ color: #f4bf75;
18
+ }
19
+ .highlight .o, .highlight .ow {
20
+ color: #d0d0d0;
21
+ }
22
+ .highlight .p, .highlight .pi {
23
+ color: #d0d0d0;
24
+ }
25
+ .highlight .gi {
26
+ color: #90a959;
27
+ }
28
+ .highlight .gd {
29
+ color: #ac4142;
30
+ }
31
+ .highlight .gh {
32
+ color: #6a9fb5;
33
+ background-color: #151515;
34
+ font-weight: bold;
35
+ }
36
+ .highlight .k, .highlight .kn, .highlight .kp, .highlight .kr, .highlight .kv {
37
+ color: #aa759f;
38
+ }
39
+ .highlight .kc {
40
+ color: #d28445;
41
+ }
42
+ .highlight .kt {
43
+ color: #d28445;
44
+ }
45
+ .highlight .kd {
46
+ color: #d28445;
47
+ }
48
+ .highlight .s, .highlight .sa, .highlight .sb, .highlight .sc, .highlight .dl, .highlight .sd, .highlight .s2, .highlight .sh, .highlight .sx, .highlight .s1 {
49
+ color: #90a959;
50
+ }
51
+ .highlight .sr {
52
+ color: #75b5aa;
53
+ }
54
+ .highlight .si {
55
+ color: #8f5536;
56
+ }
57
+ .highlight .se {
58
+ color: #8f5536;
59
+ }
60
+ .highlight .nn {
61
+ color: #f4bf75;
62
+ }
63
+ .highlight .nc {
64
+ color: #f4bf75;
65
+ }
66
+ .highlight .no {
67
+ color: #f4bf75;
68
+ }
69
+ .highlight .na {
70
+ color: #6a9fb5;
71
+ }
72
+ .highlight .m, .highlight .mb, .highlight .mf, .highlight .mh, .highlight .mi, .highlight .il, .highlight .mo, .highlight .mx {
73
+ color: #90a959;
74
+ }
75
+ .highlight .ss {
76
+ color: #90a959;
77
+ }
@@ -0,0 +1,2 @@
1
+ <?xml version="1.0"?>
2
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 344.97 369.41" width="250" height="250"><defs><style>.cls-1{fill:#5468ff;}</style></defs><title>logo-frontman-blue</title><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path class="cls-1" d="M15.36,175.35q5.2-1.64,10.72-3.16L22,147.43H322.24l-4.12,24.76q5.5,1.51,10.72,3.16l5.41-32.55a5.55,5.55,0,0,0-5.47-6.46H243.51L238.92,0l-8.3,26a16.68,16.68,0,0,1-22.41,10.29s-24.75-8.55-38.62-8.55S131,36.28,131,36.28A16.69,16.69,0,0,1,108.56,26L100.27,0,95.66,136.34H15.42A5.55,5.55,0,0,0,10,142.8Zm214.22-72-19.2,17.26a16.15,16.15,0,0,1-19.68,1.48l-11.28-7.41Zm-69.82,11.33-11.28,7.41a16.15,16.15,0,0,1-19.68-1.48l-19.2-17.26Z"></path><path class="cls-1" d="M50.79,320.77l-6.72-40.41q-5.52,1.25-10.81,2.6l7.15,43a5.54,5.54,0,0,0,3.85,4.39l92.07,28.15-6.74-13.66Z"></path><path class="cls-1" d="M293.42,320.77l-79.77,24.38L206.9,358.8l93-28.44a5.54,5.54,0,0,0,3.85-4.39l7.15-43q-5.28-1.36-10.8-2.6Z"></path><path class="cls-1" d="M147.35,302V259.67q-6.36.34-12.7.85-5.13,13.38-10.23,26.88l-.55.05q-5.13-12.42-10.24-24.72-6.31.81-12.62,1.81v42.28c3.29-.52,6.58-1,9.88-1.45V278.68l.52-.08q4.71,11.14,9.41,22.37c2.22-.25,4.43-.48,6.65-.7q4.69-12.22,9.4-24.34l.53,0v26.69Q142.37,302.21,147.35,302Z"></path><path class="cls-1" d="M196.14,302.08Q189,280.52,181.9,259.21q-6.6-.16-13.19-.14-7.12,21.17-14.23,42.56c3.57-.13,7.13-.21,10.7-.25l2.73-9.32q6.93,0,13.84.14c.88,3.12,1.77,6.23,2.65,9.36Q190.27,301.74,196.14,302.08ZM170,284.32q2.33-7.86,4.64-15.71h.56q2.28,7.89,4.56,15.81Q174.84,284.32,170,284.32Z"></path><path class="cls-1" d="M213.44,279.39l.56.06q8.82,12.87,17.63,26.11c2.83.39,5.65.81,8.48,1.26V264.54q-5.07-.8-10.15-1.49v23.79l-.55-.07q-8.78-13.06-17.58-25.78-4.29-.4-8.59-.72v42.28q5.1.38,10.2.87Z"></path><path class="cls-1" d="M44.44,218.83q-13.51,3.18-26.9,7V209.81q14.75-4.26,29.66-7.69V187.71Q23.39,193.2,0,200.79v70.46q8.73-2.83,17.54-5.38V239.6q13.38-3.87,26.9-7Z"></path><path class="cls-1" d="M117.8,199.4c0-14.52-10-22.39-26.5-20q-15.57,2.29-31,5.46v70.46q8.92-1.83,17.91-3.37V227.3c3.09-.53,6.19-1,9.3-1.51q6,11.39,12.12,22.92,10.11-1.34,20.27-2.29-7.09-13-14.18-25.77A24.05,24.05,0,0,0,117.8,199.4Zm-29,13.54c-3.55.53-7.09,1.11-10.62,1.71V195q5.28-.9,10.57-1.71c6.42-1,10.6,2.36,10.6,8.36S95.42,211.94,88.8,212.94Z"></path><path class="cls-1" d="M164,171.63c-21.46.36-35.17,15.9-35.17,38.76S142.45,246.26,164,245.9s35.14-13.58,35.14-36.58C199.15,186.47,185.42,171.34,164,171.63Zm0,59.43c-10.14.16-16.71-8.18-16.71-21.81S154,186.64,164,186.48s16.66,8.69,16.66,22.26S174,230.91,164,231.06Z"></path><path class="cls-1" d="M256.56,219.49Q241.83,197.43,227,176.14q-7.22-.7-14.45-1.22v70.45q8.58.63,17.16,1.51v-40l.93.09q14.85,21.58,29.62,43.95,7.13,1.14,14.22,2.46V182.88q-8.49-1.59-17-2.9v39.65Z"></path><path class="cls-1" d="M287.23,185.39V199.8q10.13,2.13,20.17,4.63v56.05q8.85,2.2,17.63,4.7V209.13Q335,212,345,215.2V200.79A559.87,559.87,0,0,0,287.23,185.39Z"></path><polygon class="cls-1" points="156.87 331.36 145.94 342.94 156.87 342.94 156.87 331.36"></polygon><polygon class="cls-1" points="159.36 340.38 168.54 330.65 159.36 330.65 159.36 340.38"></polygon><polygon class="cls-1" points="171.71 330.64 160.25 342.94 183.11 342.94 171.71 330.64"></polygon><polygon class="cls-1" points="159.92 345.42 171.71 369.41 183.43 345.42 159.92 345.42"></polygon><polygon class="cls-1" points="146.01 345.42 167.93 366.91 157.05 345.42 146.01 345.42"></polygon><polygon class="cls-1" points="186.54 342.94 197.47 342.94 186.54 331.36 186.54 342.94"></polygon><polygon class="cls-1" points="184.06 330.65 174.88 330.65 184.06 340.38 184.06 330.65"></polygon><polygon class="cls-1" points="175.49 366.91 197.41 345.42 186.36 345.42 175.49 366.91"></polygon></g></g></svg>
@@ -0,0 +1,27 @@
1
+ body {
2
+ background-color: #fff;
3
+ text-align: center;
4
+ font-family: Arial, sans-serif
5
+ }
6
+
7
+ ul {
8
+ padding: 0;
9
+ }
10
+
11
+ li {
12
+ list-style-type: none;
13
+ display: inline-block;
14
+ padding: 1rem;
15
+ }
16
+
17
+ svg {
18
+ padding-top: 5rem;
19
+ padding-bottom: 3rem;
20
+ }
21
+
22
+ footer {
23
+ position: fixed;
24
+ bottom: 1rem;
25
+ left: 0;
26
+ right: 0
27
+ }
@@ -0,0 +1 @@
1
+ console.log('Hello world!')
@@ -0,0 +1,7 @@
1
+ ---
2
+ title: Frontman
3
+ ---
4
+
5
+ <img src="/frontman-logo.svg" alt="Frontman Logo" />
6
+
7
+ Frontman is a blazing fast static site generator written in Ruby.
@@ -0,0 +1,11 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:mobile="http://www.google.com/schemas/sitemap-mobile/1.0" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
3
+ <% sitemap_tree.get_all_pages.each do |page| %>
4
+ <% next if page.resource == current_page %>
5
+ <url>
6
+ <loc><%= Frontman::Config.get(:domain) %><%= page.resource.path %></loc>
7
+ <changefreq>daily</changefreq>
8
+ <priority>1</priority>
9
+ </url>
10
+ <% end %>
11
+ </urlset>
@@ -0,0 +1,19 @@
1
+ <html>
2
+ <head>
3
+ <title><%= page_title(current_page) %></title>
4
+ <link href="/main.css" rel="stylesheet"></link>
5
+ <link href="/code.css" rel="stylesheet"></link>
6
+ <script src="/main.js"></script>
7
+ </head>
8
+ <body>
9
+ <header>
10
+ <%= partial('menu.erb') %>
11
+ </header>
12
+
13
+ <%= yield %>
14
+
15
+ <footer>
16
+ &copy; Copyright <%= "#{Time.new.year} - #{data.site.title}" %>
17
+ </footer>
18
+ </body>
19
+ </html>