mirror of
https://seed.radicle.dev/rad:z371PVmDHdjJucejRoRYJcDEvD5pp.git
synced 2026-10-18 19:10:34 +08:00
explore: Plugin to generate Radicle Explorer URLs
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
module Jekyll
|
||||
module Explorer
|
||||
def explore(input)
|
||||
base = "https://app.radicle.xyz/nodes"
|
||||
if input.include?(' ')
|
||||
prefix, suffix = input.split(' ', 2)
|
||||
"#{base}/#{prefix}/#{suffix}"
|
||||
else
|
||||
"#{base}/iris.radicle.xyz/#{input}"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Liquid::Template.register_filter(Jekyll::Explorer)
|
||||
Reference in New Issue
Block a user