Class: Jekyll::JamComments::Configuration
- Inherits:
-
Object
- Object
- Jekyll::JamComments::Configuration
- Defined in:
- lib/jekyll_jam_comments/configuration.rb
Class Method Summary collapse
- .api_key ⇒ Object
- .base_url ⇒ Object
- .configuration ⇒ Object
- .copy ⇒ Object
- .domain ⇒ Object
- .environment ⇒ Object
Class Method Details
.api_key ⇒ Object
15 16 17 |
# File 'lib/jekyll_jam_comments/configuration.rb', line 15 def api_key configuration["api_key"] || ENV.fetch("JAM_COMMENTS_API_KEY", nil) end |
.base_url ⇒ Object
11 12 13 |
# File 'lib/jekyll_jam_comments/configuration.rb', line 11 def base_url configuration["base_url"] || ENV.fetch("JAM_COMMENTS_BASE_URL", nil) end |
.configuration ⇒ Object
41 42 43 |
# File 'lib/jekyll_jam_comments/configuration.rb', line 41 def configuration Jekyll.configuration({})["jam_comments"] || {} end |
.copy ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/jekyll_jam_comments/configuration.rb', line 25 def copy original_copy = configuration["copy"] || {} { :copy_confirmation_message => original_copy["confirmation_message"], :copy_submit_button => original_copy["submit_button"], :copy_name_placeholder => original_copy["name_placeholder"], :copy_email_placeholder => original_copy["email_placeholder"], :copy_comment_placeholder => original_copy["comment_placeholder"], :copy_write_tab => original_copy["write_tab"], :copy_preview_tab => original_copy["preview_tab"], :copy_auth_button => original_copy["auth_button"], :copy_log_out_button => original_copy["log_out_button"], }.compact end |
.domain ⇒ Object
7 8 9 |
# File 'lib/jekyll_jam_comments/configuration.rb', line 7 def domain configuration["domain"] || ENV.fetch("JAM_COMMENTS_DOMAIN", nil) end |
.environment ⇒ Object
19 20 21 22 23 |
# File 'lib/jekyll_jam_comments/configuration.rb', line 19 def environment configuration["environment"] || ENV["JAM_COMMENTS_ENVIRONMENT"] || ENV.fetch( "JEKYLL_ENV", nil ) end |