Module: Jekyll::Geolexica::Configuration

Included in:
ConceptSerializer, ConceptsGenerator, Glossary, ImagesGenerator, MetaPagesGenerator
Defined in:
lib/jekyll/geolexica/configuration.rb

Instance Method Summary collapse

Instance Method Details

#bibliography_pathObject



46
47
48
49
50
51
52
# File 'lib/jekyll/geolexica/configuration.rb', line 46

def bibliography_path
  bibliography_path = glossary_config["bibliography_path"] ||
    glossary_config["glossary_path"]
  return nil if bibliography_path.nil? || bibliography_path.empty?

  File.expand_path("#{bibliography_path}/bibliography.yaml", site.source)
end

#concepts_globObject



7
8
9
10
# File 'lib/jekyll/geolexica/configuration.rb', line 7

def concepts_glob
  glob_string = glossary_config["concepts_glob"]
  File.expand_path(glob_string, site.source)
end

#glossary_formatObject



24
25
26
# File 'lib/jekyll/geolexica/configuration.rb', line 24

def glossary_format
  glossary_config["format"]
end

#glossary_pathObject



19
20
21
22
# File 'lib/jekyll/geolexica/configuration.rb', line 19

def glossary_path
  glob_string = glossary_config["glossary_path"]
  File.expand_path(glob_string, site.source)
end

#images_metadata_pathObject



35
36
37
38
39
40
41
42
43
44
# File 'lib/jekyll/geolexica/configuration.rb', line 35

def 
   = glossary_config["images_metadata_path"] ||
    glossary_config["glossary_path"]

  return {} if .nil? || .empty?

  File.expand_path(
    "#{images_metadata_path}/images_metadata.yaml", site.source
  )
end

#images_pathObject



28
29
30
31
32
33
# File 'lib/jekyll/geolexica/configuration.rb', line 28

def images_path
  glossary_path = glossary_config["glossary_path"]
  return nil if glossary_path.nil? || glossary_path.empty?

  File.expand_path("#{glossary_path}/images", site.source)
end

#localized_concepts_pathObject



12
13
14
15
16
17
# File 'lib/jekyll/geolexica/configuration.rb', line 12

def localized_concepts_path
  path = glossary_config["localized_concepts_path"]
  return nil if path.nil? || path.empty?

  File.expand_path(path, site.source)
end

#output_html?Boolean

Returns:

  • (Boolean)


66
67
68
# File 'lib/jekyll/geolexica/configuration.rb', line 66

def output_html?
  glossary_config["formats"].include?("html")
end

#output_json?Boolean

Returns:

  • (Boolean)


70
71
72
# File 'lib/jekyll/geolexica/configuration.rb', line 70

def output_json?
  glossary_config["formats"].include?("json")
end

#output_jsonld?Boolean

Returns:

  • (Boolean)


74
75
76
# File 'lib/jekyll/geolexica/configuration.rb', line 74

def output_jsonld?
  glossary_config["formats"].include?("json-ld")
end

#output_tbx?Boolean

Returns:

  • (Boolean)


78
79
80
# File 'lib/jekyll/geolexica/configuration.rb', line 78

def output_tbx?
  glossary_config["formats"].include?("tbx-iso-tml")
end

#output_turtle?Boolean

Returns:

  • (Boolean)


82
83
84
# File 'lib/jekyll/geolexica/configuration.rb', line 82

def output_turtle?
  glossary_config["formats"].include?("turtle")
end

#output_yaml?Boolean

Returns:

  • (Boolean)


86
87
88
# File 'lib/jekyll/geolexica/configuration.rb', line 86

def output_yaml?
  glossary_config["formats"].include?("yaml")
end

#report_issue_urlObject



58
59
60
# File 'lib/jekyll/geolexica/configuration.rb', line 58

def report_issue_url
  glossary_config["report_issue_url"]
end

#suggest_translation_urlObject



54
55
56
# File 'lib/jekyll/geolexica/configuration.rb', line 54

def suggest_translation_url
  glossary_config["suggest_translation_url"]
end

#term_languagesObject



62
63
64
# File 'lib/jekyll/geolexica/configuration.rb', line 62

def term_languages
  glossary_config["term_languages"]
end