ozum / vuepress-bar

VuePress sidebar and navbar generator based on file and directory structure. Focus your documents, not sidebar or navbar.
90 stars 40 forks source link

[New Feature] support new parameter "dt" in directory names. #28

Closed huanggm closed 3 years ago

huanggm commented 3 years ago

The parameter "dt" means "disable titleize".

Sometimes the nav's name maybe API or FQA. And I don't want to be Api or Fqa. 🥺

ozum commented 3 years ago

You can override like below:

//.vuepress/config.js
const getConfig = require("vuepress-bar");

const { nav, sidebar } = getConfig();

// Find item with text "Api" and change it to "API".
nav.find(item => item.text === "Api").text = "API";

module.exports = {
  themeConfig: {
    nav,
    sidebar,
  }
};