bwillis / jekyll-github-sample

:bookmark_tabs: Get a sample of a Github public repo file
59 stars 18 forks source link

Possible to pass repo as a variable instead of as a string? #11

Open heavyimage opened 6 years ago

heavyimage commented 6 years ago

I'm in a bit of a pickle; I really want to do something like this:

{% assign readmepath=page.github_repo | append: "/master/README.md" %}
{% capture readme_in_markdown %}{% github_sample readmepath %}{% endcapture %}
{{ readme_in_markdown | markdownify }}

But...github_sample thinks that readmepath is the path I'm talking about. Is there anyway to upgrade this gem so that it handles a variable name or a url string?

People have asked about this stuff before in places like this

I'm trying to store github repos in my frontmatter and then, if extant and valid, fetch the README.md files.

Thanks!