Module: Markita
- Defined in:
- lib/markita.rb,
lib/markita/base.rb,
lib/markita/html.rb,
lib/markita/config.rb,
lib/markita/markdown.rb,
lib/markita/plug/about.rb,
lib/markita/plug/login.rb,
lib/markita/preprocess.rb,
lib/markita/refinement.rb,
lib/markita/plug/readme.rb,
lib/markita/plug/favicon.rb,
lib/markita/markdown/code.rb,
lib/markita/markdown/fold.rb,
lib/markita/markdown/form.rb,
lib/markita/markdown/list.rb,
lib/markita/markdown/embed.rb,
lib/markita/markdown/empty.rb,
lib/markita/markdown/image.rb,
lib/markita/markdown/split.rb,
lib/markita/markdown/table.rb,
lib/markita/plug/highlight.rb,
lib/markita/markdown/inline.rb,
lib/markita/markdown/markup.rb,
lib/markita/markdown/script.rb,
lib/markita/plug/navigation.rb,
lib/markita/markdown/heading.rb,
lib/markita/markdown/footnotes.rb,
lib/markita/markdown/attributes.rb,
lib/markita/markdown/blockquote.rb,
lib/markita/markdown/code_block.rb,
lib/markita/markdown/definitions.rb,
lib/markita/markdown/horizontal_rule.rb
Overview
Markita top level namespace
Defined Under Namespace
Modules: Html, Refinement Classes: Base, Markdown, Preprocess
Constant Summary collapse
- VERSION =
'6.0.250327'- HEADER_LINKS =
''- NAVIGATION =
''- BIND =
OPTIONS.bind || '0.0.0.0'
- PORT =
OPTIONS.port || '8080'
- SERVER =
'webrick'- MDX =
'.md'- INDEX =
'index'- ROOT =
File. OPTIONS.root || '~/vimwiki'
- SERVER_SETTINGS =
if [ssl_certificate, ssl_private_key].all? { File.exist? it } { SSLEnable: true, SSLVerifyClient: OpenSSL::SSL::VERIFY_NONE, SSLCertificate: OpenSSL::X509::Certificate.new(File.read(ssl_certificate)), SSLPrivateKey: OpenSSL::PKey::RSA.new(File.read(ssl_private_key)) } end
- SERVER_CONFIG =
lambda do |server| puts "#{$PROGRAM_NAME}-#{VERSION}".blue puts "Sinatra-#{Sinatra::VERSION} using #{server.class}".blue end
- APPDIR =
File.dirname __dir__, 2
- APPDATA =
File.join APPDIR, 'data'
- PATH =
lambda do |basename| [ROOT, APPDATA].map { File.join it, basename }.detect { File.exist? it } end
- NOT_FOUND =
- PAGE_KEY =
Note that it starts with a slash
%r{/(\w[\w/-]*\w)}- SEND_FILE =
%r{/(\w[\w/-]*\w\.\w+)}- START_TIME =
Time.now
- @@no =
[]
Class Method Summary collapse
Class Method Details
.no ⇒ Object
10 |
# File 'lib/markita.rb', line 10 def self.no = @@no |
.run! ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/markita.rb', line 12 def self.run! require_relative 'markita/requires' # Requiring the markdown elements: Dir.glob("#{__dir__}/markita/markdown/*.rb") .map { File.basename(it, '.rb') } .each { require_relative "markita/markdown/#{it}" } Base.run! end |