mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-18 02:32:28 +02:00
* Always use PROJECT_NAME, even for user and org pages The symptom was that if we had a user or org page (e.g., https://JoelMarcey.github.io), we would try to copy files to a directory within a directory, getting errors like: ``` Error: Copying build assets failed with error 'Error: Cannot copy '/Users/joelm/dev/JoelMarcey.github.io/website/build' to a subdirectory of itself, '/Users/joelm/dev/JoelMarcey.github.io/website/build/JoelMarcey.github.io-master'.' ``` This is because we were setting the end of `fromPath` to empty if we were using an org or user page. But we don't need to do that. The `PROJECT_NAME` (set in `siteConfig.js` as `projectName`) is the user or org repo e.g., https://github.com/JoelMarcey/JoelMarcey.github.io/ has a `projectName` of `JoelMarcey.github.io` with an `organizationName` of `JoelMarcey`. So now the `fromPath` and `toPath` look like: `fromPath`: `build/JoelMarcey.github.io` `toPath`: `buuid/JoelMarcey.github.io-master` |
||
---|---|---|
.. | ||
__tests__ | ||
core | ||
server | ||
static | ||
build-files.js | ||
copy-examples.js | ||
generate-feed.js | ||
publish-gh-pages.js | ||
rename-version.js | ||
start-server.js | ||
version.js | ||
write-translations.js |