Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strongly recommend supporting pinyinSidebar #55

Open
caojiantao opened this issue Mar 2, 2023 · 2 comments
Open

Strongly recommend supporting pinyinSidebar #55

caojiantao opened this issue Mar 2, 2023 · 2 comments
Labels
PR welcome PR from community appreciated

Comments

@caojiantao
Copy link
Contributor

I noticed that there is a pinyinNav used to be compatible with vuepress-pluin-permalink-pinyin, it seems that it forgot to be compatible with sidebar

/**
 * Translate chinese to pinyin.
 * Compatible with vuepress-pluin-permalink-pinyin.
 * @param {Array} navArr
 */
function transliteratePinyin(navArr) {
  return navArr.map(nav => {
    const result = { ...nav };
    if (nav.link) {
      result.link = slugify(nav.link, { ignore: ["/", "."] });
    }
    if (nav.items) {
      result.items = transliteratePinyin(nav.items);
    }
    return result;
  });
}
@caojiantao caojiantao changed the title Strongly recommend supporting pinyinsidebar Strongly recommend supporting pinyinSidebar Mar 2, 2023
@ozum ozum added the PR welcome PR from community appreciated label Mar 3, 2023
@ozum
Copy link
Owner

ozum commented Mar 3, 2023

I need help supporting pinyin. Would you like to add a PR?

@caojiantao
Copy link
Contributor Author

I need help supporting pinyin. Would you like to add a PR?

It is my pleasure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR welcome PR from community appreciated
Projects
None yet
Development

No branches or pull requests

2 participants