@@ -181,6 +181,7 @@ export default function PageContent(props) {
181
181
182
182
const githubUrl = props . githubUrl . replace ( "tree/" , "blob/" )
183
183
. replace ( "/content/" , "/docs/content/" )
184
+ const sourceUrl = / .+ ?(? = t r e e ) / . exec ( props . githubUrl )
184
185
185
186
const editLink = githubUrl && (
186
187
< AsideLink href = { githubUrl } >
@@ -210,6 +211,9 @@ export default function PageContent(props) {
210
211
/>
211
212
) }
212
213
{ editLink }
214
+ < AsideLink href = { sourceUrl } >
215
+ < IconGithub /> Source code
216
+ </ AsideLink >
213
217
</ Aside >
214
218
</ Wrapper >
215
219
) ;
@@ -218,11 +222,11 @@ export default function PageContent(props) {
218
222
PageContent . propTypes = {
219
223
children : PropTypes . node . isRequired ,
220
224
pathname : PropTypes . string . isRequired ,
221
- githubUrl : PropTypes . string ,
225
+ githubUrl : PropTypes . string . isRequired ,
222
226
pages : PropTypes . array . isRequired ,
223
227
hash : PropTypes . string . isRequired ,
224
228
title : PropTypes . string . isRequired ,
225
- graphManagerUrl : PropTypes . string . isRequired ,
229
+ graphManagerUrl : PropTypes . string ,
226
230
headings : PropTypes . array . isRequired ,
227
231
spectrumUrl : PropTypes . string
228
232
} ;
0 commit comments