markita 3.0.210912 → 3.4.210922
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +33 -6
- data/bin/markita +3 -1
- data/lib/markita/config.rb +1 -0
- data/lib/markita/html.rb +4 -0
- data/lib/markita/markdown.rb +109 -39
- data/lib/markita/plug/favicon.rb +1 -1
- data/lib/markita/plug/highlight.rb +4 -2
- data/lib/markita/plug/navigation.rb +3 -0
- data/lib/markita.rb +2 -1
- metadata +9 -9
- data/data/highlight.css +0 -81
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: df6d287bdc5a83164680b7218d6a1b097dddc703ba731f5ae3568e51756385c7
|
4
|
+
data.tar.gz: eca3f9de5cd993be7c206c8bdd8cbcf89d99bb0799960aed60a3140d3f3ba9e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87f88ceb92a5bd24eddcaf3cbefa4dce1a4098befe0534eef5f68a90931441dd7324bfd5d1cb135351c28451d2a3891c259cbf8e7e2433cdbff54e76a4fbcf15
|
7
|
+
data.tar.gz: c691c08fde7db7ff8ee8f3b72a17b7f8cd32df9bf6b4b970699102b6c9dc3aedae4ce19c183ae912527b9c55432a75f47b337c85c8802130116fca708aa27e32
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Markita
|
2
2
|
|
3
|
-
* [VERSION 3.
|
3
|
+
* [VERSION 3.4.210922](https://github.com/carlosjhr64/markita/releases)
|
4
4
|
* [github](https://www.github.com/carlosjhr64/markita)
|
5
5
|
* [rubygems](https://rubygems.org/gems/markita)
|
6
6
|
|
@@ -23,18 +23,20 @@ Options:
|
|
23
23
|
--root=DIRECTORY ~/vimwiki
|
24
24
|
--bind=BIND 0.0.0.0
|
25
25
|
--port=PORT 8080
|
26
|
+
--theme=THEME base16.light
|
26
27
|
--allowed=IPS
|
27
28
|
--no_about
|
28
29
|
--no_favicon
|
29
30
|
--no_highlight
|
31
|
+
--no_navigation
|
30
32
|
--no_login
|
31
33
|
--no_plugs
|
32
34
|
Types:
|
33
35
|
DIRECTORY /^~?[\/\w\.]+$/
|
34
36
|
BIND /^[\w\.]+$/
|
35
37
|
PORT /^\d+$/
|
36
|
-
THEME /^[\w\.]+$/
|
37
38
|
IPS /^[\d\.\,]+$/
|
39
|
+
THEME /^[\w\.]+$/
|
38
40
|
# NOTE:
|
39
41
|
# Assuming site is in ~/vimwiki,
|
40
42
|
# when ~/vimwiki/.valid-id is set with a sha256sum of a password,
|
@@ -62,11 +64,23 @@ Markdown:
|
|
62
64
|
![Left Floating ](/img/image.png)
|
63
65
|
![ Right Floating](/img/image.png)
|
64
66
|
Image centered above.
|
65
|
-
Image to the left.
|
67
|
+
Image to the left with width and height set.
|
66
68
|
Image to the right.
|
67
69
|
And set a HR bar below.
|
68
70
|
---
|
69
71
|
|
72
|
+
### Image size
|
73
|
+
|
74
|
+
Markdown:
|
75
|
+
|
76
|
+
![In alt text say 100x100](/img/image.png)
|
77
|
+
|
78
|
+
### Image link
|
79
|
+
|
80
|
+
Markdown:
|
81
|
+
|
82
|
+
![Alt text](/img/image.png /href_to/page)
|
83
|
+
|
70
84
|
### Forms
|
71
85
|
|
72
86
|
Markdown:
|
@@ -83,6 +97,9 @@ Markdown:
|
|
83
97
|
! Address:[address]
|
84
98
|
! Code:[code="1234"]
|
85
99
|
|
100
|
+
A selection list:
|
101
|
+
! Color:[color="Red","White","Blue"]
|
102
|
+
|
86
103
|
### Template substitutions
|
87
104
|
|
88
105
|
Markdown:
|
@@ -252,8 +269,9 @@ Markdown:
|
|
252
269
|
|
253
270
|
!> /path-to/ascii_art.txt
|
254
271
|
|
255
|
-
Must be a `*.txt` file.
|
256
272
|
Useful for ASCII art.
|
273
|
+
Unless an `*.html` file, the text is embedded in `pre` tags.
|
274
|
+
Further more unless a `*.txt` file, the text is embedded in `code` tags.
|
257
275
|
|
258
276
|
### Emojis
|
259
277
|
|
@@ -277,6 +295,16 @@ Markdown:
|
|
277
295
|
[^2]: Cash is money in currency.
|
278
296
|
[^3]: Read as "Nan took it."
|
279
297
|
|
298
|
+
### Meta-data
|
299
|
+
|
300
|
+
Markdown:
|
301
|
+
|
302
|
+
---
|
303
|
+
Title: The Title You Want For Your Page
|
304
|
+
1: https://way.to/create/ref/links
|
305
|
+
---
|
306
|
+
You can now [link](1) with a reference number.
|
307
|
+
|
280
308
|
## HOW-TOs
|
281
309
|
|
282
310
|
### Set site password:
|
@@ -284,12 +312,11 @@ Markdown:
|
|
284
312
|
$ # Assuming ~/vimwiki is your site's root...
|
285
313
|
$ echo -n '<SitePasswordHere>' | sha256sum | grep -o '^\w*' > ~/vimwiki/.valid-id
|
286
314
|
```
|
287
|
-
### Set site custom favicon,
|
315
|
+
### Set site custom favicon, not found page, and login form and fail page:
|
288
316
|
```console
|
289
317
|
$ # Assuming ~/vimwiki is your site's root...
|
290
318
|
$ # Note that you'll have to restart the server on any change to these:
|
291
319
|
$ cp /path-to/custom/favicon.ico ~/vimwiki/favicon.ico
|
292
|
-
$ cp /path-to/custom/highlight.css ~/vimwiki/highlight.css
|
293
320
|
$ cp /path-to/custom/not_found.html ~/vimwiki/not_found.html
|
294
321
|
$ cp /path-to/custom/login_form.html ~/vimwiki/login_form.html
|
295
322
|
$ cp /path-to/custom/login_fail.html ~/vimwiki/login_fail.html
|
data/bin/markita
CHANGED
@@ -9,18 +9,20 @@ Options:
|
|
9
9
|
--root=DIRECTORY \t ~/vimwiki
|
10
10
|
--bind=BIND \t 0.0.0.0
|
11
11
|
--port=PORT \t 8080
|
12
|
+
--theme=THEME \t base16.light
|
12
13
|
--allowed=IPS
|
13
14
|
--no_about
|
14
15
|
--no_favicon
|
15
16
|
--no_highlight
|
17
|
+
--no_navigation
|
16
18
|
--no_login
|
17
19
|
--no_plugs
|
18
20
|
Types:
|
19
21
|
DIRECTORY /^~?[\\/\\w\\.]+$/
|
20
22
|
BIND /^[\\w\\.]+$/
|
21
23
|
PORT /^\\d+$/
|
22
|
-
THEME /^[\\w\\.]+$/
|
23
24
|
IPS /^[\\d\\.\\,]+$/
|
25
|
+
THEME /^[\\w\\.]+$/
|
24
26
|
# NOTE:
|
25
27
|
# Assuming site is in ~/vimwiki,
|
26
28
|
# when ~/vimwiki/.valid-id is set with a sha256sum of a password,
|
data/lib/markita/config.rb
CHANGED
data/lib/markita/html.rb
CHANGED
data/lib/markita/markdown.rb
CHANGED
@@ -6,14 +6,20 @@ class Markdown
|
|
6
6
|
def initialize(title)
|
7
7
|
@title = title
|
8
8
|
@line=@html=@file=@opt=nil
|
9
|
+
@metadata = {}
|
9
10
|
end
|
10
11
|
|
11
12
|
def start
|
12
|
-
@
|
13
|
+
@html << HTML.header(@title)
|
14
|
+
@line = HTML.navigation
|
13
15
|
end
|
14
16
|
|
15
17
|
def finish
|
18
|
+
if title = @metadata['Title']
|
19
|
+
@html << %Q(<script> document.title = "#{title}" </script>\n)
|
20
|
+
end
|
16
21
|
@html << HTML.footer
|
22
|
+
@line = nil
|
17
23
|
end
|
18
24
|
|
19
25
|
def default
|
@@ -21,8 +27,12 @@ class Markdown
|
|
21
27
|
@line = @file.gets
|
22
28
|
end
|
23
29
|
|
30
|
+
def init(fh)
|
31
|
+
@file,@html,@opt = Preprocess.new(fh),'',{}
|
32
|
+
end
|
33
|
+
|
24
34
|
def parse(fh)
|
25
|
-
|
35
|
+
init(fh)
|
26
36
|
start
|
27
37
|
while @line
|
28
38
|
PARSERS.detect{method(_1).call} or default
|
@@ -56,7 +66,10 @@ class Markdown
|
|
56
66
|
CODE = lambda {|m| "<code>#{m[1]}</code>"}
|
57
67
|
|
58
68
|
Ax = /\[([^\[\]]+)\]\(([^()]+)\)/
|
59
|
-
|
69
|
+
def anchor(m)
|
70
|
+
href = ((_=m[2]).match?(/^\d+$/) and @metadata[_] or _)
|
71
|
+
%Q(<a href="#{href}">#{m[1]}</a>)
|
72
|
+
end
|
60
73
|
|
61
74
|
URLx = %r(\[(https?://[\w\.\-\/\&\+\?\%]+)\])
|
62
75
|
URL = lambda {|m| %Q(<a href="#{m[1]}">#{m[1]}</a>)}
|
@@ -89,9 +102,9 @@ class Markdown
|
|
89
102
|
return (block ? block.call(entry) : entry)
|
90
103
|
end
|
91
104
|
|
92
|
-
|
105
|
+
def inline(entry)
|
93
106
|
string = Markdown.tag(entry, CODEx, CODE) do |entry|
|
94
|
-
Markdown.tag(entry, Ax,
|
107
|
+
Markdown.tag(entry, Ax, method(:anchor)) do |entry|
|
95
108
|
Markdown.tag(entry, URLx, URL) do |entry|
|
96
109
|
entry = Markdown.tag(entry, EMOJIx, EMOJI)
|
97
110
|
entry = Markdown.tag(entry, Bx, B)
|
@@ -115,15 +128,20 @@ class Markdown
|
|
115
128
|
end
|
116
129
|
|
117
130
|
# Ordered list
|
118
|
-
ORDERED =
|
131
|
+
ORDERED = /^( {0,3})\d+\. (\S.*)$/
|
119
132
|
PARSERS << :ordered
|
120
|
-
def ordered
|
121
|
-
|
133
|
+
def ordered(md=ORDERED.match(@line), level=0)
|
134
|
+
return false unless md
|
122
135
|
@html << "<ol#{@opt[:attributes]}>\n"
|
123
136
|
@opt.delete(:attributes)
|
124
|
-
while md
|
125
|
-
@html << " <li>#{
|
126
|
-
md = (@line=@file.gets)&.match
|
137
|
+
while md and level==md[1].length
|
138
|
+
@html << " <li>#{inline(md[2])}</li>\n"
|
139
|
+
if md = (@line=@file.gets)&.match(ORDERED)
|
140
|
+
if level < md[1].length
|
141
|
+
ordered(md, md[1].length)
|
142
|
+
md = @line&.match(ORDERED)
|
143
|
+
end
|
144
|
+
end
|
127
145
|
end
|
128
146
|
@html << "</ol>\n"
|
129
147
|
true
|
@@ -137,7 +155,7 @@ class Markdown
|
|
137
155
|
@html << "<p#{@opt[:attributes]}>\n"
|
138
156
|
@opt.delete(:attributes)
|
139
157
|
while md
|
140
|
-
@html <<
|
158
|
+
@html << inline(@line)
|
141
159
|
md = (@line=@file.gets)&.match PARAGRAPHS
|
142
160
|
end
|
143
161
|
@html << "</p>\n"
|
@@ -145,15 +163,20 @@ class Markdown
|
|
145
163
|
end
|
146
164
|
|
147
165
|
# Unordered list
|
148
|
-
UNORDERED = /^[*] (.*)$/
|
166
|
+
UNORDERED = /^( {0,3})[*] (\S.*)$/
|
149
167
|
PARSERS << :unordered
|
150
|
-
def unordered
|
151
|
-
|
168
|
+
def unordered(md=UNORDERED.match(@line), level=0)
|
169
|
+
return false unless md
|
152
170
|
@html << "<ul#{@opt[:attributes]}>\n"
|
153
171
|
@opt.delete(:attributes)
|
154
|
-
while md
|
155
|
-
@html << " <li>#{
|
156
|
-
md = (@line=@file.gets)&.match
|
172
|
+
while md and level==md[1].length
|
173
|
+
@html << " <li>#{inline(md[2])}</li>\n"
|
174
|
+
if md = (@line=@file.gets)&.match(UNORDERED)
|
175
|
+
if level < md[1].length
|
176
|
+
unordered(md, md[1].length)
|
177
|
+
md = @line&.match(UNORDERED)
|
178
|
+
end
|
179
|
+
end
|
157
180
|
end
|
158
181
|
@html << "</ul>\n"
|
159
182
|
true
|
@@ -171,7 +194,7 @@ class Markdown
|
|
171
194
|
li = (x=='x')?
|
172
195
|
%q{<li style="list-style-type: '☑ '">} :
|
173
196
|
%q{<li style="list-style-type: '☐ '">}
|
174
|
-
@html << " #{li}#{
|
197
|
+
@html << " #{li}#{inline(t)}</li>\n"
|
175
198
|
md = (@line=@file.gets)&.match BALLOTS
|
176
199
|
end
|
177
200
|
@html << "</ul>\n"
|
@@ -187,8 +210,8 @@ class Markdown
|
|
187
210
|
@opt.delete(:attributes)
|
188
211
|
while md
|
189
212
|
item = md[1]
|
190
|
-
@html << ((item[-1]==':')? "<dt>#{
|
191
|
-
"<dd>#{
|
213
|
+
@html << ((item[-1]==':')? "<dt>#{inline(item[0..-2])}</dt>\n" :
|
214
|
+
"<dd>#{inline(item)}</dd>\n")
|
192
215
|
md = (@line=@file.gets)&.match DEFINITIONS
|
193
216
|
end
|
194
217
|
@html << "</dl>\n"
|
@@ -201,9 +224,9 @@ class Markdown
|
|
201
224
|
def headers
|
202
225
|
md = HEADERS.match(@line) or return false
|
203
226
|
i,header = md[1].length,md[2]
|
204
|
-
id = header.
|
227
|
+
id = header.gsub(/\([^\(\)]*\)/,'').scan(/\w+/).join('+')
|
205
228
|
@html << %Q(<a id="#{id}">\n)
|
206
|
-
@html << " <h#{i}#{@opt[:attributes]}>#{
|
229
|
+
@html << " <h#{i}#{@opt[:attributes]}>#{inline(header)}</h#{i}>\n"
|
207
230
|
@html << "</a>\n"
|
208
231
|
@opt.delete(:attributes)
|
209
232
|
@line = @file.gets
|
@@ -218,7 +241,7 @@ class Markdown
|
|
218
241
|
@html << "<blockquote#{@opt[:attributes]}>\n"
|
219
242
|
@opt.delete(:attributes)
|
220
243
|
while md
|
221
|
-
@html <<
|
244
|
+
@html << inline(md[1])
|
222
245
|
@html << "\n"
|
223
246
|
md = (@line=@file.gets)&.match BLOCKQS
|
224
247
|
end
|
@@ -262,14 +285,31 @@ class Markdown
|
|
262
285
|
true
|
263
286
|
end
|
264
287
|
|
265
|
-
#
|
288
|
+
# Meta-data
|
289
|
+
METADATAS = /^(\w+): (.*)$/
|
290
|
+
def metadata
|
291
|
+
md = METADATAS.match(@line) or return false
|
292
|
+
while md
|
293
|
+
@metadata[md[1]] = md[2]
|
294
|
+
md = (@line=@file.gets)&.match METADATAS
|
295
|
+
end
|
296
|
+
true
|
297
|
+
end
|
298
|
+
|
299
|
+
# Horizontal rule or Meta-data
|
266
300
|
HRS = /^---+$/
|
267
301
|
PARSERS << :hrs
|
268
302
|
def hrs
|
269
303
|
HRS.match? @line or return false
|
270
|
-
@html << "<hr#{@opt[:attributes]}>\n"
|
271
|
-
@opt.delete(:attributes)
|
272
304
|
@line = @file.gets
|
305
|
+
if metadata
|
306
|
+
# Optional closing HRS
|
307
|
+
@line = @file.gets if @line&.match? HRS
|
308
|
+
else
|
309
|
+
# Display HR
|
310
|
+
@html << "<hr#{@opt[:attributes]}>\n"
|
311
|
+
@opt.delete(:attributes)
|
312
|
+
end
|
273
313
|
true
|
274
314
|
end
|
275
315
|
|
@@ -281,7 +321,7 @@ class Markdown
|
|
281
321
|
@html << "<table#{@opt[:attributes]}>\n"
|
282
322
|
@opt.delete(:attributes)
|
283
323
|
@html << '<thead><tr><th>'
|
284
|
-
@html << @line[1...-1].split('|').map{
|
324
|
+
@html << @line[1...-1].split('|').map{inline(_1.strip)}.join('</th><th>')
|
285
325
|
@html << "</th></tr></thead>\n"
|
286
326
|
align = []
|
287
327
|
while (@line=@file.gets)&.match TABLES
|
@@ -298,7 +338,7 @@ class Markdown
|
|
298
338
|
align[i] = ' align="left"'
|
299
339
|
@html << '<td><hr></td>'
|
300
340
|
else
|
301
|
-
@html << "<td#{align[i]}>#{
|
341
|
+
@html << "<td#{align[i]}>#{inline(cell.strip)}</td>"
|
302
342
|
end
|
303
343
|
end
|
304
344
|
@html << "</tr>\n"
|
@@ -332,7 +372,7 @@ class Markdown
|
|
332
372
|
PARSERS << :images
|
333
373
|
def images
|
334
374
|
md = IMAGES.match(@line) or return false
|
335
|
-
alt,src=md[1]
|
375
|
+
alt,src,href=md[1],*md[2].strip.split(/\s+/,2)
|
336
376
|
style = ' '
|
337
377
|
case alt
|
338
378
|
when /^ .* $/
|
@@ -342,14 +382,21 @@ class Markdown
|
|
342
382
|
when /^ /
|
343
383
|
style = %Q( style="float:right;" )
|
344
384
|
end
|
385
|
+
if /(\d+)x(\d+)/.match alt
|
386
|
+
style << %Q(width="#{$1}" height="#{$2}" )
|
387
|
+
end
|
388
|
+
@html << %Q(<a href="#{href}">\n) if href
|
345
389
|
@html << %Q(<img src="#{src}"#{style}alt="#{alt.strip}"#{@opt[:attributes]}>\n)
|
390
|
+
@html << %Q(</a>\n) if href
|
346
391
|
@opt.delete(:attributes)
|
347
392
|
@line = @file.gets
|
348
393
|
true
|
349
394
|
end
|
350
395
|
|
351
396
|
# Forms
|
352
|
-
|
397
|
+
FIELD = '(\w+:)?\[(\*)?(\w+)(=("[^"]+")(,"[^"]+")*)?\]'
|
398
|
+
FIELDS = Regexp.new FIELD
|
399
|
+
FORMS = Regexp.new "^!( #{FIELD})+"
|
353
400
|
PARSERS << :forms
|
354
401
|
def forms
|
355
402
|
md = FORMS.match(@line) or return false
|
@@ -359,16 +406,26 @@ class Markdown
|
|
359
406
|
while md
|
360
407
|
n += 1
|
361
408
|
form << ' <br>' if n > 1
|
362
|
-
@line.scan(
|
409
|
+
@line.scan(FIELDS).each do |field, pwd, name, value|
|
363
410
|
method ||= ' method="post"' if pwd
|
364
411
|
field &&= field[0...-1]
|
365
412
|
value &&= value[2...-1]
|
366
413
|
if field
|
367
|
-
fields += 1
|
368
414
|
type = (pwd)? 'password' : 'text'
|
369
415
|
if value
|
370
|
-
|
416
|
+
if (values = value.split('","')).length > 1
|
417
|
+
form << %Q(#{field}:<select name="#{name}">)
|
418
|
+
values.each do |value|
|
419
|
+
fields += 1
|
420
|
+
form << %Q( <option value="#{value}">#{value}</option>)
|
421
|
+
end
|
422
|
+
form << "</select>"
|
423
|
+
else
|
424
|
+
fields += 1
|
425
|
+
form << %Q{ #{field}:<input type="#{type}" name="#{name}" value="#{value}">}
|
426
|
+
end
|
371
427
|
else
|
428
|
+
fields += 1
|
372
429
|
form << %Q{ #{field}:<input type="#{type}" name="#{name}">}
|
373
430
|
end
|
374
431
|
elsif name=='submit'
|
@@ -393,14 +450,27 @@ class Markdown
|
|
393
450
|
end
|
394
451
|
|
395
452
|
# Embed text
|
396
|
-
EMBED_TEXTS = /^!> (#{PAGE_KEY}
|
453
|
+
EMBED_TEXTS = /^!> (#{PAGE_KEY}\.\w+)$/
|
397
454
|
PARSERS << :embed_texts
|
398
455
|
def embed_texts
|
399
456
|
md = EMBED_TEXTS.match(@line) or return false
|
400
457
|
if File.exist?(filename=File.join(ROOT, md[1]))
|
401
|
-
|
402
|
-
|
403
|
-
|
458
|
+
extension,lang = filename.split('.').last,nil
|
459
|
+
unless extension=='html'
|
460
|
+
lang = Rouge::Lexer.find extension
|
461
|
+
klass = lang ? ' class="highlight"' : nil
|
462
|
+
@html << "<pre#{klass}#{@opt[:attributes]}>"
|
463
|
+
@opt.delete(:attributes)
|
464
|
+
@html << '<code>' unless extension=='txt'
|
465
|
+
@html << "\n"
|
466
|
+
end
|
467
|
+
code = File.read(filename)
|
468
|
+
@html << (lang ? ROUGE.format(lang.new.lex(code)) : code)
|
469
|
+
unless extension=='html'
|
470
|
+
@html << '</code>' unless extension=='txt'
|
471
|
+
@html << '</pre>'
|
472
|
+
@html << "\n"
|
473
|
+
end
|
404
474
|
else
|
405
475
|
@html << @line
|
406
476
|
end
|
@@ -415,7 +485,7 @@ class Markdown
|
|
415
485
|
md = FOOTNOTES.match(@line) or return false
|
416
486
|
@html << "<small>\n"
|
417
487
|
while md
|
418
|
-
@html <<
|
488
|
+
@html << inline(@line.chomp)+"<br>\n"
|
419
489
|
md = (@line=@file.gets)&.match FOOTNOTES
|
420
490
|
end
|
421
491
|
@html << "</small>\n"
|
data/lib/markita/plug/favicon.rb
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
module Markita
|
2
|
-
class Base
|
2
|
+
class Base
|
3
3
|
HEADER_LINKS << %Q( <link rel="stylesheet" href="/highlight.css" type="text/css">\n)
|
4
4
|
module Highlight
|
5
|
-
|
5
|
+
theme = OPTIONS&.theme || 'base16.light'
|
6
|
+
CSS = Rouge::Theme.find(theme)&.render(scope: '.highlight')
|
7
|
+
raise "Can't find Rouge Theme "+theme unless CSS
|
6
8
|
end
|
7
9
|
|
8
10
|
get '/highlight.css' do
|
data/lib/markita.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
module Markita
|
2
|
-
VERSION = '3.
|
2
|
+
VERSION = '3.4.210922'
|
3
3
|
|
4
4
|
def self.run!
|
5
5
|
# Standard libraries
|
@@ -18,6 +18,7 @@ module Markita
|
|
18
18
|
# Plugs
|
19
19
|
require_relative 'markita/plug/favicon.rb' unless OPTIONS&.no_favicon
|
20
20
|
require_relative 'markita/plug/highlight.rb' unless OPTIONS&.no_highlight
|
21
|
+
require_relative 'markita/plug/navigation.rb' unless OPTIONS&.no_navigation
|
21
22
|
require_relative 'markita/plug/login.rb' unless OPTIONS&.no_login
|
22
23
|
require_relative 'markita/plug/about.rb' unless OPTIONS&.no_about
|
23
24
|
require_relative 'markita/plug/plugs.rb' unless OPTIONS&.no_plugs
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: markita
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.4.210922
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- CarlosJHR64
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-09-
|
11
|
+
date: 2021-09-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: help_parser
|
@@ -16,20 +16,20 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '8.0'
|
20
20
|
- - ">="
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version:
|
22
|
+
version: 8.0.210917
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - "~>"
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '
|
29
|
+
version: '8.0'
|
30
30
|
- - ">="
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version:
|
32
|
+
version: 8.0.210917
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: rouge
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -39,7 +39,7 @@ dependencies:
|
|
39
39
|
version: '3.26'
|
40
40
|
- - ">="
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: 3.26.
|
42
|
+
version: 3.26.1
|
43
43
|
type: :runtime
|
44
44
|
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -49,7 +49,7 @@ dependencies:
|
|
49
49
|
version: '3.26'
|
50
50
|
- - ">="
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version: 3.26.
|
52
|
+
version: 3.26.1
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: sinatra
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|
@@ -104,7 +104,6 @@ files:
|
|
104
104
|
- bin/markita
|
105
105
|
- data/emojis.tsv
|
106
106
|
- data/favicon.ico
|
107
|
-
- data/highlight.css
|
108
107
|
- data/login_failed.html
|
109
108
|
- data/login_form.html
|
110
109
|
- data/not_found.html
|
@@ -117,6 +116,7 @@ files:
|
|
117
116
|
- lib/markita/plug/favicon.rb
|
118
117
|
- lib/markita/plug/highlight.rb
|
119
118
|
- lib/markita/plug/login.rb
|
119
|
+
- lib/markita/plug/navigation.rb
|
120
120
|
- lib/markita/plug/plugs.rb
|
121
121
|
- lib/markita/preprocess.rb
|
122
122
|
homepage: https://github.com/carlosjhr64/markita
|
data/data/highlight.css
DELETED
@@ -1,81 +0,0 @@
|
|
1
|
-
/* Ruby Gem Rouge's base16.light */
|
2
|
-
.highlight table td { padding: 5px; }
|
3
|
-
.highlight table pre { margin: 0; }
|
4
|
-
.highlight, .highlight .w {
|
5
|
-
color: #303030;
|
6
|
-
}
|
7
|
-
.highlight .err {
|
8
|
-
color: #151515;
|
9
|
-
background-color: #ac4142;
|
10
|
-
}
|
11
|
-
.highlight .c, .highlight .ch, .highlight .cd, .highlight .cm, .highlight .cpf, .highlight .c1, .highlight .cs {
|
12
|
-
color: #505050;
|
13
|
-
}
|
14
|
-
.highlight .cp {
|
15
|
-
color: #f4bf75;
|
16
|
-
}
|
17
|
-
.highlight .nt {
|
18
|
-
color: #f4bf75;
|
19
|
-
}
|
20
|
-
.highlight .o, .highlight .ow {
|
21
|
-
color: #d0d0d0;
|
22
|
-
}
|
23
|
-
.highlight .p, .highlight .pi {
|
24
|
-
color: #d0d0d0;
|
25
|
-
}
|
26
|
-
.highlight .gi {
|
27
|
-
color: #90a959;
|
28
|
-
}
|
29
|
-
.highlight .gd {
|
30
|
-
color: #ac4142;
|
31
|
-
}
|
32
|
-
.highlight .gh {
|
33
|
-
color: #6a9fb5;
|
34
|
-
background-color: #151515;
|
35
|
-
font-weight: bold;
|
36
|
-
}
|
37
|
-
.highlight .k, .highlight .kn, .highlight .kp, .highlight .kr, .highlight .kv {
|
38
|
-
color: #aa759f;
|
39
|
-
}
|
40
|
-
.highlight .kc {
|
41
|
-
color: #d28445;
|
42
|
-
}
|
43
|
-
.highlight .kt {
|
44
|
-
color: #d28445;
|
45
|
-
}
|
46
|
-
.highlight .kd {
|
47
|
-
color: #d28445;
|
48
|
-
}
|
49
|
-
.highlight .s, .highlight .sb, .highlight .sc, .highlight .dl, .highlight .sd, .highlight .s2, .highlight .sh, .highlight .sx, .highlight .s1 {
|
50
|
-
color: #90a959;
|
51
|
-
}
|
52
|
-
.highlight .sa {
|
53
|
-
color: #aa759f;
|
54
|
-
}
|
55
|
-
.highlight .sr {
|
56
|
-
color: #75b5aa;
|
57
|
-
}
|
58
|
-
.highlight .si {
|
59
|
-
color: #8f5536;
|
60
|
-
}
|
61
|
-
.highlight .se {
|
62
|
-
color: #8f5536;
|
63
|
-
}
|
64
|
-
.highlight .nn {
|
65
|
-
color: #f4bf75;
|
66
|
-
}
|
67
|
-
.highlight .nc {
|
68
|
-
color: #f4bf75;
|
69
|
-
}
|
70
|
-
.highlight .no {
|
71
|
-
color: #f4bf75;
|
72
|
-
}
|
73
|
-
.highlight .na {
|
74
|
-
color: #6a9fb5;
|
75
|
-
}
|
76
|
-
.highlight .m, .highlight .mb, .highlight .mf, .highlight .mh, .highlight .mi, .highlight .il, .highlight .mo, .highlight .mx {
|
77
|
-
color: #90a959;
|
78
|
-
}
|
79
|
-
.highlight .ss {
|
80
|
-
color: #90a959;
|
81
|
-
}
|