Fix google scholar citations (#2893)
Signed-off-by: George Araújo <george.gcac@gmail.com>
This commit is contained in:
parent
b968de85e0
commit
5bc4703a76
@ -15,6 +15,14 @@ module Jekyll
|
||||
splitted = params.split(" ").map(&:strip)
|
||||
@scholar_id = splitted[0]
|
||||
@article_id = splitted[1]
|
||||
|
||||
if @scholar_id.nil? || @scholar_id.empty?
|
||||
puts "Invalid scholar_id provided"
|
||||
end
|
||||
|
||||
if @article_id.nil? || @article_id.empty?
|
||||
puts "Invalid article_id provided"
|
||||
end
|
||||
end
|
||||
|
||||
def render(context)
|
||||
@ -65,10 +73,9 @@ module Jekyll
|
||||
citation_count = "N/A"
|
||||
|
||||
# Print the error message including the exception class and message
|
||||
puts "Error fetching citation count for #{article_id}: #{e.class} - #{e.message}"
|
||||
puts "Error fetching citation count for #{article_id} in #{article_url}: #{e.class} - #{e.message}"
|
||||
end
|
||||
|
||||
|
||||
GoogleScholarCitationsTag::Citations[article_id] = citation_count
|
||||
return "#{citation_count}"
|
||||
end
|
||||
|
||||
Loading…
Reference in New Issue
Block a user