Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2ebfb74

Browse files
authored
Update docs to clarify project site configuration
1 parentef1c90d commit2ebfb74

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

‎readme.md‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,18 @@ And then to publish everything from your `dist` folder to your `gh-pages` branch
355355
npm run deploy
356356
```
357357

358+
##GitHub Pages Project Sites
359+
360+
There are three types of GitHub Pages sites:[project, user, and organization](https://docs.github.com/en/pages/getting-started-with-github-pages/about-github-pages#types-of-github-pages-sites). Since project sites are not hosted on the root`<user|org>.github.io` domain and instead under a URL path based on the repository name, they often require configuration tweaks for various build tools and frameworks. If not configured properly, a browser will usually log`net::ERR_ABORTED 404` errors when looking for compiled assets.
361+
362+
Examples:
363+
- Create React App (which uses webpack under the hood)[requires the user to set a`"homepage"` property in their`package.json` so that built assets are referenced correctly in the final compiled HTML](https://create-react-app.dev/docs/deployment/#building-for-relative-paths).
364+
- This[has been often been thought of as an issue with`gh-pages`](https://github.com/tschaub/gh-pages/issues/285#issuecomment-805321474), though this package isn't able to control a project's build configuration.
365+
- Vite[requires a`"base"` property in its`vite.config.js`](https://vitejs.dev/guide/static-deploy.html#github-pages)
366+
- Next.js does not support deploying to GitHub Pages[because of an opinionated static export approach that puts all assets under a`_next` direcotry that GitHub Pages ignores](https://github.com/vercel/next.js/issues/9460).
367+
368+
When using a project site, be sure to read the documentation for your particular build tool or framework to learn how to configure correct asset paths.
369+
358370
##Debugging
359371

360372
To get additional output from the`gh-pages` script, set`NODE_DEBUG=gh-pages`. For example:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp