Skip to content

Commit

Permalink
small change
Browse files Browse the repository at this point in the history
  • Loading branch information
khoi.tuan committed May 6, 2022
1 parent 06241e3 commit f65c0d3
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 48 deletions.
6 changes: 6 additions & 0 deletions blog/authors.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
khoituan:
name: Khoi Tuan
title: Software Engineer @ Entain
url: https://www.khoituan.com
image_url: https://github.com/tuannkhoi.png

endi:
name: Endilie Yacop Sucipto
title: Maintainer of Docusaurus
Expand Down
2 changes: 1 addition & 1 deletion docs/intro.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 1
sidebar_position: 2
---

# Tutorial Intro
Expand Down
34 changes: 17 additions & 17 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const darkCodeTheme = require("prism-react-renderer/themes/dracula");
/** @type {import('@docusaurus/types').Config} */
const config = {
title: "Khoi Tuan",
tagline: "This is Khoi Tuan",
tagline: "I'm a software engineer at Entain Australia.",
url: "https://tuannkhoi.github.io",
baseUrl: "/",
onBrokenLinks: "log",
Expand All @@ -24,15 +24,15 @@ const config = {
({
docs: {
sidebarPath: require.resolve("./sidebars.js"),
// Please change this to your repo.
editUrl:
"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/",
// Please change this to your repo - plus I don't really understand what this line is for
// editUrl:
// "https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/",
},
blog: {
showReadingTime: true,
// Please change this to your repo.
editUrl:
"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/",
// editUrl:
// "https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/",
},
theme: {
customCss: require.resolve("./src/css/custom.css"),
Expand All @@ -45,9 +45,9 @@ const config = {
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
navbar: {
title: "My Site",
title: "Khoi Tuan",
logo: {
alt: "My Site Logo",
alt: "Docusaurus's Logo",
src: "img/logo.svg",
},
items: [
Expand All @@ -59,7 +59,7 @@ const config = {
},
{ to: "/blog", label: "Blog", position: "left" },
{
href: "https://github.com/facebook/docusaurus",
href: "https://github.com/tuannkhoi",
label: "GitHub",
position: "right",
},
Expand All @@ -78,19 +78,19 @@ const config = {
],
},
{
title: "Community",
title: "Reach me at",
items: [
{
label: "Stack Overflow",
href: "https://stackoverflow.com/questions/tagged/docusaurus",
label: "Facebook",
href: "https://www.facebook.com/tuankhoiai/",
},
{
label: "Discord",
href: "https://discordapp.com/invite/docusaurus",
label: "Instagram",
href: "https://www.instagram.com/khoituan.ai/",
},
{
label: "Twitter",
href: "https://twitter.com/docusaurus",
href: "https://twitter.com/tuannkhoi",
},
],
},
Expand All @@ -103,12 +103,12 @@ const config = {
},
{
label: "GitHub",
href: "https://github.com/facebook/docusaurus",
href: "https://github.com/tuannkhoi",
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} My Project, Inc. Built with Docusaurus.`,
copyright: `Copyright © ${new Date().getFullYear()} Khoi Tuan`,
},
prism: {
theme: lightCodeTheme,
Expand Down
24 changes: 12 additions & 12 deletions src/components/HomepageFeatures/index.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import React from 'react';
import clsx from 'clsx';
import styles from './styles.module.css';
import React from "react";
import clsx from "clsx";
import styles from "./styles.module.css";

type FeatureItem = {
title: string;
Svg: React.ComponentType<React.ComponentProps<'svg'>>;
Svg: React.ComponentType<React.ComponentProps<"svg">>;
description: JSX.Element;
};

const FeatureList: FeatureItem[] = [
{
title: 'Easy to Use',
Svg: require('@site/static/img/undraw_docusaurus_mountain.svg').default,
title: "Easy to Use",
Svg: require("@site/static/img/undraw_docusaurus_mountain.svg").default,
description: (
<>
Docusaurus was designed from the ground up to be easily installed and
Expand All @@ -20,8 +20,8 @@ const FeatureList: FeatureItem[] = [
),
},
{
title: 'Focus on What Matters',
Svg: require('@site/static/img/undraw_docusaurus_tree.svg').default,
title: "Focus on What Matters",
Svg: require("@site/static/img/undraw_docusaurus_tree.svg").default,
description: (
<>
Docusaurus lets you focus on your docs, and we&apos;ll do the chores. Go
Expand All @@ -30,8 +30,8 @@ const FeatureList: FeatureItem[] = [
),
},
{
title: 'Powered by React',
Svg: require('@site/static/img/undraw_docusaurus_react.svg').default,
title: "Powered by React",
Svg: require("@site/static/img/undraw_docusaurus_react.svg").default,
description: (
<>
Extend or customize your website layout by reusing React. Docusaurus can
Expand All @@ -41,9 +41,9 @@ const FeatureList: FeatureItem[] = [
},
];

function Feature({title, Svg, description}: FeatureItem) {
function Feature({ title, Svg, description }: FeatureItem) {
return (
<div className={clsx('col col--4')}>
<div className={clsx("col col--4")}>
<div className="text--center">
<Svg className={styles.featureSvg} role="img" />
</div>
Expand Down
36 changes: 18 additions & 18 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
import React from 'react';
import clsx from 'clsx';
import Layout from '@theme/Layout';
import Link from '@docusaurus/Link';
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
import styles from './index.module.css';
import HomepageFeatures from '@site/src/components/HomepageFeatures';
import React from "react";
import clsx from "clsx";
import Layout from "@theme/Layout";
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
import styles from "./index.module.css";
import HomepageFeatures from "@site/src/components/HomepageFeatures";

function HomepageHeader() {
const {siteConfig} = useDocusaurusContext();
const { siteConfig } = useDocusaurusContext();
return (
<header className={clsx('hero hero--primary', styles.heroBanner)}>
<header className={clsx("hero hero--primary", styles.heroBanner)}>
<div className="container">
<h1 className="hero__title">{siteConfig.title}</h1>
<p className="hero__subtitle">{siteConfig.tagline}</p>
<div className={styles.buttons}>
<Link
className="button button--secondary button--lg"
to="/docs/intro">
Docusaurus Tutorial - 5min ⏱️
</Link>
</div>
<p className="hero__subtitle">
At the moment, I'm learning system design and writing blog about it.
</p>
<p className="hero__subtitle">
I'm always finding cool things to write about, shoot me an email if
you have any suggestion 😃
</p>
</div>
</header>
);
}

export default function Home(): JSX.Element {
const {siteConfig} = useDocusaurusContext();
const { siteConfig } = useDocusaurusContext();
return (
<Layout
title={`Hello from ${siteConfig.title}`}
description="Description will go into a meta tag in <head />">
description="Description will go into a meta tag in <head />"
>
<HomepageHeader />
<main>
<HomepageFeatures />
Expand Down

0 comments on commit f65c0d3

Please sign in to comment.