Files
radicle.xyz/_plugins/explorer.rb
T
Lorenz Leutgeb 6309f516c6 explorer: Allow passing seed and base as arguments
Also take a default value from configuration.

Fix all usages and change some hardcoded links to use the filter.
2026-04-20 21:00:04 +02:00

19 lines
385 B
Ruby

module Jekyll
module Explorer
def explore(
input,
node = @context.registers[:site].config['node'],
explorer = @context.registers[:site].config['explorer']
)
base = "https://#{explorer}"
if input.nil?
base
else
"#{base}/nodes/#{node}/#{input}"
end
end
end
end
Liquid::Template.register_filter(Jekyll::Explorer)