Code Monkey home page Code Monkey logo

Comments (2)

CaiJimmy avatar CaiJimmy commented on May 27, 2024

你好,

这个主题的菜单栏的高亮匹配机制是什么?难道匹配的不是 url 而是 name?

是的,匹配的是name,需要和页面标题一致才会被高亮。在未来的版本里应该会改进。

并且 /content/page/about.md 的 title在修改后,还会出现 404 page not found 的错误,无法正确访问 /about 页面。无法修改“关于”页面的 title,这也同样令我困惑。

/content/page/about.md 的 Front Matter 添加一个 slug 字段来自定义固定链接,否则会默认使用 title。(https://gohugo.io/content-management/urls/)

from hugo-theme-stack.

CaiJimmy avatar CaiJimmy commented on May 27, 2024

如果需要页面标题和菜单的 name 不同,可以在相应页面的 Markdown Front Matter 添加:

menu: 
    main:
        name: title
        pre: icon
        weight: -90

from hugo-theme-stack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.