Sha256: e547463f9ed709d63beb41f2344897139e89c3a4a3073f3d239f436e89b12fe1
Contents?: true
Size: 1.49 KB
Versions: 4
Compression:
Stored size: 1.49 KB
Contents
# frozen_string_literal: true require 'date' require 'pathname' require 'mustache' require 'jazzy/config' require 'jazzy/gem_version' require 'jazzy/jazzy_markdown' module Jazzy class Doc < Mustache include Config::Mixin self.template_name = 'doc' def copyright copyright = config.copyright || ( # Fake date is used to keep integration tests consistent date = ENV['JAZZY_FAKE_DATE'] || DateTime.now.strftime('%Y-%m-%d') year = date[0..3] "© #{year} [#{config.author_name}](#{config.author_url}). " \ "All rights reserved. (Last updated: #{date})" ) Markdown.render_copyright(copyright).chomp end def jazzy_version # Fake version is used to keep integration tests consistent ENV['JAZZY_FAKE_VERSION'] || Jazzy::VERSION end def objc_first? config.objc_mode && config.hide_declarations != 'objc' end def language_stub objc_first? ? 'objc' : 'swift' end def module_version config.version_configured ? config.version : nil end def docs_title if config.title_configured config.title elsif config.version_configured # Fake version for integration tests version = ENV['JAZZY_FAKE_MODULE_VERSION'] || config.version "#{config.module_configs.first.module_name} #{version} Docs" else "#{config.module_configs.first.module_name} Docs" end end def enable_katex Markdown.has_math end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
jazzy-0.15.3 | lib/jazzy/doc.rb |
jazzy-0.15.2 | lib/jazzy/doc.rb |
jazzy-0.15.1 | lib/jazzy/doc.rb |
jazzy-0.15.0 | lib/jazzy/doc.rb |