mirror of
https://github.com/moparisthebest/android.moparisthebest.org
synced 2024-11-16 06:05:00 -05:00
added figcaption with source link to embeded gist code snippets
This commit is contained in:
parent
280d63f18c
commit
54ffce5611
@ -72,7 +72,9 @@ module Jekyll
|
||||
request = Net::HTTP::Get.new raw_uri.request_uri
|
||||
data = https.request request
|
||||
lang = file.empty? ? '' : file.split('.')[-1]
|
||||
data = highlight(data.body, lang, { linenos: true, start: 1 })
|
||||
link = "https://gist.github.com/#{gist}"
|
||||
caption = file.empty? ? "Gist: #{gist}" : file
|
||||
data = highlight(data.body, lang, { linenos: true, start: 1, caption: caption, url: link, anchor: 'View Gist' })
|
||||
cache gist, file, data unless @cache_disabled
|
||||
|
||||
data
|
||||
|
Loading…
Reference in New Issue
Block a user