Closed cmeessen closed 1 year ago
I'm having an issue testing this PR.
Running without the custom_config.js
works as expected. The console prints the following:
No custom configuration found. Using standard configuration.
info Initializing VuePress and preparing data...
vite v2.9.4 dev server running at:
> Local: http://localhost:3030/documentation/
and the documentation works as expected on that URL.
However, when I copy the config.js
to custom_config.js
, followed by a yarn dev
, it seems that neither are picked up properly anymore? The console also shows the following:
info Initializing VuePress and preparing data...
vite v2.9.4 dev server running at:
> Local: http://localhost:8080/
The "No custom configuration found. Using standard configuration." line has disappeared as expected, but the port and URL have changed. When going there, it does not properly show the documentation anymore, just parts?
Maybe I'm doing something wrong? Or using an outdated version?
My bad, sorry! I wrote to copy paste the config.js
custom_config.js
. But this is not enough, as in the custom_config.js
it will try to load itself again. This is why it's not working. You need to remove these lines:
try {
conf = require('./custom_config')
} catch (ex) {
console.log("No custom configuration found. Using standard configuration.")
}
I will update the description in a second, and also update the README for the documentation.
Closing because this feature is not required from our side anymore.
This PR implements the option for a custom configuration file.
It will allow to customise anything related to the vuepress configuraiton of the documentation. This way, a fork of this documentation can be hosted without having to diverge from this repository.
How to test:
yarn install && yarn dev
-> http://localhost:3030/documentation/ is the standard documentationconfig.js
and name itcustom_config.js
and change something in this file, e.g. order in the sidebar.custom_config.js
so it doesn't try to load itself:yarn dev
-> http://localhost:3030/documentation/ will now be configured according tocustom_config.js
I am not sure whether the
try
approach is the best, but it works. I am open for suggestions though .