1

Been using Octopress for some days now. However recently met this error when using the following code block in my post:

<div class="container">
    {% block content %}
    {% endblock %}
</div>

The error returned is

Liquid Exception: Unknown tag 'block'

Looked around but cannot find a solution to this.

Why am I receiving a Liquid Exception?

2
  • 1
    If you are trying to syntax highlight a codeblock, the docs use the full word codeblock (as in {% codeblock %} instead of just {% block %})
    – stubaker
    Feb 13, 2014 at 0:12
  • 1
    There is no block tag in liquid. Feb 17, 2014 at 4:51

2 Answers 2

0

I know this is very old, but for reference, the liquid template language in Jekyll is still rather limited. I've run across references to liquid templates with extends and block, but Jekyll doesn't support these tags.

-1

There is no block plugin. That's the standard error you get when you are trying to use a plugin or YAML command that doesn't exist.

I think you may want one of the following:

{% blockquote %}
Four scores and sever years ago.
{% endblockquote %}

Or

{% codeblock %}
$ rake generate
$ rake deploy
{% endcodeblock %}

You should really REALLY read the documentation at Octopress. It lists everything it comes with, especially for the basics of blogging:

http://octopress.org/docs/blogging/plugins/

It has many many MANY options for just those two I posted above. For exammple, I often define the author of my blockquotes:

{% blockquote Abraham Lincoln http://www.abrahamlincolnonline.org/lincoln/speeches/gettysburg.htm The Gettysburg Address %}
Four score and seven years ago our fathers brought forth on this continent, 
{% endblockquote %}

And that would show up very pretty with a nice <cite> at the bottom, with The Gettysburg Address as a link to that webpage.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.