4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/markita/plug/about.rb', line 4
def self.page
text = <<~TEXT
# [Markita](https://github.com/carlosjhr64/markita)
* VERSION: #{VERSION}
* ROOT: #{ROOT.sub(%r{^/home/\w+/},'~/')}
* ARGV: #{ARGV.join(' ')}
* START_TIME: #{START_TIME}
## Plug.html routes:
TEXT
Base.routes['GET'].each do |route|
path = route[0].to_s
next unless %r{^/\w+\.html$}.match? path
basename = File.basename(path, '.*')
text << "* [#{basename}](#{path})\n"
end
if defined? Favicon && Favicon::ICO
text << "\n![Favicon](/favicon.ico)\n"
end
text
end
|