Class: Jekyll::Spaceship::Type
- Inherits:
-
Object
- Object
- Jekyll::Spaceship::Type
- Defined in:
- lib/jekyll-spaceship/cores/type.rb
Constant Summary collapse
- HTML_EXTENSIONS =
%w( .html .xhtml .htm ).freeze
- CSS_EXTENSIONS =
%w( .css .scss ).freeze
- MD_EXTENSIONS =
%w( .md .markdown ).freeze
- HTML_BLOCK_TYPE_MAP =
{ 'text/markdown' => 'markdown', }.freeze
Class Method Summary collapse
- .css?(_ext) ⇒ Boolean
- .html?(_ext) ⇒ Boolean
- .html_block_type(type) ⇒ Object
- .markdown?(_ext) ⇒ Boolean
Class Method Details
.css?(_ext) ⇒ Boolean
29 30 31 |
# File 'lib/jekyll-spaceship/cores/type.rb', line 29 def self.css?(_ext) CSS_EXTENSIONS.include?(_ext) end |
.html?(_ext) ⇒ Boolean
25 26 27 |
# File 'lib/jekyll-spaceship/cores/type.rb', line 25 def self.html?(_ext) HTML_EXTENSIONS.include?(_ext) end |
.html_block_type(type) ⇒ Object
37 38 39 |
# File 'lib/jekyll-spaceship/cores/type.rb', line 37 def self.html_block_type(type) HTML_BLOCK_TYPE_MAP[type] end |
.markdown?(_ext) ⇒ Boolean
33 34 35 |
# File 'lib/jekyll-spaceship/cores/type.rb', line 33 def self.markdown?(_ext) MD_EXTENSIONS.include?(_ext) end |