Skip to content

Commit 23ab6db

Browse files
committed
Support injecting to docs site the github url
1 parent 432bfad commit 23ab6db

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

uilib-docs/gatsby-config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ module.exports = {
66
title: `RNUILib`,
77
description: `React Native UI Toolset and Components Library`,
88
author: `[email protected]`,
9-
domain: 'react-native-ui-lib'
9+
domain: 'react-native-ui-lib',
10+
github: 'https://github.com/wix/react-native-ui-lib'
1011
},
1112
plugins: [
1213
`gatsby-plugin-react-helmet`,

uilib-docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "uilib-docs",
33
"description": "uilib docs template",
4-
"version": "1.0.7",
4+
"version": "1.0.8",
55
"author": "Ethan Sharabi <[email protected]>",
66
"main": "index.js",
77
"dependencies": {

uilib-docs/src/components/header.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,16 @@ import Link from 'gatsby-link';
44
import './header.scss';
55
import logo from '../images/newDesign/headerLogo.svg';
66

7-
const Header = () => {
7+
const Header = ({githubDomain}) => {
88
return (
99
<div className="header">
1010
<Link to="/">
11-
<img className="logo" src={logo} alt="logo"/>
12-
11+
<img className="logo" src={logo} alt="logo" />
1312
</Link>
1413

15-
1614
<div className="links">
1715
<Link to="/getting-started/setup">Docs</Link>
18-
<a target="_blank" href="https://github.com/wix/react-native-ui-lib">
16+
<a target="_blank" href={githubDomain}>
1917
GitHub
2018
</a>
2119
</div>

uilib-docs/src/components/layout.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ const Layout = ({children, location}) => {
1717
title
1818
description
1919
domain
20+
github
2021
}
2122
}
2223
}
@@ -45,7 +46,7 @@ const Layout = ({children, location}) => {
4546
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.22.0/prism.min.js" integrity="sha512-9+422Bs3A87UkWfp+qV80Nfv9arhbCXKY1rxrF2seorI36mIIstMiuBfyKLF1yH1nnzQkEWq2xrzT4XU3Z+vrA==" crossorigin="anonymous"></script>
4647
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.22.0/themes/prism-tomorrow.min.css" integrity="sha512-vswe+cgvic/XBoF1OcM/TeJ2FW0OofqAVdCZiEYkd6dwGXthvkSFWOoGGJgS2CW70VK5dQM5Oh+7ne47s74VTg==" crossorigin="anonymous" />
4748
</Helmet>
48-
<Header />
49+
<Header githubDomain={siteMetadata.github} />
4950
{/* <div className={`main ${!showSidebar ? 'fill' : ''}`}> */}
5051
<div className={`main`}>
5152
{showSidebar && <Navbar />}

0 commit comments

Comments
 (0)