Search code examples
rubyoctopress

Ruby Jekyll - Octopress cannot Rake generate with URI


Looks like I am having serious issues with Jekyll. Nothing worked so far and I still have

jekyll 2.5.3 | Error: bad URI(is not URI?): https://gist.githubusercontent.com/

I have had included this along the way into my source:

Gist Method: The sample code below can used to pull out code from Gist from Github

 {% gist gist_id [filename] %}

I wanted to illustrate these as examples in my blog but ran into rake generate issues giving the aforementioned errors. I have had done my research and after having closed the other errors (not closing blockquotes, etc), this is something I cannot figure out on my own.


Solution

  • You're using a documentation string with placeholders.

    {% gist gist_id [filename] %}
    

    This string is parsed by Octopress Gist plugins and as the resulting url ( https://gist.githubusercontent.com/raw/id/[filename]) has a wrong pattern, an error is thrown.

    If you want to print this documentation in a post you can do.

    {% highlight liquid %}
    {% raw %}{% gist gist_id [filename] %}{% endraw %}
    {% endhighlight %}
    

    For more infos about Octopress' Gist tag, see : http://octopress.org/docs/plugins/gist-tag/