We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I know Gem plug-ins are somewhat frowned upon for security and stability reasons. However, I hope this request will be met with broad acceptance.
I recently stumbled across a gem that will include your repo source code into your Github Pages Jekyll blog post. The advantage of this gem is:
The gem is pretty simple:
# Dynamically insert code block from URL # From: https://blog.bryanroessler.com/2020-03-18-insert-code-blocks-from-repository/ require 'open-uri' module Jekyll class InsertGitCode < Liquid::Tag def initialize(tag_name, url, tokens) super url = url.strip() @filename = File.basename(url) encoded_url = URI.encode(url) @file = URI.parse(encoded_url).read end def render(_context) @file end end end Liquid::Template.register_tag('insert_git_code', Jekyll::InsertGitCode)
Calling the gem is by a simple liquid tag:
{% highlight ruby %} {% insert_git_code https://git... %} {% endhighlight %}
The text was updated successfully, but these errors were encountered:
No branches or pull requests
New Gem Feature Request
I know Gem plug-ins are somewhat frowned upon for security and stability reasons. However, I hope this request will be met with broad acceptance.
I recently stumbled across a gem that will include your repo source code into your Github Pages Jekyll blog post. The advantage of this gem is:
The gem is pretty simple:
Calling the gem is by a simple liquid tag:
Thank you for considering this request!
The text was updated successfully, but these errors were encountered: