Unable to include a sample of a github repo file using jekyll_github_sample

I found a plugin on planet Jekyll called jekyll_github_sample, and it does not work with the following error/liquid tag exception in github actions:

# Build log
Liquid Exception: 404 Not Found in /github/workspace/collections/_posts/2021-10-02-comparing-languages.markdown
# Info to use --trace
/usr/local/lib/ruby/2.7.0/open-uri.rb:387:in `open_http': 404 Not Found (OpenURI::HTTPError)
# The entire ruby exception

On local, it is:

# Build log
Liquid Exception: Invalid argument @ rb_sysopen - https://raw.githubusercontent.com/TwoPizza9621536/snippets/de58a106e186d7efe32b2cea868b87a226a96aa9/C/Printchara.c in the site's root directory.
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/jekyll_github_sample-0.3.2/lib/jekyll_github_sample/code_tag.rb:19:in `initialize': Invalid argument @ rb_sysopen - https://raw.githubusercontent.com/TwoPizza9621536/snippets/de58a106e186d7efe32b2cea868b87a226a96aa9/C/Printchara.c (Errno::EINVAL)

So I try to use another but similar plugin called jekyll_github_content, but it is giving me the 404 error that is shown in github actions. If anyone who uses these plugins can help me, thanks.

Can you supply a link to your repo and a branch?

Or a sample of your Gemfile and the markdown file on question so we can run the code ourselves? And see if you are passing arguments to the plugins correctly


Also make sure you follow the docs exactly with maybe an example they give and take out the failing code or file from your repo. So you start from a working state of general use of the plugin and then use it with your custom values.

e.g.

{% github_sample_ref /bwillis/versioncake/989237901cb873f96df12be48cbf1239be496bd7/Appraisals %}
{% highlight ruby %}
{% github_sample /bwillis/versioncake/989237901cb873f96df12be48cbf1239be496bd7/Appraisals 0 5 %}
{% endhighlight %}


Your link is correct in the browser.

https://raw.githubusercontent.com/TwoPizza9621536/snippets/de58a106e186d7efe32b2cea868b87a226a96aa9/C/Printchara.c

Here is the repo: TwoPizza9621536/twopizza9621536.github.io: My github.io page. and this commit d9cade5 as the branch. Edit: Here is a quick link TwoPizza9621536/twopizza9621536.github.io at d9cade547a2b5bce69a4e470c698a095af15824f

The file in question is /collections/_posts/2021-10-02-comparing-languages.markdown.

I am going to try the example.

The example works, and trying a Readme.md in the root works, I guess it does not work with subdirectories?