CaiJimmy / hugo-theme-stack

Card-style Hugo theme designed for bloggers
https://stack.jimmycai.com
GNU General Public License v3.0
4.83k stars 1.55k forks source link

Table of content displayed incorrectly #251

Closed zzzqiii closed 3 years ago

zzzqiii commented 3 years ago

Describe the bug

I have downloaded the latest releases of hugo-theme-stack-2.4.0 and copied comfig.yaml from examplesite to hugo site folder. After run the command hugo, I found that the table of content is not fixed and the style is different with the exampleSite. When the scroll bar slides down, it disappears. Also, there is no BACK button on the on the upper left corner.

Expected behavior

The table of content is fixed to the right when moving the scroll bar.

Screenshots

image image

Environment

If it's a UI issue, fill the following information:

Content of config.yaml

baseurl: https://zzzqiii.github.io
languageCode: en-us
theme: hugo-theme-stack-2.4.0
paginate: 5
title: Summer

# Change it to your Disqus shortname before using
disqusShortname: hugo-theme-stack

# GA Tracking ID
googleAnalytics:

# Theme i18n support
# Available values: en, fr, id, ja, ko, pt-br, zh-cn, es, de, nl
DefaultContentLanguage: zh-cn

permalinks:
    post: /p/:slug/
    page: /:slug/

params:
    mainSections:
        - post
    featuredImageField: image
    rssFullContent: true
    favicon: favicon/favicon.ico

    footer:
        since: 2020
        customText:

    dateFormat:
        published: Jan 02, 2006
        lastUpdated: Jan 02, 2006 15:04 MST

    sidebar:
        emoji: 🍥
        subtitle: No one is coming.
        avatar:
            local: true
            src: img/avatar.jpg

    article:
        math: true
        toc: true
        license:
            enabled: true
            default: Licensed under CC BY-NC-SA 4.0

    comments:
        enabled: true
        provider: utterances

        utterances:
            repo: zzzqiii/zzzqiii.github.io
            issueTerm: pathname
            label:

        remark42:
            host:
            site:
            locale:

        vssue:
            platform:
            owner:
            repo:
            clientId:
            clientSecret:

        # Waline client configuration see: https://waline.js.org/en/reference/client.html
        waline:
            serverURL:
            lang:
            visitor:
            avatar:
            emoji:
                - https://cdn.jsdelivr.net/gh/walinejs/emojis/weibo
            requiredMeta:
                - name
                - email
                - url
            placeholder:
            locale:
                admin: Admin

    widgets:
        enabled:
            - search
            - archives
            - tag-cloud

        archives:
            limit: 15

        tagCloud:
            limit: 20

    opengraph:
        twitter:
            # Your Twitter username
            site:

            # Available values: summary, summary_large_image
            card: summary_large_image

    defaultImage:
        opengraph:
            enabled: false
            local: false
            src:

    colorScheme:
        # Display toggle
        toggle: true

        # Available values: auto, light, dark
        default: auto

    imageProcessing:
        cover:
            enabled: true
        content:
            enabled: true

### Custom menu
### See https://docs.stack.jimmycai.com/configuration/custom-menu
### To remove about, archive and search page menu item, remove `menu` field from their FrontMatter
menu:
    main:
        - identifier: home
          name: Home
          url: /
          weight: -100
          pre: home

        - identifier: about
          name: About
          url: /about/
          weight: -90
          pre: user

        - identifier: archives
          name: Archives
          url: /archives/
          weight: -70
          pre: archives

        - identifier: search
          name: Search
          url: /search/
          weight: -60
          pre: search

related:
    includeNewer: true
    threshold: 60
    toLower: false
    indices:
        - name: tags
          weight: 100

        - name: categories
          weight: 200

markup:
    tableOfContents:
        endLevel: 4
        ordered: true
        startLevel: 2
    highlight:
        noClasses: false

Link to the demo site and/or source repository

https://zzzqiii.github.io/p/markdown-syntax-guide/

Do you have any suggestion on this issue? Thanks in advance!

zhixuan2333 commented 3 years ago

Please use the "Bug report" issue template, and provide more information like screen resolution.

zzzqiii commented 3 years ago

Please use the "Bug report" issue template, and provide more information like screen resolution.

Thanks for reminding. I have updated the issue.

zhixuan2333 commented 3 years ago

delete resources folder(hugo cache) maybe fix it.

Hugo Static Site Generator v0.80.0/extended windows/amd64 BuildDate: unknown Hugo extended?: No

Hugo extended: Yes

zzzqiii commented 3 years ago

delete resources folder(hugo cache) maybe fix it.

Hugo Static Site Generator v0.80.0/extended windows/amd64 BuildDate: unknown Hugo extended?: No

Hugo extended: Yes

Thanks for your hint! I removed the original assets folder and copy it from the theme folder, then it worked.