Skip to content

Commit 9a86295

Browse files
committed
Merge branch 'source' into add-resource
2 parents c801039 + ca62f58 commit 9a86295

File tree

431 files changed

+16450
-7040
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

431 files changed

+16450
-7040
lines changed

.gitignore

Lines changed: 68 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,70 @@
1-
*.swp
2-
*~
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
8+
old
9+
# Runtime data
10+
pids
11+
*.pid
12+
*.seed
13+
*.pid.lock
14+
15+
# Directory for instrumented libs generated by jscoverage/JSCover
16+
lib-cov
17+
18+
# Coverage directory used by tools like istanbul
19+
coverage
20+
21+
# nyc test coverage
22+
.nyc_output
23+
24+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
25+
.grunt
26+
27+
# Bower dependency directory (https://bower.io/)
28+
bower_components
29+
30+
# node-waf configuration
31+
.lock-wscript
32+
33+
# Compiled binary addons (http://nodejs.org/api/addons.html)
34+
build/Release
35+
36+
# Dependency directories
37+
node_modules/
38+
jspm_packages/
39+
40+
# Typescript v1 declaration files
41+
typings/
42+
43+
# Optional npm cache directory
44+
.npm
45+
46+
# Optional eslint cache
47+
.eslintcache
48+
49+
# Optional REPL history
50+
.node_repl_history
51+
52+
# Output of 'npm pack'
53+
*.tgz
54+
55+
# dotenv environment variable files
56+
.env*
57+
58+
# gatsby files
59+
.cache/
60+
public
61+
62+
# Mac files
363
.DS_Store
4-
.nvmrc
5-
node_modules
6-
npm-debug.log
764

8-
/build/
9-
.tmp.*
65+
# Yarn
66+
yarn-error.log
67+
.pnp/
68+
.pnp.js
69+
# Yarn Integrity file
70+
.yarn-integrity

.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.cache
2+
package.json
3+
package-lock.json
4+
public

.prettierrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"arrowParens": "avoid",
3+
"semi": false
4+
}

.travis.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.

README.md

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,35 @@
1+
# Source Repository for graphql.org
2+
This repository contains the source code of https://graphql.org website.
3+
14
# Contributing
25

36
Organization gh-pages deploy the `master` branch, so active development occurs
47
on this `source` branch.
58

6-
The site is written in JS and Markdown files in `site/`.
7-
8-
The site chrome are all in JS files in `site/_core/`.
9-
109
### Making changes
1110

1211
The first time, get all the dependencies loaded via
1312

14-
```
15-
npm install
16-
```
13+
`$ npm install` or `$ yarn install`
1714

1815
Then, run the server via
1916

20-
```
21-
npm start
22-
Open http://localhost:8444/
23-
```
17+
`$ npm start` or `$ yarn start`
18+
19+
Open [http://localhost:8000](http://localhost:8000) to view it in the browser.
20+
Anytime you make some changes, refresh the page to see the updates.
21+
22+
### Folder structure
23+
24+
- `static` folder contains the files that will be copied directly to `public` folder which will contain the output files to be served by a static HTTP server.
2425

25-
Anytime you change the contents, just refresh the page and it's going to be updated.
26+
- `src` folder contains markdown and TypeScript/JavaScript files used to generate the website;
27+
- - `assets` folder contains `less` files and those files contain stylesheets
28+
- - `components` and `Containers` folders contains React components that are used in layouts and pages
29+
- - `content` folder contains markdown files for the content of pages
30+
- - `templates` contains the layout templates
31+
- - `utils` contains helper functions
2632

2733
### Publish the Website
2834

29-
Once pushed to the `source` branch, Travis CI will publish http://graphql.org
35+
Once pushed to the `source` branch, CI will publish http://graphql.org

gatsby-config.js

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
module.exports = {
2+
siteMetadata: {
3+
title: "A query language for your API",
4+
description:
5+
"GraphQL provides a complete description of the data in your API, gives clients the power to ask for exactly what they need and nothing more, makes it easier to evolve APIs over time, and enables powerful developer tools.",
6+
siteUrl: "http://graphql.org/",
7+
},
8+
9+
plugins: [
10+
"gatsby-plugin-react-helmet",
11+
'gatsby-plugin-anchor-links',
12+
{
13+
resolve: "gatsby-source-filesystem",
14+
options: {
15+
name: "content",
16+
path: `${__dirname}/src/content`,
17+
},
18+
},
19+
`gatsby-transformer-remark`,
20+
{
21+
resolve: `gatsby-plugin-webfonts`,
22+
options: {
23+
fonts: {
24+
google: [
25+
{
26+
family: `Rubik`,
27+
variants: [`300`],
28+
},
29+
{
30+
family: `Roboto Mono`,
31+
variants: [`400`, `400i`, `600`],
32+
},
33+
{
34+
family: `Roboto`,
35+
variants: [`300`],
36+
},
37+
],
38+
},
39+
},
40+
},
41+
`gatsby-plugin-less`,
42+
`gatsby-plugin-react-helmet`,
43+
{
44+
resolve: `gatsby-plugin-google-analytics`,
45+
options: {
46+
trackingId: "UA-44373548-16",
47+
},
48+
},
49+
{
50+
resolve: "gatsby-plugin-feed",
51+
options: {
52+
query: `
53+
{
54+
site {
55+
siteMetadata {
56+
siteUrl
57+
}
58+
}
59+
}
60+
`,
61+
feeds: [
62+
{
63+
serialize: ({ query: { site, allMarkdownRemark } }) =>
64+
allMarkdownRemark.edges.map(
65+
({
66+
node: {
67+
excerpt,
68+
frontmatter: { title, date, permalink, byline },
69+
},
70+
}) => ({
71+
title,
72+
date,
73+
url: site.siteMetadata.siteUrl + permalink,
74+
description: excerpt,
75+
author: byline,
76+
})
77+
),
78+
query: `
79+
{
80+
allMarkdownRemark(
81+
filter: {frontmatter: {layout: {eq: "blog"}}},
82+
sort: { order: DESC, fields: [frontmatter___date] }
83+
) {
84+
edges {
85+
node {
86+
excerpt
87+
frontmatter {
88+
title
89+
date
90+
permalink
91+
byline
92+
}
93+
}
94+
}
95+
}
96+
}
97+
`,
98+
output: "/blog/rss.xml",
99+
title: "Blog | GraphQL",
100+
feed_url: "http://graphql.org/blog/rss.xml",
101+
site_url: "http://graphql.org",
102+
},
103+
],
104+
},
105+
},
106+
],
107+
}

0 commit comments

Comments
 (0)