Add SearchBox component to the Home page

45 Views Asked by At

I am new the Vuepress and there's very little resources online. I found a similar question but hasn't been answer yet.

I am using the Vuepress boiltertemplate and basically I just want to add the SearchBox component to the home '/'.

According to the docs, I can use the <SearchBox /> component globally. I couldn't find a resource anywhere so I don't know where exactly to put it.

The current directory structure is:

├── src

│ ├── .vuepress

│ │ ├── components

│ │ │ ├── Foo

│ │ │ │ ├── Bar

│ │ │ ├── demo-component.vue

│ │ │ ├── OtherComponent.vue

│ │ ├── styles

│ │ │ ├── index.styl

│ │ │ ├── palette.styl

│ │ ├── config.js

│ │ ├── enhanceApp.js

│ ├── confi

│ │ ├── README.md

│ ├── guide

│ │ ├── README.md

│ │ ├── using-vue

│ ├── index.md

├── public

│ ├── css

│ │ ├── **/*.css

│ ├── images

│ ├── js

│ ├── index.html

├── node_modules

├── package.json

├── package-lock.json

└── .gitignore

I tried creating a SearchBox.vue component and added to the config.js using globalLayout but I get errors like these:

Error from chokidar (C:\): Error: EBUSY: resource busy or locked, lstat 'C:\hiberfil.sys' Error from chokidar (C:\): Error: EBUSY: resource busy or locked, lstat 'C:\swapfile.sys'

0

There are 0 best solutions below