-
Notifications
You must be signed in to change notification settings - Fork 687
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8720 contributor links #9101
8720 contributor links #9101
Conversation
⚡ Deployed with Pantheon Decoupled This build was successfully deployed with Pantheon. You can track the build logs here. 👀 Preview: https://pr-9101-documentation.appa.pantheon.site |
⚡ Deployed with Pantheon Decoupled This build was successfully deployed with Pantheon. You can track the build logs here. 👀 Preview: https://pr-9101-documentation.appa.pantheon.site |
⚡ Deployed with Pantheon Decoupled This build was successfully deployed with Pantheon. You can track the build logs here. 👀 Preview: https://pr-9101-documentation.appa.pantheon.site |
Alternative feature: link to github contributions instead |
Hi from your friendly robot! 🤖 I've applied Prettier formatting to the following files in 278e6df:
The full diff is below. Please review the changes. Click to expanddiff --git a/src/templates/contributor.js b/src/templates/contributor.js
index da8b03598..8d9ea82ae 100644
--- a/src/templates/contributor.js
+++ b/src/templates/contributor.js
@@ -1,50 +1,50 @@
-import React from "react"
-import { graphql, Link } from "gatsby"
-import Layout from "../layout/layout"
-import SEO from "../layout/seo"
-import ContributorLink from "../components/ContributorLink"
+import React from 'react';
+import { graphql, Link } from 'gatsby';
+import Layout from '../layout/layout';
+import SEO from '../layout/seo';
+import ContributorLink from '../components/ContributorLink';
-import { Container, TwoItemLayout } from "@pantheon-systems/pds-toolkit-react"
+import { Container, TwoItemLayout } from '@pantheon-systems/pds-toolkit-react';
const links = [
{
- property: "url",
- icon: "user",
+ property: 'url',
+ icon: 'user',
},
{
- property: "github",
- icon: "github",
+ property: 'github',
+ icon: 'github',
},
{
- property: "drupal",
- icon: "drupal",
+ property: 'drupal',
+ icon: 'drupal',
},
{
- property: "wordpress",
- icon: "wordpress",
+ property: 'wordpress',
+ icon: 'wordpress',
},
{
- property: "twitter",
- icon: "twitter",
+ property: 'twitter',
+ icon: 'twitter',
},
{
- property: "linkedin",
- icon: "linkedin",
+ property: 'linkedin',
+ icon: 'linkedin',
},
-]
+];
// Set container width for search and main content.
-const containerWidth = "standard"
+const containerWidth = 'standard';
class ContributorTemplate extends React.Component {
render() {
- const contributor = this.props.data.contributorYaml
+ const contributor = this.props.data.contributorYaml;
const docs =
- this.props.data.allDocs != null ? this.props.data.allDocs.edges : []
- let printedGuides = []
- let printedOverview = []
+ this.props.data.allDocs != null ? this.props.data.allDocs.edges : [];
+ let printedGuides = [];
+ let printedOverview = [];
- console.log(contributor)
+ console.log(contributor);
return (
<Layout containerWidth={containerWidth} footerBorder>
@@ -70,11 +70,11 @@ class ContributorTemplate extends React.Component {
{links.map((link, i) => {
const url = contributor.hasOwnProperty(link.property)
? contributor[link.property]
- : null
+ : null;
if (url !== null) {
return (
<ContributorLink key={i} url={url} icon={link.icon} />
- )
+ );
}
})}
</div>
@@ -87,21 +87,18 @@ class ContributorTemplate extends React.Component {
<h2>Contributions</h2>
<ul className="docs-contributor__list">
{docs.map(({ node }) => {
-
var linkPath = '';
if (node.frontmatter.permalink) {
- linkPath = "/" + node.frontmatter.permalink;
- }else {
- linkPath = "/" + node.id;
+ linkPath = '/' + node.frontmatter.permalink;
+ } else {
+ linkPath = '/' + node.id;
}
return (
<li key={node.id}>
- <Link to={linkPath}>
- {node.frontmatter.title}
- </Link>
+ <Link to={linkPath}>{node.frontmatter.title}</Link>
</li>
- )
+ );
})}
</ul>
</div>
@@ -110,11 +107,11 @@ class ContributorTemplate extends React.Component {
</Container>
</main>
</Layout>
- )
+ );
}
}
-export default ContributorTemplate
+export default ContributorTemplate;
export const pageQuery = graphql`
query ContributorById($id: String!) {
@@ -160,4 +157,4 @@ export const pageQuery = graphql`
}
}
}
-`
+`; |
Hi from your friendly robot! 🤖 I've applied Prettier formatting to the following files in f597203:
The full diff is below. Please review the changes. Click to expanddiff --git a/src/templates/contributor.js b/src/templates/contributor.js
index 26f2c9123..d81187dda 100644
--- a/src/templates/contributor.js
+++ b/src/templates/contributor.js
@@ -38,7 +38,7 @@ const containerWidth = 'standard';
class ContributorTemplate extends React.Component {
render() {
- const contributor = this.props.data.contributorYaml
+ const contributor = this.props.data.contributorYaml;
// console.log(contributor)
@@ -80,13 +80,13 @@ class ContributorTemplate extends React.Component {
slot="second-item"
className="docs-contributor__contributions"
>
-
<h2>
- <a href={`https://github.com/pantheon-systems/documentation/commits?author=${contributor.yamlId}`}>
+ <a
+ href={`https://github.com/pantheon-systems/documentation/commits?author=${contributor.yamlId}`}
+ >
See contributions on GitHub
</a>
</h2>
-
</div>
</TwoItemLayout>
</div> |
⚡ Deployed with Pantheon Decoupled This build was successfully deployed with Pantheon. You can track the build logs here. 👀 Preview: https://pr-9101-documentation.appa.pantheon.site |
⚡ Deployed with Pantheon Decoupled This build was successfully deployed with Pantheon. You can track the build logs here. 👀 Preview: https://pr-9101-documentation.appa.pantheon.site |
⚡ Deployed with Pantheon Decoupled This build was successfully deployed with Pantheon. You can track the build logs here. 👀 Preview: https://pr-9101-documentation.appa.pantheon.site |
⚡ Deployed with Pantheon Decoupled This build was successfully deployed with Pantheon. You can track the build logs here. 👀 Preview: https://pr-9101-documentation.appa.pantheon.site |
working on #8720