@@ -181,6 +181,7 @@ export default function PageContent(props) {
181181
182182 const githubUrl = props . githubUrl . replace ( "tree/" , "blob/" )
183183 . replace ( "/content/" , "/docs/content/" )
184+ const sourceUrl = / .+ ?(? = t r e e ) / . exec ( props . githubUrl )
184185
185186 const editLink = githubUrl && (
186187 < AsideLink href = { githubUrl } >
@@ -210,6 +211,9 @@ export default function PageContent(props) {
210211 />
211212 ) }
212213 { editLink }
214+ < AsideLink href = { sourceUrl } >
215+ < IconGithub /> Source code
216+ </ AsideLink >
213217 </ Aside >
214218 </ Wrapper >
215219 ) ;
@@ -218,11 +222,11 @@ export default function PageContent(props) {
218222PageContent . propTypes = {
219223 children : PropTypes . node . isRequired ,
220224 pathname : PropTypes . string . isRequired ,
221- githubUrl : PropTypes . string ,
225+ githubUrl : PropTypes . string . isRequired ,
222226 pages : PropTypes . array . isRequired ,
223227 hash : PropTypes . string . isRequired ,
224228 title : PropTypes . string . isRequired ,
225- graphManagerUrl : PropTypes . string . isRequired ,
229+ graphManagerUrl : PropTypes . string ,
226230 headings : PropTypes . array . isRequired ,
227231 spectrumUrl : PropTypes . string
228232} ;
0 commit comments