Skip to content

Commit

Permalink
Merge pull request #52 from SySagar/docs
Browse files Browse the repository at this point in the history
feat[docs]: fuma docs mdx static site
  • Loading branch information
SySagar authored Sep 17, 2024
2 parents 5b4655f + a36fe48 commit b42bfb5
Show file tree
Hide file tree
Showing 46 changed files with 12,253 additions and 14,984 deletions.
8 changes: 0 additions & 8 deletions apps/docs/.eslintrc.js

This file was deleted.

88 changes: 24 additions & 64 deletions apps/docs/.gitignore
Original file line number Diff line number Diff line change
@@ -1,68 +1,28 @@
# Logs
logs
*.log
# deps
/node_modules

# generated content
.contentlayer
.content-collections
.source

# test & build
/coverage
/.next/
/out/
/build
*.tsbuildinfo

# misc
.DS_Store
*.pem
/.pnp
.pnp.js
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Typescript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# dotenv environment variable files
.env*

# Mac files
.DS_Store

# Next.js build output
.next

# Yarn
yarn-error.log
.pnp/
.pnp.js
# Yarn Integrity file
.yarn-integrity
# others
.env*.local
.vercel
next-env.d.ts
4 changes: 0 additions & 4 deletions apps/docs/.prettierignore

This file was deleted.

1 change: 0 additions & 1 deletion apps/docs/.prettierrc.json

This file was deleted.

14 changes: 0 additions & 14 deletions apps/docs/LICENSE

This file was deleted.

111 changes: 19 additions & 92 deletions apps/docs/README.md
Original file line number Diff line number Diff line change
@@ -1,99 +1,26 @@
<!-- AUTO-GENERATED-CONTENT:START (STARTER) -->
<p align="center">
<a href="https://www.gatsbyjs.com">
<img alt="Gatsby" src="https://www.gatsbyjs.com/Gatsby-Monogram.svg" width="60" />
</a>
</p>
<h1 align="center">
Gatsby's hello-world starter
</h1>
# docs

Kick off your project with this hello-world boilerplate. This starter ships with the main Gatsby configuration files you might need to get up and running blazing fast with the blazing fast app generator for React.
This is a Next.js application generated with
[Create Fumadocs](https://github.com/fuma-nama/fumadocs).

_Have another more specific idea? You may want to check out our vibrant collection of [official and community-created starters](https://www.gatsbyjs.com/docs/gatsby-starters/)._
Run development server:

## 🚀 Quick start
```bash
npm run dev
# or
pnpm dev
# or
yarn dev
```

1. **Create a Gatsby site.**
Open http://localhost:3000 with your browser to see the result.

Use the Gatsby CLI ([install instructions](https://www.gatsbyjs.com/docs/tutorial/getting-started/part-0/#gatsby-cli)) to create a new site, specifying the hello-world starter.
## Learn More

```shell
# create a new Gatsby site using the hello-world starter
gatsby new my-hello-world-starter https://github.com/gatsbyjs/gatsby-starter-hello-world
```
To learn more about Next.js and Fumadocs, take a look at the following
resources:

1. **Start developing.**

Navigate into your new site’s directory and start it up.

```shell
cd my-hello-world-starter/
gatsby develop
```

1. **Open the source code and start editing!**

Your site is now running at `http://localhost:8000`!

Note: You'll also see a second link: `http://localhost:8000/___graphql`. This is a tool you can use to experiment with querying your data. Learn more about using this tool in the [Gatsby Tutorial](https://www.gatsbyjs.com/docs/tutorial/getting-started/part-4/#use-graphiql-to-explore-the-data-layer-and-write-graphql-queries).
Open the `my-hello-world-starter` directory in your code editor of choice and edit `src/pages/index.js`. Save your changes and the browser will update in real time!
## 🚀 Quick start (Netlify)
Deploy this starter with one click on [Netlify](https://app.netlify.com/signup):
[<img src="https://www.netlify.com/img/deploy/button.svg" alt="Deploy to Netlify" />](https://app.netlify.com/start/deploy?repository=https://github.com/gatsbyjs/gatsby-starter-hello-world)
## 🧐 What's inside?

A quick look at the top-level files and directories you'll see in a typical Gatsby project.
.
├── node_modules
├── src
├── .gitignore
├── gatsby-browser.js
├── gatsby-config.js
├── gatsby-node.js
├── gatsby-ssr.js
├── LICENSE
├── package.json
└── README.md
1. **`/node_modules`**: This directory contains all of the modules of code that your project depends on (npm packages) are automatically installed.
1. **`/src`**: This directory will contain all of the code related to what you will see on the front-end of your site (what you see in the browser) such as your site header or a page template. `src` is a convention for “source code”.
1. **`.gitignore`**: This file tells git which files it should not track / not maintain a version history for.
1. **`gatsby-browser.js`**: This file is where Gatsby expects to find any usage of the [Gatsby browser APIs](https://www.gatsbyjs.com/docs/reference/config-files/gatsby-browser/) (if any). These allow customization/extension of default Gatsby settings affecting the browser.
1. **`gatsby-config.js`**: This is the main configuration file for a Gatsby site. This is where you can specify information about your site (metadata) like the site title and description, which Gatsby plugins you’d like to include, etc. (Check out the [config docs](https://www.gatsbyjs.com/docs/reference/config-files/gatsby-config/) for more detail).
1. **`gatsby-node.js`**: This file is where Gatsby expects to find any usage of the [Gatsby Node APIs](https://www.gatsbyjs.com/docs/reference/config-files/gatsby-node/) (if any). These allow customization/extension of default Gatsby settings affecting pieces of the site build process.
1. **`gatsby-ssr.js`**: This file is where Gatsby expects to find any usage of the [Gatsby server-side rendering APIs](https://www.gatsbyjs.com/docs/reference/config-files/gatsby-ssr/) (if any). These allow customization of default Gatsby settings affecting server-side rendering.
1. **`LICENSE`**: This Gatsby starter is licensed under the 0BSD license. This means that you can see this file as a placeholder and replace it with your own license.
1. **`package.json`**: A manifest file for Node.js projects, which includes things like metadata (the project’s name, author, etc). This manifest is how npm knows which packages to install for your project.
1. **`README.md`**: A text file containing useful reference information about your project.
## 🎓 Learning Gatsby
Looking for more guidance? Full documentation for Gatsby lives [on the website](https://www.gatsbyjs.com/). Here are some places to start:
- **For most developers, we recommend starting with our [in-depth tutorial for creating a site with Gatsby](https://www.gatsbyjs.com/docs/tutorial/getting-started/).** It starts with zero assumptions about your level of ability and walks through every step of the process.
- **To dive straight into code samples, head [to our documentation](https://www.gatsbyjs.com/docs/).** In particular, check out the _Guides_, _API Reference_, and _Advanced Tutorials_ sections in the sidebar.
## 💫 Deploy
[Build, Deploy, and Host On Netlify](https://netlify.com)
The fastest way to combine your favorite tools and APIs to build the fastest sites, stores, and apps for the web. And also the best place to build, deploy, and host your Gatsby sites.
<!-- AUTO-GENERATED-CONTENT:END -->
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js
features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
- [Fumadocs](https://fumadocs.vercel.app) - learn about Fumadocs
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,20 @@ const Access = () => {
}}
>
<a
className="access"
href="https://www.npmjs.com/package/@groovy-box/ui"
target="_blank"
rel="noopener noreferrer"
className='access'
href='https://www.npmjs.com/package/@groovy-box/ui'
target='_blank'
rel='noopener noreferrer'
>
<FaNpm size={100} />
<FaNpm size={80} />
</a>
<a
className="access"
href="https://github.com/SySagar/Groovy-Box"
target="_blank"
rel="noopener noreferrer"
className='access'
href='https://github.com/SySagar/Groovy-Box'
target='_blank'
rel='noopener noreferrer'
>
<FaGithub size={50} />
<FaGithub size={40} />
</a>
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
import React from 'react';
import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter';
import { atomDark } from 'react-syntax-highlighter/dist/esm/styles/prism';
import Wrapper from '../layout/Wrapper';
import Wrapper from './Wrapper';

const InstallPage = () => {
const codeString = `npm i @groovy-box/ui`;

return (
<Wrapper>
<SyntaxHighlighter language="javascript" style={atomDark}>
<SyntaxHighlighter language='javascript' style={atomDark}>
{codeString}
</SyntaxHighlighter>
</Wrapper>
Expand Down
58 changes: 58 additions & 0 deletions apps/docs/app/(home)/components/Wrapper.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import React from 'react';
import { Copy, Check } from 'lucide-react';
import { useEffect, useState } from 'react';

const Wrapper = ({ children }) => {
const textToCopy = 'npm install gitemo-cli -g';

const [copySuccess, setCopySuccess] = React.useState('');

const copyToClipboard = () => {
navigator.clipboard.writeText(textToCopy).then(
() => {
setCopySuccess('Copied!');
},
(err) => {
setCopySuccess('Failed to copy!');
console.error('Failed to copy text: ', err);
},
);
};

useEffect(() => {
const timeout = setTimeout(() => {
setCopySuccess('');
}, 4000);
return () => clearTimeout(timeout);
}, [copySuccess]);

return (
<div
style={{
position: 'relative',
display: 'flex',
justifyContent: 'start',
alignItems: 'center',
gap: '5px',
}}
>
{React.cloneElement(children)}
<button
onClick={copyToClipboard}
className='flex justify-center items-center '
style={{
height: '55px',
width: '50px',
borderRadius: '5px 5px 5px 5px',
color: '#fff',
background: '#1D1F21',
}}
title='Copy'
>
{copySuccess !== '' ? <Check size={20} /> : <Copy size={20} />}
</button>
</div>
);
};

export default Wrapper;
11 changes: 11 additions & 0 deletions apps/docs/app/(home)/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import type { ReactNode } from 'react';
import { HomeLayout } from 'fumadocs-ui/home-layout';
import { baseOptions } from '../layout.config';

export default function Layout({
children,
}: {
children: ReactNode;
}): React.ReactElement {
return <HomeLayout {...baseOptions}>{children}</HomeLayout>;
}
15 changes: 7 additions & 8 deletions apps/docs/app/page.tsx → apps/docs/app/(home)/page.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import InstallPage from '@components/InstallPage';
import Access from '@components/Access';
import Link from 'next/link';
import InstallPage from './components/InstallPage';
import Access from './components/Access';

export default function Home() {
export default function HomePage() {
return (
<main>
<main className='flex h-[calc(100vh-56px)] flex-col justify-center text-center'>
<div
style={{
display: 'flex',
minHeight: '90vh',
background: '#fff',
}}
>
<div
Expand All @@ -29,12 +28,12 @@ export default function Home() {
alignItems: 'center',
}}
>
<p className='text-[#2A2C35] font-bold w-2/3 text-center text-5xl'>
<p className=' font-bold w-2/3 text-center text-5xl'>
Beautifully crafted components for your next big front-end
application.
</p>
<h3
className='font-mdeium text-xl text-appTextSecondaryColor'
className='font-medium text-xl text-appTextSecondaryColor'
style={{
width: '50vw',
textAlign: 'center',
Expand Down
Loading

0 comments on commit b42bfb5

Please sign in to comment.