Comments (10)
Could you provide a sample repo please?
from vuepress-bar.
plugins: [
['autobar', {setHomepage : 'hide',navPrefix : "blog"}]
from vuepress-bar.
const getConfig = require("vuepress-bar");
const barConfig = getConfig('./')
module.exports = {
head: [
['meta', { name: 'theme-color', content: '#007af5' }],
['meta', { name: 'apple-mobile-web-app-capable', content: 'yes' }],
['meta', { name: 'apple-mobile-web-app-status-bar-style', content: 'black' }],
['script', {}, `
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?2803648cc5852dd3e9e46bbd0bf63366";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
`]
],
title: 'sealyun | kubernetes安装',
themeConfig: {
logo: 'https://sealyun.com/img/logo.png',
sidebar: barConfig.sidebar,
nav: [
{ text: '离线包下载', link: 'http://store.lameleg.com', target:'_self', rel:'' },
{ text: '常见问题', link: '/faq/', target:'_self', rel:'' },
{ text: '版本变更', link: '/changelog/', target:'_self', rel:'' },
{ text: '开源项目', link: '/github/', target:'_self' },
{ text: '联系方式', link: '/contact/', target:'_self' },
{
text: '友情连接',
items: [
{ text: '', items: [{link: 'https://fuckcloudnative.io/#sealyun', text: "云原生实验室"}] },
{ text: '', items: [{link: 'https://kuboard.cn/#sealyun', text: "kuboard"}] },
{ text: '', items: [{link: 'https://www.qikqiak.com/?utm_source=sealyun.com', text: "阳明的博客"}] },
{ text: '', items: [{link: 'https://zhangguanzhang.github.io/#sealyun', text: "张馆长的博客"}] },
]
},
]
},
}
from vuepress-bar.
const barConfig = getConfig("./",["/blog/","/docs/"])
I think add a pages list will better
from vuepress-bar.
You should add all your content to a subfolder for vuepress-bar
working correctly.
For example:
Add all your content to docs
(including .vuepress
) folder as below:
Then in config.js
const getConfig = require("vuepress-bar");
const barConfig = getConfig(`${__dirname}/..`);
module.exports = {
// ... your config
themeConfig: {
sidebar: barConfig.sidebar,
nav: [] // your nav details
}
}
from vuepress-bar.
So dir like this?
website
|--.vuepress
|--docs
|--.vuepress
|--README.md
Two .vuepress dir?
from vuepress-bar.
No, just single .vuepress
.
Only in /docs/.vuepress
:
website
|--docs
|--.vuepress
|--README.md
from vuepress-bar.
But I have other pages... this is my website: sealyun.com, and I don't expect other pages have sidebar
from vuepress-bar.
Maybe you can create two vuepress sites and add manual links between them in nav:
website
|--docs1
|--.vuepress
|--README.md
|--docs2
|--.vuepress
|--README.md
from vuepress-bar.
I think that is not very nice, vuepress bar add a config to filter out which pages need it will better. Like this :
const barConfig = getConfig("./",["/blog/","/docs/"])
It is my suggestion
from vuepress-bar.
Related Issues (20)
- Enhancements Dialog HOT 4
- (link.children[0] || "").split is not a function HOT 12
- Bug: rename `__dirName` to `__dirname` HOT 1
- Errors on console HOT 3
- sidebar display error HOT 4
- pinyinNav:true,only change nav but sidebar HOT 4
- [New Feature] support new parameter "dt" in directory names. HOT 1
- node_modules gets included HOT 1
- Hi! Why do the sidebars show home when adding a second and third navigation bar HOT 3
- Sidebar is not defined HOT 3
- 关于基础路径 HOT 3
- Sidebar does not work properly with index.js HOT 9
- Order doesn't seem to be working at the root level with files and directories mix HOT 4
- mixDirectoriesAndFilesAlphabetically (and numerically?) does not seem to work HOT 4
- if there is another md file (besides README.md) at top level, replacements fail HOT 2
- if there is a second - (hyphen) in the file name, it is not converted to a space
- Multiple hierarchical directories HOT 1
- How to use in vuepress 1.x ?
- Filter is not useable
- Strongly recommend supporting pinyinSidebar HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vuepress-bar.