Skip to content

Commit 6a678bb

Browse files
committed
feat: add home page and update settings
1 parent c41aa14 commit 6a678bb

12 files changed

Lines changed: 529 additions & 4 deletions

docusaurus.config.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ const TwitterSvg =
1010
/** @type {import('@docusaurus/types').Config} */
1111
const config = {
1212
title: "CHKware",
13-
tagline: "Low-code API quality testing, and automation toolbox",
14-
url: "https://docs.chkware.com",
13+
tagline: "Low-code API quality testing, and automation toolbox.",
14+
url: "https://www.chkware.com",
1515
baseUrl: "/",
1616
onBrokenLinks: "throw",
1717
onBrokenMarkdownLinks: "warn",
@@ -27,9 +27,7 @@ const config = {
2727
/** @type {import('@docusaurus/preset-classic').Options} */
2828
({
2929
docs: {
30-
routeBasePath: "/",
3130
sidebarPath: require.resolve("./sidebars.js"),
32-
breadcrumbs: false,
3331
editUrl: "https://github.com/chkware/chkware.github.io/tree/main",
3432
},
3533
blog: false,
@@ -151,6 +149,13 @@ const config = {
151149
},
152150
],
153151
],
152+
customFields: {
153+
indexCta: "docs/quick-start",
154+
indexCtaTitle: "⏱️ 30 seconds to start",
155+
shortDetails: "Low-code API quality testing, and automation toolbox.",
156+
longDetails:
157+
"API testing tool, a script-able HTTP client, and an API test automation tool for the API era.",
158+
},
154159
};
155160

156161
module.exports = config;
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
import React from "react";
2+
import clsx from "clsx";
3+
import styles from "./styles.module.css";
4+
5+
const FeatureList = [
6+
{
7+
title: "Easy to Use",
8+
Svg: require("@site/static/img/undraw_docusaurus_mountain.svg").default,
9+
description: (
10+
<>
11+
Docusaurus was designed from the ground up to be easily installed and
12+
used to get your website up and running quickly.
13+
</>
14+
),
15+
},
16+
{
17+
title: "Focus on What Matters",
18+
Svg: require("@site/static/img/undraw_docusaurus_tree.svg").default,
19+
description: (
20+
<>
21+
Docusaurus lets you focus on your docs, and we&apos;ll do the chores. Go
22+
ahead and move your docs into the <code>docs</code> directory.
23+
</>
24+
),
25+
},
26+
{
27+
title: "Powered by React",
28+
Svg: require("@site/static/img/undraw_docusaurus_react.svg").default,
29+
description: (
30+
<>
31+
Extend or customize your website layout by reusing React. Docusaurus can
32+
be extended while reusing the same header and footer.
33+
</>
34+
),
35+
},
36+
];
37+
38+
function Feature({ Svg, title, description }) {
39+
return (
40+
<div className={clsx("col col--4")}>
41+
<div className="text--center">
42+
<Svg className={styles.featureSvg} role="img" />
43+
</div>
44+
<div className="text--center padding-horiz--md">
45+
<h3>{title}</h3>
46+
<p>{description}</p>
47+
</div>
48+
</div>
49+
);
50+
}
51+
52+
export default function HomepageFeatures() {
53+
return (
54+
<section className={styles.features}>
55+
<div className="container">
56+
<div className="row">
57+
{FeatureList.map((props, idx) => (
58+
<Feature key={idx} {...props} />
59+
))}
60+
</div>
61+
</div>
62+
</section>
63+
);
64+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.features {
2+
display: flex;
3+
align-items: center;
4+
padding: 2rem 0;
5+
width: 100%;
6+
}
7+
8+
.featureSvg {
9+
height: 200px;
10+
width: 200px;
11+
}

src/pages/index.js

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import React from "react";
2+
import clsx from "clsx";
3+
import Link from "@docusaurus/Link";
4+
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
5+
import Layout from "@theme/Layout";
6+
import HomepageFeatures from "@site/src/components/HomepageFeatures";
7+
8+
import styles from "./index.module.css";
9+
10+
function HomepageHeader() {
11+
const { siteConfig } = useDocusaurusContext();
12+
return (
13+
<header className={clsx("hero hero--primary", styles.heroBanner)}>
14+
<div className="container">
15+
<h1 className="hero__title">{siteConfig.title}</h1>
16+
<p className="hero__subtitle">{siteConfig.tagline}</p>
17+
<div className={styles.buttons}>
18+
<Link
19+
className="button button--secondary button--lg"
20+
to={siteConfig.customFields.indexCta}
21+
>
22+
{siteConfig.customFields.indexCtaTitle}
23+
</Link>
24+
</div>
25+
</div>
26+
</header>
27+
);
28+
}
29+
30+
export default function Home() {
31+
const { siteConfig } = useDocusaurusContext();
32+
return (
33+
<Layout title={`Welcome`} description={siteConfig.customFields.longDetails}>
34+
<HomepageHeader />
35+
<main>
36+
<HomepageFeatures />
37+
</main>
38+
</Layout>
39+
);
40+
}

src/pages/index.module.css

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/**
2+
* CSS files with the .module.css suffix will be treated as CSS modules
3+
* and scoped locally.
4+
*/
5+
6+
.heroBanner {
7+
padding: 4rem 0;
8+
text-align: center;
9+
position: relative;
10+
overflow: hidden;
11+
}
12+
13+
@media screen and (max-width: 996px) {
14+
.heroBanner {
15+
padding: 2rem;
16+
}
17+
}
18+
19+
.buttons {
20+
display: flex;
21+
align-items: center;
22+
justify-content: center;
23+
}
54.4 KB
Loading

static/img/docusaurus.png

5.02 KB
Loading

static/img/favicon.ico

3.54 KB
Binary file not shown.

static/img/logo.svg

Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)