Skip to content

Commit

Permalink
feat: added landing page (#143)
Browse files Browse the repository at this point in the history
* feat: update magidoc to set siteroot auto

* feat: added a index.html
  • Loading branch information
tanmoysrt authored Dec 9, 2023
1 parent 4b52dd4 commit 9966e85
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 4 deletions.
12 changes: 8 additions & 4 deletions build_docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ const CURRENT_DIRECTORY = process.cwd()
const GITHUB_REPO = 'swiftwave-org/swiftwave'
const GRAPHQL_DOCUMENTATION_BRANCH = 'docs/graphql'
const CURRENT_BRANCH = execSync(`git branch | grep \\* | cut -d ' ' -f2`, { cwd: CURRENT_DIRECTORY, stdio: 'pipe' }).toString().trim()
const CNAME = 'graphql.swiftwave.org'

// Build docs for GraphQL
// Index page for documentation
const INDEX_PAGE = ``


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

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

// Copy `graphql.docs.html` to `GRAPHQL_DOCUMENTATION_FOLDER/index.html`
execSync(`cp ./graphql.docs.html ${GRAPHQL_DOCUMENTATION_FOLDER}/index.html`, { stdio: 'inherit' })

// Publish the GraphQL documentation
await ghpages.publish(GRAPHQL_DOCUMENTATION_FOLDER, {
branch: GRAPHQL_DOCUMENTATION_BRANCH,
cname: CNAME,
branch: GRAPHQL_DOCUMENTATION_BRANCH
})

console.log('Published GraphQL documentation')
Expand Down
83 changes: 83 additions & 0 deletions graphql.docs.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
<html>
<head>
<title>Brett's Link Tree</title>

<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
<meta content="Links to my various profiles online" name="description" />

<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Josefin+Sans&display=swap" rel="stylesheet">

<style>
body {
text-align: center;
margin-top: 48px;
font-family: "Josefin Sans", "Arial", sans-serif;
background: white;
}

h1, p {
color: #364652;
}

p {
font-size: 22px;
}

.profile-photo {
width: 120px;
}

.link-tree {
list-style: none;
padding: 0;
font-size: 20px;
}

.link-tree > li {
margin: 12px 0;
}

.link-tree >li a {
color: #364652;
background: #C7DBE6;
border-radius: 6px;
padding: 12px;
text-decoration: none;
max-width: 360px;
width: 90%;
display: block;
margin: 0 auto;
}

.link-tree > li a {
background: #B9D2DF;
}

.link-tree > li a:hover,
.link-tree > li a:focus {
color: white;
background: #2D4F62;
}
</style>
</head>

<body>
<img class="profile-photo" src="https://github.com/swiftwave-org.png" alt="Apple Memoji representation of Brett smiling" />

<h1>SwiftWave</h1>

<p>Self Hosted & Lightweight PaaS</p>

<ul class="link-tree">
<li>
<a href="https://graphql.docs.swiftwave.org/develop">
Latest Docs
</a>
</li>
</ul>

<p>Build with ❤️</p>
</body>
</html>

0 comments on commit 9966e85

Please sign in to comment.