Skip to content
This repository was archived by the owner on Apr 7, 2025. It is now read-only.

Commit 893dfb1

Browse files
author
Nathan Verzemnieks
committed
fix(project pages): support specifying default branch
1 parent 48db52e commit 893dfb1

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/fragments/index.js

+1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ export const projectFields = graphql`
5252
screenshots
5353
}
5454
githubUrl
55+
defaultBranch
5556
iconUrl
5657
description
5758
ossCategory {

src/templates/project-page.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ const ProjectPage = props => {
319319
<p>
320320
Code contributions are welcome. Please review our{' '}
321321
<a
322-
href={`${project.githubUrl}/blob/master/CONTRIBUTING.md`}
322+
href={`${project.githubUrl}/blob/${project.defaultBranch||'master'}/CONTRIBUTING.md`}
323323
target="__blank"
324324
rel="noopener noreferrer"
325325
>

0 commit comments

Comments
 (0)