# Inline comments?

**URL:** <https://discourse.gohugo.io/t/inline-comments/19410>\
**Category:** support\
**Created:** [June 29, 2019, 4:06am UTC](https://discourse.gohugo.io/t/inline-comments/19410 "2019-06-29T04:06:10Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![desertmonkey](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/desertmonkey/32/7636_2.png) [@desertmonkey](https://discourse.gohugo.io/u/desertmonkey)\
**Post date:** [June 29, 2019, 4:06am UTC](https://discourse.gohugo.io/t/inline-comments/19410/1 "2019-06-29T04:06:10Z")

</div>

Is there a way to do inline comments in Hugo? All the comment options listed in the [Hugo docs](https://gohugo.io/content-management/comments/) all seem to be widgets that are at the bottom of an article page. Thanks!

---

<div class="post-metadata">

**Author:** ![funkydan2](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/funkydan2/32/5636_2.png) [@funkydan2](https://discourse.gohugo.io/u/funkydan2)\
**Post date:** [June 29, 2019, 5:45am UTC](https://discourse.gohugo.io/t/inline-comments/19410/2 "2019-06-29T05:45:15Z")

</div>

What do you mean by inline comments? Are you referring for a way for reader’s to leave a comment against a particular paragraph in a page/post (like [this](https://www.webhostinghero.com/blog/implement-wordpress-inline-comments/))? Or a way for an author to put an ‘aside’ (or footnote) in the text of a page/post?

---

<div class="post-metadata">

**Author:** ![Grob](https://avatars.discourse-cdn.com/v4/letter/g/f14d63/32.png) [@Grob](https://discourse.gohugo.io/u/Grob)\
**Post date:** [June 29, 2019, 6:24am UTC](https://discourse.gohugo.io/t/inline-comments/19410/3 "2019-06-29T06:24:25Z")

</div>

I am not sure what you mean, either. But:

**Templates**

{{/\* My comment \*/}}

**Shortcode**

{{ if 0 }}{{ .Inner }}{{ end }}

and then in your .md files

{{\< comment \>}}My comment{{\< /comment \>}}

Hope it helps.

---

<div class="post-metadata">

**Author:** ![desertmonkey](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/desertmonkey/32/7636_2.png) [@desertmonkey](https://discourse.gohugo.io/u/desertmonkey)\
**Post date:** [June 29, 2019, 7:05am UTC](https://discourse.gohugo.io/t/inline-comments/19410/4 "2019-06-29T07:05:32Z")

</div>

Sorry I should’ve been more specific. I mean for a way for a reader to leave a comment at a particular place on a page, like Confluence or Medium for example.

---

<div class="post-metadata">

**Author:** ![funkydan2](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/funkydan2/32/5636_2.png) [@funkydan2](https://discourse.gohugo.io/u/funkydan2)\
**Post date:** [June 29, 2019, 8:25am UTC](https://discourse.gohugo.io/t/inline-comments/19410/5 "2019-06-29T08:25:39Z")

</div>

I haven’t seen anyone develop this…but you could have a look at some of the open source commenting options you linked to above, and with some javascript magic, you could build it.

However, IMHO, I reckon if you need interactive features like comments then maybe you’re really wanting a dynamic CMS.

---

<div class="post-metadata">

**Author:** ![maiki](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/maiki/32/16384_2.png) [@maiki](https://discourse.gohugo.io/u/maiki)\
**Post date:** [June 29, 2019, 7:51pm UTC](https://discourse.gohugo.io/t/inline-comments/19410/6 "2019-06-29T19:51:32Z")

</div>

> [@desertmonkey](#):
>
> Is there a way to do inline comments in Hugo?

Hugo generates static files. So if user commenting can be embedded in a static file, yes. Hugo can load the appropriate code, but no more.

Your search continues, elsewhere…

[![](https://opengameart.org/sites/default/files/landscape_3.png) ](https://opengameart.org/sites/default/files/landscape_3.png)  
Via [Landscape | OpenGameArt.org](https://opengameart.org/content/landscape)

---

<div class="post-metadata">

**Author:** ![desertmonkey](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/desertmonkey/32/7636_2.png) [@desertmonkey](https://discourse.gohugo.io/u/desertmonkey)\
**Post date:** [June 30, 2019, 8:26pm UTC](https://discourse.gohugo.io/t/inline-comments/19410/7 "2019-06-30T20:26:25Z")

</div>

We’re starting to use Hugo for our technical documentation. The inline comment idea was for our internal instance of the docs, so reviewers can leave feedback contextually. It’s not needed for our public-facing content.

---

<div class="post-metadata">

**Author:** ![Grob](https://avatars.discourse-cdn.com/v4/letter/g/f14d63/32.png) [@Grob](https://discourse.gohugo.io/u/Grob)\
**Post date:** [June 30, 2019, 8:39pm UTC](https://discourse.gohugo.io/t/inline-comments/19410/8 "2019-06-30T20:39:14Z")

</div>

In this case Go template comments for template files or a comment shortcode for content files (both mentioned above) might be handy: You can easily spot them, they appear in your git history but won’t pollute your site.

Also/better(?), you can open a pull request and point not only to a file [but to a line](https://github.com/gohugoio/hugo/blob/master/tpl/template.go#L100).

---

<div class="post-metadata">

**Author:** ![chengjingtao](https://avatars.discourse-cdn.com/v4/letter/c/da6949/32.png) [@chengjingtao](https://discourse.gohugo.io/u/chengjingtao)\
**Post date:** [November 13, 2019, 4:01pm UTC](https://discourse.gohugo.io/t/inline-comments/19410/9 "2019-11-13T16:01:14Z")

</div>

Hi, @desertmonkey Do you find any solutions ? I meet the same issue.

---

<div class="post-metadata">

**Author:** ![desertmonkey](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/desertmonkey/32/7636_2.png) [@desertmonkey](https://discourse.gohugo.io/u/desertmonkey)\
**Post date:** [November 13, 2019, 9:51pm UTC](https://discourse.gohugo.io/t/inline-comments/19410/10 "2019-11-13T21:51:14Z")

</div>

Not yet. I sidelined this project while I’m working on other, bigger issues.
