Skip to content

Commit

Permalink
rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
hexylena committed Dec 19, 2023
1 parent 884bcbe commit 93d4bc7
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 17 deletions.
5 changes: 3 additions & 2 deletions _plugins/jekyll-topic-filter.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require 'json'
require 'yaml'
require './_plugins/gtn'
Expand Down Expand Up @@ -972,8 +973,8 @@ def to_material(site, page)
end

def get_workflow(site, page, workflow)
mat = self.to_material(site, page)
mat['workflows'].select{|w| w['workflow'] == workflow }[0]
mat = to_material(site, page)
mat['workflows'].select { |w| w['workflow'] == workflow }[0]
end
end
end
Expand Down
6 changes: 2 additions & 4 deletions _plugins_dev/api-fake.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@

module Jekyll
class APIGenerator < Generator

def generate(site)
puts "[GTN/API] Disabled"
def generate(_site)
puts '[GTN/API] Disabled'
end
end
end

12 changes: 6 additions & 6 deletions _plugins_dev/notebook.rb
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
def jupyter_pre_render(site)
def jupyter_pre_render(_site)
nil
end

def jupyter_post_write(site)
def jupyter_post_write(_site)
nil
end

module Jekyll
class RmarkdownGenerator < Generator
def generate(site)
puts "Notebooks disabled"
def generate(_site)
puts 'Notebooks disabled'
end
end

class JupyterNotebookGenerator < Generator
def generate(site)
puts "Notebooks disabled"
def generate(_site)
puts 'Notebooks disabled'
end
end
end
9 changes: 4 additions & 5 deletions _plugins_dev/sitemap-fake.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@ def generate(site)
result += '<!-- This sitemap has FAKE modification dates intentionally, that step is slow. -->'
result += '<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">'

site.pages.each {|t|
site.pages.each do |t|
result += "<url><loc>#{site.config['url'] + site.config['baseurl'] + t.url}</loc><lastmod>2016-06-30T18:00:00-07:00</lastmod></url>"
}
result += "</urlset>"
end
result += '</urlset>'

page2 = PageWithoutAFile.new(site, "", '.', "sitemap.xml")
page2 = PageWithoutAFile.new(site, '', '.', 'sitemap.xml')
page2.content = result
site.pages << page2
end
end
end

0 comments on commit 93d4bc7

Please sign in to comment.