-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathstatic.config.js
105 lines (103 loc) · 3.48 KB
/
static.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
import axios from 'axios'
import path from 'path'
import React from 'react'
export default {
plugins: [
'react-static-plugin-styled-components',
'react-static-plugin-typescript'
],
entry: path.join(__dirname, 'src', 'index.tsx'),
getSiteData: () => ({
title: 'MyBit'
}),
paths: {
public: 'public'
},
getRoutes: async ({ dev }) => [
// A simple route
{
path: 'ventures',
component: 'src/pages/ventures'
},
{
path: 'about',
component: 'src/pages/about'
},
{
path: 'tools',
component: 'src/pages/tools'
},
{
path: 'tracker',
component: 'src/pages/tracker',
getData: async () => {
const url = `https://y63yt6hph4.execute-api.us-east-1.amazonaws.com/prod/`
const response = await axios.get(url)
const chartData = response.data
const responseB = await axios.get(
`https://w06a9ojvmg.execute-api.us-east-1.amazonaws.com/prod?skip=0&take=10`
)
const tableData = responseB.data
return { chartData, tableData }
}
},
{
path: '404',
component: 'src/pages/404'
}
],
Document: class CustomHtml extends React.Component {
render() {
const { Html, Head, Body, children, renderMeta } = this.props
return (
<Html itemScope itemType="http://schema.org/Article">
<Head>
<title>MyBit</title>
<meta charSet="UTF-8" />
<link rel="icon" type="image/png" href="/favicon.png" />
{renderMeta.styleTags}
{renderMeta.helmet && renderMeta.helmet.title.toComponent()}
{renderMeta.helmet && renderMeta.helmet.meta.toComponent()}
<meta
name="viewport"
content="width=device-width, initial-scale=1"
/>
<meta httpEquiv="content-language" content="en" />
<meta itemProp="name" content="MyBit" />
<meta
itemProp="description"
content="MyBit designs products that open up the world, creating tools that enable freedom and wealth generation for everyone."
/>
<meta name="robots" content="index,follow" />
<meta name="theme-color" content="#1890ff" />
<meta
name="Description"
content="MyBit designs products that open up the world, creating tools that enable freedom and wealth generation for everyone."
/>
<meta itemProp="image" content="https://mybit.io/og-preview.png" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="@MyBit_DApp" />
<meta name="twitter:creator" content="@MyBit_DApp" />
<meta
name="twitter:image:src"
content="https://mybit.io/og-preview.png"
/>
<meta name="language" content="English" />
<meta property="og:url" content="https://mybit.io/" />
<meta property="og:title" content="MyBit" />
<meta
property="og:description"
content="MyBit designs products that open up the world, creating tools that enable freedom and wealth generation for everyone."
/>
<meta
property="og:image"
content="https://mybit.io/og-preview.jpg"
/>
<meta name="robots" content="index,follow" />
</Head>
<Body>{children}</Body>
</Html>
)
}
}
}