hotdocs 0.2.0 → 0.4.0

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.
@@ -1,31 +1,28 @@
1
- require "open3"
1
+ require "kramdown"
2
+ require "kramdown-parser-gfm"
3
+ require "rouge"
2
4
 
3
- class MarkdownHandler
4
- def self.prepare(engine)
5
- # Install npm packages
6
- # `capture3` raises if deno is not available
7
- Open3.capture3("deno --allow-read --allow-env --node-modules-dir=auto #{engine.root.join("lib/hotdocs/markdown.mjs")}", stdin_data: "")
8
- end
9
-
10
- def initialize(engine)
11
- @engine = engine
12
- end
5
+ require_relative "kramdown_alerts"
13
6
 
7
+ class MarkdownHandler
14
8
  def call(template, source)
15
- compiled = ::HotdocsController.render(inline: source, handler: :erb)
16
- # `capture3` raises if deno is not available
17
- out, err, status = Open3.capture3("deno --allow-read --allow-env --node-modules-dir=auto #{@engine.root.join("lib/hotdocs/markdown.mjs")}", stdin_data: compiled)
18
- Rails.logger.error("Failed to compile markdown: #{err}") unless status.success?
19
-
20
- if !err.empty? && !err.include?("The following packages are deprecated")
21
- # Render the compiled erb (without the md step).
22
- # It won't look great, but better than nothing.
23
- return <<~STRING
24
- @output_buffer.safe_append='#{compiled}'.freeze;
25
- @output_buffer
26
- STRING
9
+ # If the template contains a `fetcher`, do not allow Rails to cache the page.
10
+ if source.match?(%r{<%= fetcher.* do %>})
11
+ ActionView::PathRegistry.all_resolvers.each do |resolver|
12
+ resolver.instance_eval do
13
+ @unbound_templates.delete(template.virtual_path)
14
+ end
15
+ end
27
16
  end
28
17
 
18
+ compiled_template = ::HotdocsController.render(inline: source, handler: :erb)
19
+ out = Kramdown::Document.new(
20
+ compiled_template,
21
+ input: "GFM",
22
+ auto_ids: false,
23
+ syntax_highlighter_opts: { css_class: "highlight" }
24
+ ).to_html
25
+
29
26
  content_fors = ActionView::Template::Handlers::ERB
30
27
  .new
31
28
  .call(template, source)
@@ -34,7 +31,7 @@ class MarkdownHandler
34
31
 
35
32
  <<~STRING
36
33
  #{content_fors.join(";")}
37
- @output_buffer.safe_append='#{out}'.freeze;
34
+ @output_buffer.safe_append='#{out.gsub("'", "\\\\'")}'.freeze;
38
35
  @output_buffer
39
36
  STRING
40
37
  end
@@ -1,3 +1,3 @@
1
1
  module Hotdocs
2
- VERSION = "0.2.0"
2
+ VERSION = "0.4.0"
3
3
  end
@@ -1,4 +1,4 @@
1
- def source_paths # used by copy() & template()
1
+ def source_paths # used by copy_file()
2
2
  [ File.expand_path("../..", __dir__) ]
3
3
  end
4
4
 
@@ -15,23 +15,18 @@ def gem?(name)
15
15
  end
16
16
  end
17
17
 
18
- def pin?(name)
18
+ def pin(name)
19
19
  importmap_path = Pathname(destination_root).join("config/importmap.rb")
20
20
 
21
21
  regex = /pin ["']#{name}["']/
22
22
  if File.readlines(importmap_path).grep(regex).any?
23
23
  say "#{name} already pinned"
24
- false
25
24
  else
26
25
  run("bin/importmap pin #{name}") || abort("Failed to pin #{name} to the importmap")
27
- true
26
+ gsub_file importmap_path, /(pin ["']#{name}["'])(.*)/, '\1, preload: "hotdocs"\2'
28
27
  end
29
28
  end
30
29
 
31
- unless system("command -v deno > /dev/null 2>&1")
32
- abort "Install deno before running this task. Read more: https://deno.com"
33
- end
34
-
35
30
  if File.exist?("app/assets/config/manifest.js")
36
31
  abort "Migrate to Propshaft before running this task. Read more: https://github.com/rails/propshaft/blob/main/UPGRADING.md#3-migrate-from-sprockets-to-propshaft"
37
32
  end
@@ -40,27 +35,40 @@ gem?("importmap-rails") && run("bin/rails importmap:install")
40
35
  gem?("turbo-rails") && run("bin/rails turbo:install")
41
36
  gem?("stimulus-rails") && run("bin/rails stimulus:install")
42
37
 
43
- pin?("lunr")
38
+ create_file(Pathname(destination_root).join("app/javascript/hotdocs.js"), <<~FILE)
39
+ import "@hotwired/turbo-rails";
40
+ import "controllers";
44
41
 
45
- create_file(Pathname(destination_root).join("app/controllers/hotdocs_controller.rb"), <<~CONTROLLER)
42
+ import { application } from "controllers/application"
43
+ import { eagerLoadControllersFrom } from "@hotwired/stimulus-loading"
44
+ eagerLoadControllersFrom("hotdocs/controllers", application)
45
+ FILE
46
+
47
+ importmap_path = Pathname(destination_root).join("config/importmap.rb")
48
+ append_to_file(importmap_path, %(pin "hotdocs", preload: "hotdocs"\n))
49
+ pin("lunr")
50
+
51
+ create_file(Pathname(destination_root).join("app/controllers/hotdocs_controller.rb"), <<~FILE)
46
52
  class HotdocsController < ApplicationController
47
53
  helper Hotdocs::Engine.helpers
48
54
  layout "hotdocs"
49
55
  end
50
- CONTROLLER
56
+ FILE
51
57
 
52
- create_file(Pathname(destination_root).join("app/views/layouts/hotdocs.html.erb"), <<~LAYOUT)
58
+ create_file(Pathname(destination_root).join("app/views/layouts/hotdocs.html.erb"), <<~FILE)
53
59
  <% content_for :head do %>
54
60
  <%= content_for(:title, "HotDocs") unless content_for?(:title) %>
55
61
  <meta name="viewport" content="width=device-width,initial-scale=1">
56
- <%= stylesheet_link_tag :app %>
57
- <%= javascript_importmap_tags %>
62
+ <%= stylesheet_link_tag "hotdocs/application" %>
63
+ <%= stylesheet_link_tag "hotdocs/base" %>
64
+ <%= stylesheet_link_tag "hotdocs/rouge" %>
65
+ <%= javascript_importmap_tags "hotdocs" %>
58
66
  <% end %>
59
67
 
60
68
  <%= render template: "layouts/hotdocs/application" %>
61
- LAYOUT
69
+ FILE
62
70
 
63
- create_file(Pathname(destination_root).join("app/views/hotdocs/index.html.mderb"), <<~VIEW)
71
+ create_file(Pathname(destination_root).join("app/views/hotdocs/index.html.mderb"), <<~FILE)
64
72
  <%= content_for(:title, "Welcome") %>
65
73
 
66
74
  # Welcome to HotDocs
@@ -69,26 +77,30 @@ create_file(Pathname(destination_root).join("app/views/hotdocs/index.html.mderb"
69
77
 
70
78
  ## Todos
71
79
 
72
- <input type="checkbox" id="first">
73
- <label for="first"> Update <code>app/views/layouts/hotdocs.html.erb</code></label><br>
74
- <input type="checkbox" id="second">
75
- <label for="second"> Update <code>app/helpers/hotdocs_helper.rb</code></label><br>
76
- <input type="checkbox" id="third">
77
- <label for="third"> Maybe read the docs: <a href="https://hotdocsrails.com/" target="_blank">hotdocsrails.com</a></label>
78
- VIEW
80
+ <input type="checkbox" id="first"><label for="first"> Update <code>app/views/layouts/hotdocs.html.erb</code></label>
81
+ <input type="checkbox" id="second"><label for="second"> Update <code>app/helpers/hotdocs_helper.rb</code></label>
82
+ <input type="checkbox" id="third"><label for="third"> Maybe read the docs: <a href="https://hotdocsrails.com/" target="_blank">hotdocsrails.com</a></label>
83
+ FILE
84
+
85
+ empty_directory "app/assets/images/hotdocs"
86
+ copy_file("app/assets/images/hotdocs/icon.svg", Pathname(destination_root).join("app/assets/images/hotdocs/hotdocs.svg"))
79
87
 
80
- copy_file("app/assets/images/hotdocs/icon.svg", Pathname(destination_root).join("app/assets/images/hotdocs.svg"))
88
+ route "get '/hotdocs', to: 'hotdocs#index'"
81
89
 
82
- inject_into_module(Pathname(destination_root).join("app/helpers/application_helper.rb"), "ApplicationHelper", " include HotdocsHelper\n\n")
83
- create_file(Pathname(destination_root).join("app/helpers/hotdocs_helper.rb"), <<~HELPER)
90
+ create_file(Pathname(destination_root).join("app/helpers/hotdocs_helper.rb"), <<~FILE)
84
91
  module HotdocsHelper
92
+ # @return [Logo, nil]
85
93
  def logo
86
- Struct.new(:src, :alt).new(asset_path("hotdocs.svg"), "A humanized and happy hot dog")
94
+ Struct.new(:src, :alt).new(asset_path("hotdocs/hotdocs.svg"), "A humanized and happy hot dog")
95
+ end
96
+
97
+ def title
98
+ "HotDocs"
87
99
  end
88
100
 
89
101
  def nav_left_items(classes)
90
102
  [
91
- active_link_to("Docs", root_path, class: Array(classes))
103
+ active_link_to("Docs", hotdocs_path, class: Array(classes))
92
104
  ]
93
105
  end
94
106
 
@@ -101,7 +113,7 @@ create_file(Pathname(destination_root).join("app/helpers/hotdocs_helper.rb"), <<
101
113
  # { label: "", url: *_path, children: [], expanded: false/true }
102
114
  def menu_items
103
115
  [
104
- { label: "Welcome", url: root_path },
116
+ { label: "Welcome", url: hotdocs_path },
105
117
  ]
106
118
  end
107
119
 
@@ -137,172 +149,146 @@ create_file(Pathname(destination_root).join("app/helpers/hotdocs_helper.rb"), <<
137
149
  }
138
150
  ]
139
151
  end
140
- end
141
- HELPER
142
-
143
- create_file(Pathname(destination_root).join("app/assets/stylesheets/prism.css"), <<~CSS)
144
- /* Find more themes on: https://github.com/PrismJS/prism-themes */
145
-
146
- /*
147
- Darcula theme
148
-
149
- Adapted from a theme based on:
150
- IntelliJ Darcula Theme (https://github.com/bulenkov/Darcula)
151
-
152
- @author Alexandre Paradis <service.paradis@gmail.com>
153
- @version 1.0
154
- */
155
-
156
- code[class*="language-"],
157
- pre[class*="language-"] {
158
- color: #a9b7c6;
159
- font-family: Consolas, Monaco, 'Andale Mono', monospace;
160
- direction: ltr;
161
- text-align: left;
162
- white-space: pre;
163
- word-spacing: normal;
164
- word-break: normal;
165
- line-height: 1.5;
166
-
167
- -moz-tab-size: 4;
168
- -o-tab-size: 4;
169
- tab-size: 4;
170
-
171
- -webkit-hyphens: none;
172
- -moz-hyphens: none;
173
- -ms-hyphens: none;
174
- hyphens: none;
175
- }
176
-
177
- pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
178
- code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
179
- color: inherit;
180
- background: rgba(33, 66, 131, .85);
181
- }
182
-
183
- pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
184
- code[class*="language-"]::selection, code[class*="language-"] ::selection {
185
- color: inherit;
186
- background: rgba(33, 66, 131, .85);
187
- }
188
-
189
- /* Code blocks */
190
- pre[class*="language-"] {
191
- padding: 1em;
192
- margin: .5em 0;
193
- overflow: auto;
194
- }
195
-
196
- :not(pre) > code[class*="language-"],
197
- pre[class*="language-"] {
198
- background: #2b2b2b;
199
- }
200
-
201
- /* Inline code */
202
- :not(pre) > code[class*="language-"] {
203
- padding: .1em;
204
- border-radius: .3em;
205
- }
206
-
207
- .token.comment,
208
- .token.prolog,
209
- .token.cdata {
210
- color: #808080;
211
- }
212
-
213
- .token.delimiter,
214
- .token.boolean,
215
- .token.keyword,
216
- .token.selector,
217
- .token.important,
218
- .token.atrule {
219
- color: #cc7832;
220
- }
221
-
222
- .token.operator,
223
- .token.punctuation,
224
- .token.attr-name {
225
- color: #a9b7c6;
226
- }
227
-
228
- .token.tag,
229
- .token.tag .punctuation,
230
- .token.doctype,
231
- .token.builtin {
232
- color: #e8bf6a;
233
- }
234
-
235
- .token.entity,
236
- .token.number,
237
- .token.symbol {
238
- color: #6897bb;
239
- }
240
-
241
- .token.property,
242
- .token.constant,
243
- .token.variable {
244
- color: #9876aa;
245
- }
246
-
247
- .token.string,
248
- .token.char {
249
- color: #6a8759;
250
- }
251
-
252
- .token.attr-value,
253
- .token.attr-value .punctuation {
254
- color: #a5c261;
255
- }
256
-
257
- .token.attr-value .punctuation:first-child {
258
- color: #a9b7c6;
259
- }
260
-
261
- .token.url {
262
- color: #287bde;
263
- text-decoration: underline;
264
- }
265
-
266
- .token.function {
267
- color: #ffc66d;
268
- }
269
-
270
- .token.regex {
271
- background: #364135;
272
- }
273
152
 
274
- .token.bold {
275
- font-weight: bold;
276
- }
277
-
278
- .token.italic {
279
- font-style: italic;
280
- }
153
+ def fetcher_host
154
+ "http://127.0.0.1:3000"
155
+ end
156
+ end
157
+ FILE
281
158
 
282
- .token.inserted {
283
- background: #294436;
284
- }
159
+ empty_directory "app/assets/stylesheets/hotdocs"
285
160
 
286
- .token.deleted {
287
- background: #484a4a;
161
+ create_file(Pathname(destination_root).join("app/assets/stylesheets/hotdocs/base.css"), <<~FILE)
162
+ :root {
163
+ --docs-code-background-color: #eee;
164
+ --docs-code-border-color: #00000022;
165
+ --docs-text-color: #1c1e21;
288
166
  }
289
167
 
290
- code.language-css .token.property,
291
- code.language-css .token.property + .token.punctuation {
292
- color: #a9b7c6;
168
+ [data-theme=dark]:root {
169
+ --docs-code-background-color: #2b2b2b;
170
+ --docs-code-border-color: #ffffff22;
171
+ --docs-text-color: #e3e1de;
293
172
  }
294
173
 
295
- code.language-css .token.id {
296
- color: #ffc66d;
174
+ .article {
175
+ color: var(--docs-text-color);
176
+
177
+ a {
178
+ color: var(--docs-text-color);
179
+
180
+ &:has(code) {
181
+ text-underline-position: under;
182
+ text-decoration-thickness: 1px;
183
+ }
184
+ }
185
+
186
+ pre {
187
+ -webkit-overflow-scrolling: touch;
188
+ border-radius: .375rem;
189
+ box-sizing: border-box;
190
+ overflow-x: auto;
191
+ width: 100%;
192
+ }
193
+
194
+ code:not(pre code) {
195
+ background: var(--docs-code-background-color);
196
+ border-radius: 0.375rem;
197
+ border: .1rem solid var(--docs-code-border-color);
198
+ display: inline;
199
+ overflow-x: auto;
200
+ overflow: auto;
201
+ padding: 0.1rem 0.2rem;
202
+ word-break: break-word;
203
+ }
297
204
  }
298
-
299
- code.language-css .token.selector > .token.class,
300
- code.language-css .token.selector > .token.attribute,
301
- code.language-css .token.selector > .token.pseudo-class,
302
- code.language-css .token.selector > .token.pseudo-element {
303
- color: #ffc66d;
205
+ FILE
206
+
207
+ create_file(Pathname(destination_root).join("app/assets/stylesheets/hotdocs/rouge.css"), <<~FILE)
208
+ .article {
209
+ .highlight .hll { background-color: #6e7681 }
210
+ .highlight { background: #0d1117; color: #e6edf3 }
211
+ .highlight .c { color: #8b949e; font-style: italic } /* Comment */
212
+ .highlight .err { color: #f85149 } /* Error */
213
+ .highlight .esc { color: #e6edf3 } /* Escape */
214
+ .highlight .g { color: #e6edf3 } /* Generic */
215
+ .highlight .k { color: #ff7b72 } /* Keyword */
216
+ .highlight .l { color: #a5d6ff } /* Literal */
217
+ .highlight .n { color: #e6edf3 } /* Name */
218
+ .highlight .o { color: #ff7b72; font-weight: bold } /* Operator */
219
+ .highlight .x { color: #e6edf3 } /* Other */
220
+ .highlight .p { color: #e6edf3 } /* Punctuation */
221
+ .highlight .ch { color: #8b949e; font-style: italic } /* Comment.Hashbang */
222
+ .highlight .cm { color: #8b949e; font-style: italic } /* Comment.Multiline */
223
+ .highlight .cp { color: #8b949e; font-weight: bold; font-style: italic } /* Comment.Preproc */
224
+ .highlight .cpf { color: #8b949e; font-style: italic } /* Comment.PreprocFile */
225
+ .highlight .c1 { color: #8b949e; font-style: italic } /* Comment.Single */
226
+ .highlight .cs { color: #8b949e; font-weight: bold; font-style: italic } /* Comment.Special */
227
+ .highlight .gd { color: #ffa198; background-color: #490202 } /* Generic.Deleted */
228
+ .highlight .ge { color: #e6edf3; font-style: italic } /* Generic.Emph */
229
+ .highlight .ges { color: #e6edf3; font-weight: bold; font-style: italic } /* Generic.EmphStrong */
230
+ .highlight .gr { color: #ffa198 } /* Generic.Error */
231
+ .highlight .gh { color: #79c0ff; font-weight: bold } /* Generic.Heading */
232
+ .highlight .gi { color: #56d364; background-color: #0f5323 } /* Generic.Inserted */
233
+ .highlight .go { color: #8b949e } /* Generic.Output */
234
+ .highlight .gp { color: #8b949e } /* Generic.Prompt */
235
+ .highlight .gs { color: #e6edf3; font-weight: bold } /* Generic.Strong */
236
+ .highlight .gu { color: #79c0ff } /* Generic.Subheading */
237
+ .highlight .gt { color: #ff7b72 } /* Generic.Traceback */
238
+ .highlight .g-Underline { color: #e6edf3; text-decoration: underline } /* Generic.Underline */
239
+ .highlight .kc { color: #79c0ff } /* Keyword.Constant */
240
+ .highlight .kd { color: #ff7b72 } /* Keyword.Declaration */
241
+ .highlight .kn { color: #ff7b72 } /* Keyword.Namespace */
242
+ .highlight .kp { color: #79c0ff } /* Keyword.Pseudo */
243
+ .highlight .kr { color: #ff7b72 } /* Keyword.Reserved */
244
+ .highlight .kt { color: #ff7b72 } /* Keyword.Type */
245
+ .highlight .ld { color: #79c0ff } /* Literal.Date */
246
+ .highlight .m { color: #a5d6ff } /* Literal.Number */
247
+ .highlight .s { color: #a5d6ff } /* Literal.String */
248
+ .highlight .na { color: #e6edf3 } /* Name.Attribute */
249
+ .highlight .nb { color: #e6edf3 } /* Name.Builtin */
250
+ .highlight .nc { color: #f0883e; font-weight: bold } /* Name.Class */
251
+ .highlight .no { color: #79c0ff; font-weight: bold } /* Name.Constant */
252
+ .highlight .nd { color: #d2a8ff; font-weight: bold } /* Name.Decorator */
253
+ .highlight .ni { color: #ffa657 } /* Name.Entity */
254
+ .highlight .ne { color: #f0883e; font-weight: bold } /* Name.Exception */
255
+ .highlight .nf { color: #d2a8ff; font-weight: bold } /* Name.Function */
256
+ .highlight .nl { color: #79c0ff; font-weight: bold } /* Name.Label */
257
+ .highlight .nn { color: #ff7b72 } /* Name.Namespace */
258
+ .highlight .nx { color: #e6edf3 } /* Name.Other */
259
+ .highlight .py { color: #79c0ff } /* Name.Property */
260
+ .highlight .nt { color: #7ee787 } /* Name.Tag */
261
+ .highlight .nv { color: #79c0ff } /* Name.Variable */
262
+ .highlight .ow { color: #ff7b72; font-weight: bold } /* Operator.Word */
263
+ .highlight .pm { color: #e6edf3 } /* Punctuation.Marker */
264
+ .highlight .w { color: #6e7681 } /* Text.Whitespace */
265
+ .highlight .mb { color: #a5d6ff } /* Literal.Number.Bin */
266
+ .highlight .mf { color: #a5d6ff } /* Literal.Number.Float */
267
+ .highlight .mh { color: #a5d6ff } /* Literal.Number.Hex */
268
+ .highlight .mi { color: #a5d6ff } /* Literal.Number.Integer */
269
+ .highlight .mo { color: #a5d6ff } /* Literal.Number.Oct */
270
+ .highlight .sa { color: #79c0ff } /* Literal.String.Affix */
271
+ .highlight .sb { color: #a5d6ff } /* Literal.String.Backtick */
272
+ .highlight .sc { color: #a5d6ff } /* Literal.String.Char */
273
+ .highlight .dl { color: #79c0ff } /* Literal.String.Delimiter */
274
+ .highlight .sd { color: #a5d6ff } /* Literal.String.Doc */
275
+ .highlight .s2 { color: #a5d6ff } /* Literal.String.Double */
276
+ .highlight .se { color: #79c0ff } /* Literal.String.Escape */
277
+ .highlight .sh { color: #79c0ff } /* Literal.String.Heredoc */
278
+ .highlight .si { color: #a5d6ff } /* Literal.String.Interpol */
279
+ .highlight .sx { color: #a5d6ff } /* Literal.String.Other */
280
+ .highlight .sr { color: #79c0ff } /* Literal.String.Regex */
281
+ .highlight .s1 { color: #a5d6ff } /* Literal.String.Single */
282
+ .highlight .ss { color: #a5d6ff } /* Literal.String.Symbol */
283
+ .highlight .bp { color: #e6edf3 } /* Name.Builtin.Pseudo */
284
+ .highlight .fm { color: #d2a8ff; font-weight: bold } /* Name.Function.Magic */
285
+ .highlight .vc { color: #79c0ff } /* Name.Variable.Class */
286
+ .highlight .vg { color: #79c0ff } /* Name.Variable.Global */
287
+ .highlight .vi { color: #79c0ff } /* Name.Variable.Instance */
288
+ .highlight .vm { color: #79c0ff } /* Name.Variable.Magic */
289
+ .highlight .il { color: #a5d6ff } /* Literal.Number.Integer.Long */
304
290
  }
305
- CSS
291
+ FILE
306
292
 
307
293
  empty_directory "app/assets/builds"
308
294
  keep_file "app/assets/builds"
@@ -310,13 +296,3 @@ if Pathname(destination_root).join(".gitignore").exist?
310
296
  append_to_file(".gitignore", %(\n/app/assets/builds/*\n!/app/assets/builds/.keep\n))
311
297
  append_to_file(".gitignore", %(\n/node_modules/\n))
312
298
  end
313
-
314
- routes_path = Pathname(destination_root).join("config/routes.rb")
315
- routes = File.readlines(routes_path)
316
- unless routes.grep(/hotdocs#index/).any?
317
- if routes.grep(/^\s*(?!#)root/).any?
318
- route "get '/hotdocs', to: 'hotdocs#index'"
319
- else
320
- route "root to: 'hotdocs#index'"
321
- end
322
- end
@@ -75,7 +75,9 @@ def render_search_data
75
75
  end
76
76
 
77
77
  def render_path(path)
78
- controller, action = Rails.application.routes.recognize_path(path).values_at(:controller, :action)
78
+ base = ENV.fetch("RAILS_RELATIVE_URL_ROOT", "")
79
+ baseless_path = path.sub(/\A#{base}/, "")
80
+ controller, action = Rails.application.routes.recognize_path(baseless_path).values_at(:controller, :action)
79
81
  render_to_string("#{controller}/#{action}", layout: false)
80
82
  rescue ActionController::RoutingError => error
81
83
  logger.info("Skipped building #{path}: #{error}")
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hotdocs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - 3v0k4
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-04-07 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: rails
@@ -23,6 +23,48 @@ dependencies:
23
23
  - - ">="
24
24
  - !ruby/object:Gem::Version
25
25
  version: 7.1.0
26
+ - !ruby/object:Gem::Dependency
27
+ name: kramdown
28
+ requirement: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - "~>"
31
+ - !ruby/object:Gem::Version
32
+ version: '2.5'
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '2.5'
40
+ - !ruby/object:Gem::Dependency
41
+ name: kramdown-parser-gfm
42
+ requirement: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
47
+ type: :runtime
48
+ prerelease: false
49
+ version_requirements: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ - !ruby/object:Gem::Dependency
55
+ name: rouge
56
+ requirement: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - "~>"
59
+ - !ruby/object:Gem::Version
60
+ version: '4.5'
61
+ type: :runtime
62
+ prerelease: false
63
+ version_requirements: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: '4.5'
26
68
  description: HotDocs is a set of optimized Rails components & tools for writing docs.
27
69
  email:
28
70
  - riccardo.odone@gmail.com
@@ -36,6 +78,7 @@ files:
36
78
  - Rakefile
37
79
  - app/assets/images/hotdocs/icon.svg
38
80
  - app/assets/javascript/controllers/accordion_controller.js
81
+ - app/assets/javascript/controllers/fetcher_controller.js
39
82
  - app/assets/javascript/controllers/search_controller.js
40
83
  - app/assets/javascript/controllers/sidenav_controller.js
41
84
  - app/assets/javascript/controllers/toc_controller.js
@@ -47,7 +90,7 @@ files:
47
90
  - config/importmap.rb
48
91
  - lib/hotdocs.rb
49
92
  - lib/hotdocs/engine.rb
50
- - lib/hotdocs/markdown.mjs
93
+ - lib/hotdocs/kramdown_alerts.rb
51
94
  - lib/hotdocs/markdown.rb
52
95
  - lib/hotdocs/version.rb
53
96
  - lib/install/install.rb
@@ -75,7 +118,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
75
118
  - !ruby/object:Gem::Version
76
119
  version: '0'
77
120
  requirements: []
78
- rubygems_version: 3.6.2
121
+ rubygems_version: 3.6.9
79
122
  specification_version: 4
80
123
  summary: Write your docs with Ruby on Rails
81
124
  test_files: []