
:bookmark_tabs: Get a sample of a Github public repo file
Jekyll Github Sample is a powerful integration for Jekyll users who want to display code samples directly from GitHub repositories. This tool leverages Liquid tags to seamlessly pull in code snippets, ensuring that your blog posts or documentation are not only informative but also dynamically updated. Whether you are sharing tutorials or showcasing code snippets, this gem enhances the way you present your content, making it easier for readers to understand and access the source code.
By adding just a few lines to your Gemfile and Jekyll configuration, you can enhance your site considerably. Designed for simplicity and efficiency, it takes advantage of relative paths to GitHub files, allowing for a more stable implementation, particularly when files are updated or adjusted.
Easy Installation: Add the gem to your Gemfile and Jekyll _config.yml to get started with minimal setup.
Dynamic Code Reference: Use Liquid tags to dynamically display code samples directly from your GitHub repository in your Jekyll blog.
Selective Line Display: Optionally specify line numbers to include only parts of the file, giving you control over what code your readers see.
Custom Tags for Flexibility: Utilize start and end markers in your code files to specify exactly which sections of code to include, streamlining your content.
Reliable URL Handling: Use the commitish version of your file URL to ensure code samples don’t break with recompilation, maintaining consistency in your references.
Simple Highlighting: Effortlessly highlight code snippets in your posts, enhancing readability and engagement for your audience.
Community Supported: Thanks to contributors, this gem continues to evolve and improve, showcasing the power of community-driven development.
MIT License: The gem is open-source under the MIT license, making it accessible for anyone to use and contribute to the project.
