Saber 0.11.5 'saber-config.yml' performed different from 'saber-config.js' in <saber-link> path.
Opened this issue · 0 comments
Siricee commented
Bug report
Version
0.11.5
Steps to reproduce
<div class="nav-link" :key="index" v-for="(item, index) in $themeConfig.nav">
<saber-link :key="index" :to="item.path" v-text="item.text"></saber-link>
</div>
in saber-config.yml:
themeConfig:
nav:
- text: Posts
path: /posts # or '/posts'
dev
mode: http://localhost:3000/posts will be routed to 404 page.
if I change it to
themeConfig:
nav:
- text: Posts
path: /posts.html
dev
mode will work,
build
mode will cause 'saber-plugin-query-posts' build error in pagination 'posts/page/2'.
but in saber-config.js:
themeConfig: {
nav: [{
text: 'Posts',
path: '/posts'
}]
}
all works.
So I think something wrong has happend in yaml converting to js process.
What is expected?
saber-config.yml should perform same as saber-config.js
What is actually happening?
saber-config. js works well while saber-config.yml cause url error.
Other relevant information
- Result of running
saber -v
: cli.js/0.11.5 win32-x64 node-v10.15.0 - Browser version (optional): Chrome 79.0.3945.117
- Is Saber a global or local install? local
- Which package manager did you use for the install? node
- Does this issue occur when all plugins are disabled? yes