7

I´m starting with Vuepress (https://vuepress.vuejs.org), and i´d followed the docs to integrate it with an existing project (https://vuepress.vuejs.org/guide/getting-started.html#inside-an-existing-project). I used the sugested docs directory.

But now i need to "really" integrate with my project and i need to when my users access the my-project.com/docs, to reach the Vuepress docs

If i make (yarn docs:build), the /dist folder will be generated to be used anywhere as a statics HTML files. I tought in put the /dist/ content in the /static/ files of my project. But the vue-router response to /docs is a 404.

And i will still need to make 2 builds, my project and the docs.

The questions are:

  1. How can i make the vue-router "see" the vuepress build files? Where to put them?
  2. How can i integrate the run build of project to make them both?

I have 2 projects, one with quasar and the other i´m using vue-cli 3.

Thank you all.

Cavalcante
  • 101
  • 1
  • 4

2 Answers2

0

How can i make the vue-router "see" the vuepress build files? Where to put them?

You don't, it's basically an external link. A simple <a href="/docs"> should be sufficient.

How can i integrate the run build of project to make them both?

You don't, you add a new task that does them both.

// package.json
{
  "scripts": {
    "build-project": "node build-project.js"
  }
}

from a terminal

# yarn run build-project  
slf
  • 22,595
  • 11
  • 77
  • 101
  • 1
    I know that its would be an external link. But vue-router identify the URI /docs, that route doesn´t exist, so he sends me a 404 error code – Cavalcante Sep 05 '18 at 22:26
0

I think maybe the point problem is to solve the Vue-Router to make the vue-router don't handle the link when we external link the /docs as like.

Ayush Kumar
  • 833
  • 2
  • 13
  • 30
simon x
  • 1
  • 2
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Oct 29 '21 at 13:25