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

Saber 0.11.5 'saber-config.yml' performed different from 'saber-config.js' in <saber-link> path. #586

Open
Siricee opened this issue Jan 13, 2020 · 0 comments

Comments

@Siricee
Copy link

Siricee commented Jan 13, 2020

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant