Skip to content

Commit 7573d22

Browse files
committed
[fix] Remote Building error of Git submodule
1 parent 38cbd6d commit 7573d22

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

.gitmodules

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
[submodule "wiki/policy"]
2-
path = wiki/policy
1+
[submodule "public/wiki/policy"]
2+
path = public/wiki/policy
33
url = https://github.com/fpsig/open-source-policy

pages/wiki/[...slug].tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ interface WikiPageParams extends ParsedUrlQuery {
1010
}
1111

1212
export const getStaticPaths: GetStaticPaths<WikiPageParams> = async () => {
13-
const tree = await Array.fromAsync(pageListOf('wiki', ''));
13+
const tree = await Array.fromAsync(pageListOf('wiki', 'public/'));
1414
const list = tree.map(root => [...traverseTree(root, 'subs')]).flat();
1515
const paths = list
1616
.map(({ path }) => path && { params: { slug: path.split('/') } })
@@ -29,7 +29,7 @@ export const getStaticProps: GetStaticProps<WikiPageProps, WikiPageParams> = asy
2929
// https://github.com/vercel/next.js/issues/12851
3030
if (slug[0] !== 'wiki') slug.unshift('wiki');
3131

32-
const { meta, markdown } = await splitFrontMatter(`${slug.join('/')}.md`);
32+
const { meta, markdown } = await splitFrontMatter(`public/${slug.join('/')}.md`);
3333

3434
const markup = marked(markdown) as string;
3535

pages/wiki/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { i18n } from '../../models/Translation';
77
import { ArticleMeta, pageListOf, traverseTree } from '../api/core';
88

99
export const getStaticProps = async () => {
10-
const tree = await Array.fromAsync(pageListOf('wiki', ''));
10+
const tree = await Array.fromAsync(pageListOf('wiki', 'public/'));
1111
const list = tree.map(root => [...traverseTree(root, 'subs')]).flat();
1212

1313
return { props: { tree, list } };

public/wiki/policy

Submodule policy added at d35fc30

0 commit comments

Comments
 (0)