Skip to content

Commit f5e76ae

Browse files
created site for internal
1 parent f78e8b1 commit f5e76ae

File tree

7 files changed

+1222
-203
lines changed

7 files changed

+1222
-203
lines changed

.gitignore

+15-7
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ bower_components
2929
# node-waf configuration
3030
.lock-wscript
3131

32-
# Compiled binary addons (https://nodejs.org/api/addons.html)
32+
# Compiled binary addons (http://nodejs.org/api/addons.html)
3333
build/Release
3434

3535
# Dependency directories
3636
node_modules/
3737
jspm_packages/
3838

39-
# TypeScript v1 declaration files
39+
# Typescript v1 declaration files
4040
typings/
4141

4242
# Optional npm cache directory
@@ -51,11 +51,19 @@ typings/
5151
# Output of 'npm pack'
5252
*.tgz
5353

54-
# Yarn Integrity file
55-
.yarn-integrity
56-
5754
# dotenv environment variables file
5855
.env
5956

60-
# next.js build output
61-
.next
57+
# gatsby files
58+
.cache/
59+
public
60+
61+
# Mac files
62+
.DS_Store
63+
64+
# Yarn
65+
yarn-error.log
66+
.pnp/
67+
.pnp.js
68+
# Yarn Integrity file
69+
.yarn-integrity

package.json

+3-5
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,13 @@
66
"author": "Novvum",
77
"license": "MIT",
88
"private": true,
9-
"scripts": {},
9+
"scripts": {
10+
"site": "yarn workspace site"
11+
},
1012
"workspaces": {
1113
"packages": [
1214
"packages/**",
1315
"oss/packages/**"
14-
],
15-
"nohoist": [
16-
"**/gatsby",
17-
"**/gatsby/**"
1816
]
1917
},
2018
"devDependencies": {

packages/site/gatsby-config.js

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
module.exports = {
2+
__experimentalThemes: [
3+
{
4+
resolve: "@howtographql/content",
5+
options: {
6+
mdxLayouts: {
7+
default: require.resolve("./src/components/postLayout.tsx")
8+
}
9+
}
10+
}
11+
]
12+
};

packages/site/package.json

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"name": "site",
3+
"version": "0.0.1",
4+
"main": "index.js",
5+
"license": "MIT",
6+
"private": true,
7+
"scripts": {
8+
"develop": "gatsby develop",
9+
"build": "gatsby build",
10+
"clean": "gatsby clean",
11+
"gatsby": "gatsby"
12+
},
13+
"dependencies": {
14+
"@howtographql/content": "*"
15+
},
16+
"devDependencies": {
17+
"gatsby": "^2.3.24",
18+
"react": "^16.8.6",
19+
"react-dom": "^16.8.6"
20+
}
21+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { RouterProps } from '@reach/router';
2+
import * as React from 'react';
3+
4+
const PostLayout: React.FunctionComponent<any> = ({ data, ...props }) => {
5+
if (!data) {
6+
return null;
7+
}
8+
9+
const { title, date } = data.mdx.frontmatter;
10+
const { location, children } = props;
11+
12+
return (
13+
<div>
14+
<h1>{title}</h1>
15+
<em>{date}</em>
16+
{children}
17+
</div>
18+
);
19+
};
20+
21+
export default PostLayout;

0 commit comments

Comments
 (0)