Skip to content

Commit

Permalink
ruby
Browse files Browse the repository at this point in the history
  • Loading branch information
hexylena committed Jun 5, 2024
1 parent a0d5653 commit a36ada1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion _plugins/jekyll-bundler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

Jekyll.logger.info "[GTN/Bundler] Analysing JS Bundle #{name} => #{bundle_timestamp} / #{hash}"
else
Jekyll.logger.info "[GTN/Bundler] Serving plain JS"
Jekyll.logger.info '[GTN/Bundler] Serving plain JS'
end
end
end
Expand Down Expand Up @@ -92,6 +92,7 @@ def load_bundle(name)
def load_bundle_dev(name)
bundle = @context.registers[:site].config['javascript_bundles'][name]
raise "Bundle #{name} not found in site config" if bundle.nil?

Jekyll.logger.debug "[GTN/Bundler] Bundle #{bundle}"

baseurl = @context.registers[:site].config['baseurl']
Expand Down
3 changes: 1 addition & 2 deletions _plugins/jekyll-jsonld.rb
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,6 @@ def generate_event_jsonld(page, site)

# Extract EDAM terms from all materials
edam_terms = materials.map do |material|

material.fetch('edam_ontology', []).map do |term|
{
'@type': 'DefinedTerm',
Expand All @@ -323,7 +322,7 @@ def generate_event_jsonld(page, site)
end
end

syllab = page['program'].reject{|s| s['section'].nil?}.map do |section|
syllab = page['program'].reject { |s| s['section'].nil? }.map do |section|
{
'@type': 'Syllabus',
name: section['section'],
Expand Down
2 changes: 1 addition & 1 deletion _plugins/util.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def collapse_event_date_pretty(event)
event['date_end']
end
# want dates like "Mar 22-25, 2024" or "Mar 22-May 1, 2024"
dash = " – " # thin space, en dash, thin space
dash = ' – ' # thin space, en dash, thin space
if s.year == e.year
if s.month == e.month
if s.day == e.day
Expand Down

0 comments on commit a36ada1

Please sign in to comment.