Skip to content

Commit 9966e85

Browse files
authored
feat: added landing page (#143)
* feat: update magidoc to set siteroot auto * feat: added a index.html
1 parent 4b52dd4 commit 9966e85

File tree

2 files changed

+91
-4
lines changed

2 files changed

+91
-4
lines changed

build_docs.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,12 @@ const CURRENT_DIRECTORY = process.cwd()
1818
const GITHUB_REPO = 'swiftwave-org/swiftwave'
1919
const GRAPHQL_DOCUMENTATION_BRANCH = 'docs/graphql'
2020
const CURRENT_BRANCH = execSync(`git branch | grep \\* | cut -d ' ' -f2`, { cwd: CURRENT_DIRECTORY, stdio: 'pipe' }).toString().trim()
21-
const CNAME = 'graphql.swiftwave.org'
2221

23-
// Build docs for GraphQL
22+
// Index page for documentation
23+
const INDEX_PAGE = ``
24+
2425

26+
// Build docs for GraphQL
2527
async function buildGraphQlDocs() {
2628
const WORKING_DIRECTORY = path.join(CURRENT_DIRECTORY, ".build_docs_tmp")
2729

@@ -117,10 +119,12 @@ async function buildGraphQlDocs() {
117119
// Move CURRENT_DIRECTORY/graphql-docs to WORKING_DIRECTORY/graphql-docs/
118120
execSync(`mv ${CURRENT_DIRECTORY_GRAPHQL_DOCUMENTATION_FOLDER}/* ${GRAPHQL_DOCUMENTATION_CURRENT_BRANCH_FOLDER}`, { stdio: 'inherit' })
119121

122+
// Copy `graphql.docs.html` to `GRAPHQL_DOCUMENTATION_FOLDER/index.html`
123+
execSync(`cp ./graphql.docs.html ${GRAPHQL_DOCUMENTATION_FOLDER}/index.html`, { stdio: 'inherit' })
124+
120125
// Publish the GraphQL documentation
121126
await ghpages.publish(GRAPHQL_DOCUMENTATION_FOLDER, {
122-
branch: GRAPHQL_DOCUMENTATION_BRANCH,
123-
cname: CNAME,
127+
branch: GRAPHQL_DOCUMENTATION_BRANCH
124128
})
125129

126130
console.log('Published GraphQL documentation')

graphql.docs.html

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
<html>
2+
<head>
3+
<title>Brett's Link Tree</title>
4+
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
7+
<meta content="Links to my various profiles online" name="description" />
8+
9+
<link rel="preconnect" href="https://fonts.gstatic.com">
10+
<link href="https://fonts.googleapis.com/css2?family=Josefin+Sans&display=swap" rel="stylesheet">
11+
12+
<style>
13+
body {
14+
text-align: center;
15+
margin-top: 48px;
16+
font-family: "Josefin Sans", "Arial", sans-serif;
17+
background: white;
18+
}
19+
20+
h1, p {
21+
color: #364652;
22+
}
23+
24+
p {
25+
font-size: 22px;
26+
}
27+
28+
.profile-photo {
29+
width: 120px;
30+
}
31+
32+
.link-tree {
33+
list-style: none;
34+
padding: 0;
35+
font-size: 20px;
36+
}
37+
38+
.link-tree > li {
39+
margin: 12px 0;
40+
}
41+
42+
.link-tree >li a {
43+
color: #364652;
44+
background: #C7DBE6;
45+
border-radius: 6px;
46+
padding: 12px;
47+
text-decoration: none;
48+
max-width: 360px;
49+
width: 90%;
50+
display: block;
51+
margin: 0 auto;
52+
}
53+
54+
.link-tree > li a {
55+
background: #B9D2DF;
56+
}
57+
58+
.link-tree > li a:hover,
59+
.link-tree > li a:focus {
60+
color: white;
61+
background: #2D4F62;
62+
}
63+
</style>
64+
</head>
65+
66+
<body>
67+
<img class="profile-photo" src="https://github.com/swiftwave-org.png" alt="Apple Memoji representation of Brett smiling" />
68+
69+
<h1>SwiftWave</h1>
70+
71+
<p>Self Hosted & Lightweight PaaS</p>
72+
73+
<ul class="link-tree">
74+
<li>
75+
<a href="https://graphql.docs.swiftwave.org/develop">
76+
Latest Docs
77+
</a>
78+
</li>
79+
</ul>
80+
81+
<p>Build with ❤️</p>
82+
</body>
83+
</html>

0 commit comments

Comments
 (0)