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

分目录撰写sidebar加载错误 #183

Closed
willin opened this issue Jun 4, 2017 · 4 comments
Closed

分目录撰写sidebar加载错误 #183

willin opened this issue Jun 4, 2017 · 4 comments
Labels

Comments

@willin
Copy link

willin commented Jun 4, 2017

wx20170604-225709 2x

每次点击左侧菜单的链接都会加载一次页面和两次sidebar

loadSidebar: 'SUMMARY.md'

从gitbook迁移过来的项目

@QingWei-Li
Copy link
Member

这是为了实现实现不同目录加载不同 sidebar 和 navbar 做的妥协,并不影响使用。其实你可以利用 alias 属性强制指定 resource/SUMMARY.md 从哪加载,例如

window.$docsify = {
    alias: {
      '/basic/resource/SUMMARY.md': '/SUMMARY.md',
      '/resource/SUMMARY.md': '/SUMMARY.md'
    }
}

@willin
Copy link
Author

willin commented Jun 8, 2017

可以使用通配符 * 吗

类似:

window.$docsify = {
    alias: {
      '**/*/SUMMARY.md': '/SUMMARY.md'
    }
}

@QingWei-Li
Copy link
Member

后面加上

@willin
Copy link
Author

willin commented Jun 22, 2017

目前用: https://leader.js.cool/#/basic/md/gitbook-to-docsify 可以解决该问题

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

No branches or pull requests

2 participants