# Post.content exlude tags

**URL:** <https://talk.jekyllrb.com/t/post-content-exlude-tags/5353>\
**Category:** Help\
**Created:** [December 12, 2020, 5:37pm UTC](https://talk.jekyllrb.com/t/post-content-exlude-tags/5353 "2020-12-12T17:37:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![JosephDD](https://avatars.discourse-cdn.com/v4/letter/j/e9bcb4/32.png) [@JosephDD](https://talk.jekyllrb.com/u/JosephDD)\
**Post date:** [December 12, 2020, 5:37pm UTC](https://talk.jekyllrb.com/t/post-content-exlude-tags/5353/1 "2020-12-12T17:37:24Z")

</div>

Hi,  
Is there any way to exclude certain HTML tags which are included in {{ post.content }} ?  
I’d like to exclude code from being included because I’m counting words to make a time estimate and using post.content with inclusion of words in my code’s `<highlight>` tag causes incorrect estimates =)

---

<div class="post-metadata">

**Author:** ![brad](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/brad/32/2543_2.png) [@brad](https://talk.jekyllrb.com/u/brad)\
**Post date:** [December 12, 2020, 10:41pm UTC](https://talk.jekyllrb.com/t/post-content-exlude-tags/5353/2 "2020-12-12T22:41:04Z")

</div>

I think you are looking for this: [https://shopify.github.io/liquid/filters/strip\_html/](https://shopify.github.io/liquid/filters/strip_html/)

---

<div class="post-metadata">

**Author:** ![JosephDD](https://avatars.discourse-cdn.com/v4/letter/j/e9bcb4/32.png) [@JosephDD](https://talk.jekyllrb.com/u/JosephDD)\
**Post date:** [December 13, 2020, 3:45am UTC](https://talk.jekyllrb.com/t/post-content-exlude-tags/5353/3 "2020-12-13T03:45:54Z")

</div>

Thanks, that is useful but maybe I should’ve been less ambiguous. I would like to also remove the content between the `<highlight>` tags, ideally before using `strip_html`. Something like `{% post.content | remove_stuff_between_specified_tags | strip_html` would be what I’m looking for!  
Thanks again 🙂

---

<div class="post-metadata">

**Author:** ![MichaelCurrin](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/michaelcurrin/32/2340_2.png) [@MichaelCurrin](https://talk.jekyllrb.com/u/MichaelCurrin)\
**Post date:** [December 13, 2020, 7:58am UTC](https://talk.jekyllrb.com/t/post-content-exlude-tags/5353/4 "2020-12-13T07:58:57Z")

</div>

If you are not just GH Pages you can add a plugin and use it with regex pattern to remove content between highlight tags.

> <https://stackoverflow.com/questions/25802204/jekyll-filter-for-regex-substitution-in-content>

How inaccurate are your estimates? The output as code should count to reading time. Unless it is breaking it up weirdly into words to handle the highlighting

---

<div class="post-metadata">

**Author:** ![MichaelCurrin](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/michaelcurrin/32/2340_2.png) [@MichaelCurrin](https://talk.jekyllrb.com/u/MichaelCurrin)\
**Post date:** [December 13, 2020, 8:00am UTC](https://talk.jekyllrb.com/t/post-content-exlude-tags/5353/5 "2020-12-13T08:00:20Z")

</div>

Or use this plugin. Again not in GH Pages unless you use GH Actions

> **[joshdavenport/jekyll-regex-replace](https://github.com/joshdavenport/jekyll-regex-replace)**
>
> Simple module to allow using regular expression replacing via liquid filters
