Skip to content

Commit

Permalink
migrate to docusaurus
Browse files Browse the repository at this point in the history
  • Loading branch information
velddev committed Mar 26, 2024
1 parent 4328280 commit fd0c258
Show file tree
Hide file tree
Showing 42 changed files with 6,924 additions and 13,428 deletions.
25 changes: 21 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
node_modules
.cache
public
yarn-error.log
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
.cache/
41 changes: 41 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Website

This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.

### Installation

```
$ yarn
```

### Local Development

```
$ yarn start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

### Build

```
$ yarn build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

### Deployment

Using SSH:

```
$ USE_SSH=true yarn deploy
```

Not using SSH:

```
$ GIT_USER=<Your GitHub username> yarn deploy
```

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
3 changes: 3 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};
4 changes: 0 additions & 4 deletions content/getting-started.mdx

This file was deleted.

162 changes: 0 additions & 162 deletions darkmode.css

This file was deleted.

File renamed without changes.
2 changes: 1 addition & 1 deletion content/api/bot.mdx → docs/api/bot.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Bots
description: API resource for a bots or apps on a platform like Discord
---

import HTTPHeader from "@components/HTTPHeader";
import HTTPHeader from "../../src/components/HTTPHeader";

> Bot endpoints are subject to [stricter rate limits](/resources/ratelimits#resource-specific-ratelimits) than others.
Expand Down
2 changes: 1 addition & 1 deletion content/api/user.mdx → docs/api/user.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Users
description: API resource for Top.gg users
---

import HTTPHeader from "@components/HTTPHeader";
import HTTPHeader from "../../src/components/HTTPHeader";

A user represents a User account in top.gg. It is not associated with any other platform like Discord.

Expand Down
1 change: 1 addition & 0 deletions content/index.md → docs/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Home
description: Welcome to Top.gg
order: 1
---

Hi developer 🥰, welcome to top.gg developer docs. You are currently viewing **v0** of our API documentation. We're going to be working on the next version of the top.gg API (v1) soon, stay tuned!
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
92 changes: 92 additions & 0 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
// @ts-check
// `@type` JSDoc annotations allow editor autocompletion and type checking
// (when paired with `@ts-check`).
// There are various equivalent ways to declare your Docusaurus config.
// See: https://docusaurus.io/docs/api/docusaurus-config

import { themes as prismThemes } from 'prism-react-renderer';

/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'Top.gg Documentation',
tagline: 'Dinosaurs are cool',
favicon: 'img/favicon.ico',

// Set the production url of your site here
url: 'https://docs.top.gg',
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/',

// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: 'top-gg', // Usually your GitHub org/user name.
projectName: 'docs', // Usually your repo name.

onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',

// Even if you don't use internationalization, you can use this field to set
// useful metadata like html lang. For example, if your site is Chinese, you
// may want to replace "en" with "zh-Hans".
i18n: {
defaultLocale: 'en',
locales: ['en'],
},

presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
sidebarPath: './sidebars.js',
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl:
'https://github.com/top-gg/docs/tree/main/docs/',
},
theme: {
customCss: './src/css/custom.css',
},
}),
],
],

themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
colorMode: {
defaultMode: "dark"
},
// Replace with your project's social card
image: 'logo.svg',
navbar: {
title: 'Top.gg',
logo: {
alt: 'Top.gg Logo',
src: 'logo.svg',
},
items: [
{
type: 'docSidebar',
sidebarId: 'tutorialSidebar',
position: 'right',
label: 'Docs',
},
{
href: 'https://github.com/top-gg-community',
label: 'Community GitHub',
position: 'right',
},
],
},

prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
},
}),
};

export default config;
1 change: 0 additions & 1 deletion gatsby-browser.js

This file was deleted.

36 changes: 0 additions & 36 deletions gatsby-config.js

This file was deleted.

Loading

0 comments on commit fd0c258

Please sign in to comment.