# Easy question about Liquid tag error on a page

**URL:** https://talk.jekyllrb.com/t/easy-question-about-liquid-tag-error-on-a-page/1572
**Category:** Help
**Created:** [March 9, 2018, 8:52pm UTC](https://talk.jekyllrb.com/t/easy-question-about-liquid-tag-error-on-a-page/1572 "2018-03-09T20:52:40Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![C-Jeremy](https://avatars.discourse-cdn.com/v4/letter/c/3ab097/32.png) [@C-Jeremy](https://talk.jekyllrb.com/u/C-Jeremy)
#### Post date: [March 9, 2018, 8:52pm UTC](https://talk.jekyllrb.com/t/easy-question-about-liquid-tag-error-on-a-page/1572/1 "2018-03-09T20:52:40Z")

</div>

Hi everyone!

I’ve been trying all day to solve an error I’m getting while locally serving my Jekyll site due to a new plugin. I want to use this [plugin](https://indefiniteloop.com/blog/code/jekyll-wordpress-display-content-metadata-total-word-count.html), which should post statistics on one’s site with respect to number of words and whatnot. However, I must be missing something completely obvious, because when I try to add it to any one of my pages (such as my about.md page), I keep getting the following error:

“Liquid syntax error: unknown tag ‘content\_statistics’”

I was hoping someone could point out where I’m obviously going wrong. I thought that one would need to simply insert the required tag, `{% content_statistics %}`, into either a Markdown page or on some other page, and it would output the result. However, I keep getting this error while trying to build locally. I have the .rb file in my \_plugins folder, and I thought that was all I had to do. Obviously, I’m missing something. If anyone has any idea, please let me know.

---

<div class="post-metadata">

### Author: ![mmistakes](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/mmistakes/32/2169_2.png) [@mmistakes](https://talk.jekyllrb.com/u/mmistakes)
#### Post date: [March 9, 2018, 9:56pm UTC](https://talk.jekyllrb.com/t/easy-question-about-liquid-tag-error-on-a-page/1572/2 "2018-03-09T21:56:14Z")

</div>

Sounds like you need to drop that tag into a template, not a Markdown page.

Try adding it to one of your `_layouts` and see if that works.

---

<div class="post-metadata">

### Author: ![C-Jeremy](https://avatars.discourse-cdn.com/v4/letter/c/3ab097/32.png) [@C-Jeremy](https://talk.jekyllrb.com/u/C-Jeremy)
#### Post date: [March 9, 2018, 10:15pm UTC](https://talk.jekyllrb.com/t/easy-question-about-liquid-tag-error-on-a-page/1572/3 "2018-03-09T22:15:49Z")

</div>

Just tried that by throwing it in my default layout, but I’m getting the same error. I imagine it _should_ work, so I don’t quite know what’s up here. Do you have any other suggestions?

---

<div class="post-metadata">

### Author: ![mmistakes](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/mmistakes/32/2169_2.png) [@mmistakes](https://talk.jekyllrb.com/u/mmistakes)
#### Post date: [March 9, 2018, 10:31pm UTC](https://talk.jekyllrb.com/t/easy-question-about-liquid-tag-error-on-a-page/1572/4 "2018-03-09T22:31:51Z")

</div>

Don’t think you’ve done anything wrong. It’s likely the plugin. Maybe reach out to the developer?

Their post is 3 years old. Entirely possible their plugin is broken and doesn’t work with current versions of Jekyll.

---

<div class="post-metadata">

### Author: ![C-Jeremy](https://avatars.discourse-cdn.com/v4/letter/c/3ab097/32.png) [@C-Jeremy](https://talk.jekyllrb.com/u/C-Jeremy)
#### Post date: [March 9, 2018, 11:33pm UTC](https://talk.jekyllrb.com/t/easy-question-about-liquid-tag-error-on-a-page/1572/5 "2018-03-09T23:33:33Z")

</div>

Alright, thanks. I’ll reach out to the developer, but the odd thing is that I’ve also tried [this](https://github.com/mattgemmell/Jekyll-Posts-Word-Count/blob/master/posts-word-count.rb) one, and the same error occurred. This makes it seem like perhaps I’m doing something wrong.

Hopefully the developer will have a suggestion.

---

<div class="post-metadata">

### Author: ![ashmaroli](https://avatars.discourse-cdn.com/v4/letter/a/df705f/32.png) [@ashmaroli](https://talk.jekyllrb.com/u/ashmaroli)
#### Post date: [March 10, 2018, 6:37am UTC](https://talk.jekyllrb.com/t/easy-question-about-liquid-tag-error-on-a-page/1572/6 "2018-03-10T06:37:48Z")

</div>

The plugin looks like a simple piece of code… and Jekyll’s Tag-loading API hasn’t changed that much at all… In theory, everything should work fine.

The only thing that could cause issues here is the `safe` flag…

Make sure **none of the following is true in your case.**

- You are not running `jekyll build --safe`
- There is no `safe: true` in your `_config.yml`
- You are not using the `github-pages` gem instead of `jekyll` in your Gemfile.

---

<div class="post-metadata">

### Author: ![C-Jeremy](https://avatars.discourse-cdn.com/v4/letter/c/3ab097/32.png) [@C-Jeremy](https://talk.jekyllrb.com/u/C-Jeremy)
#### Post date: [March 10, 2018, 3:27pm UTC](https://talk.jekyllrb.com/t/easy-question-about-liquid-tag-error-on-a-page/1572/7 "2018-03-10T15:27:20Z")

</div>

Thank you very much for your response, it solved my issue! Of course, the last item that you listed was something I did have in my Gemfile, but once I removed it everything worked again. Now I just have to figure out how to push my site to Github Pages after building it locally (which I know there’s documentation for).

Thanks again for the help!

---

<div class="post-metadata">

### Author: ![elboletaire](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/elboletaire/32/1424_2.png) [@elboletaire](https://talk.jekyllrb.com/u/elboletaire)
#### Post date: [December 23, 2018, 5:19pm UTC](https://talk.jekyllrb.com/t/easy-question-about-liquid-tag-error-on-a-page/1572/8 "2018-12-23T17:19:12Z")

</div>

I’m having the exact same problem than C-Jeremy, but in my case I’m sure I:

- am not running jekyll build --safe
- don’t have `safe: true` on my `_config.yml` file
- am not using the github-pages gem instead of jekyll

When I run `jekyll serve` it works as expected, but when running `jekyll build` it generates the files as if `--safe` was specified.

Any ideas?

**Edit:** I’ve my jekyll project [publicly uploaded to gitlab](https://gitlab.com/elboletaire/racotecnic) and the project [at gitlab pages](https://elboletaire.gitlab.io/racotecnic) (the problem is with the TextFilters liquid filter, which is not properly generating the /tags html file, which uses the `urlize` function from the TextFilters filter).
