Skip to content

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
shiro committed Mar 29, 2024
1 parent 99c3bcc commit 1d2dcb8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: build
run: yarn build
env:
BASE_PATH: /blog/
BASE_PATH: /blog

- name: upload artifact
uses: actions/[email protected]
Expand Down
11 changes: 9 additions & 2 deletions src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ export default function App() {
path: "/articles/:name",
component: (p) => {
// router bug: 'name' not in 'p', update when this is fixed
const name = p.location.pathname.replace("/articles/", "");
const name = p.location.pathname.replace(
`${config.base}/articles/`,
"",
);
console.log("article matched ", name);
const Article = lazy(getArticleComponent(name) as any);
return (
<Article
Expand All @@ -53,7 +57,10 @@ export default function App() {
);
},
matchFilters: {
name: (name: string) => !!getArticleComponent(name),
name: (name: string) => {
console.log("1 article matched ", name);
return !!getArticleComponent(name);
},
},
},
] as RouteDefinition[]
Expand Down

0 comments on commit 1d2dcb8

Please sign in to comment.