-
Notifications
You must be signed in to change notification settings - Fork 0
/
static.config.js
69 lines (66 loc) · 1.75 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
import path from "path";
import axios from "axios";
import { createGenerateClassName } from "@material-ui/core/styles";
const generateClassName = createGenerateClassName();
export default {
getSiteData: () => ({
siteTitle: "React Static",
routes: [
{
itemName: "Before Purchase",
urlPart: "before",
items: [
{ itemName: "How to check", urlPart: "how_to_check" },
{ itemName: "How to read title", urlPart: "how_to_read_title" },
],
},
{
itemName: "After Purchase",
urlPart: "after",
items: [{ itemName: "ddd", urlPart: "ddd" }],
},
{
itemName: "Where to Dispose",
urlPart: "dispose",
items: [{ itemName: "How to check", urlPart: "how_to_check" }],
},
{
itemName: "Fabric Types",
urlPart: "types",
items: [
{ itemName: "How to read title", urlPart: "how_to_read_title" },
],
},
],
}),
getRoutes: async () => {
return [
{
path: "/404",
template: "./src/pages/404.js",
},
];
},
plugins: [
[
"react-static-plugin-md-pages",
{
location: "./contents", // path to markdown files' directory
pathPrefix: "", // prefix for added react-static routes (if any)
template: "./src/components/markdownTemplate.js", // path to React template component
remarkPlugins: [], // add additional remark plugins here
},
],
[
"react-static-plugin-jss",
{
providerProps: {
generateClassName,
},
},
],
require.resolve("react-static-plugin-reach-router"),
require.resolve("react-static-plugin-sitemap"),
["react-static-plugin-typescript"],
],
};