sunt-programator / CodeIT

👩‍💻 A clean, elegant but advanced blog theme for Hugo
https://codeit.suntprogramator.dev
MIT License
103 stars 32 forks source link

[BUG] Utterances comment not shown when use right side TOC #374

Open beihai0xff opened 2 years ago

beihai0xff commented 2 years ago

Describe the bug

Utterances comment not not showing when use right side TOC, and the HTML content is

<div id="comments"><div id="utterances"></div>
    <noscript>
        Please enable JavaScript to view the comments powered by <a href="https://utteranc.es/">Utterances</a>.
    </noscript>
</div>

But if I use Static TOC, the utterances comment return to normal, like the page wingsxdu.com/about

Expected behavior

I want to use the right side TOC and utterances comment can work well.

Screenshots

2022-01-08 18-07-20 的屏幕截图

Build Environment

Preview Environment

Additional Information

Configuration files

    [params.page.toc]
      # whether to enable the table of the contents
      enable = true
      # whether to keep the static table of the contents in front of the post
      keepStatic = false
      # whether to make the table of the contents in the sidebar automatically collapsed
      auto = true

    [params.page.comment]
      enable = true
      [params.page.comment.utterances]         # utteranc is a comment system based on GitHub issues. see https://utteranc.es
        enable = true
        repo = "beihai0xff/blog-comment"    # The repo to store comments
        issueTerm = "pathname"
        lightTheme = "github-light"
        darkTheme = "github-dark"