Skip to content

Commit f94432b

Browse files
committed
docs: Bootstrap docusaurus docs
1 parent 3304ed4 commit f94432b

22 files changed

+6762
-673
lines changed

docs/.gitignore

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Dependencies
2+
/node_modules
3+
4+
# Production
5+
/build
6+
7+
# Generated files
8+
.docusaurus
9+
.cache-loader
10+
11+
# Misc
12+
.DS_Store
13+
.env.local
14+
.env.development.local
15+
.env.test.local
16+
.env.production.local
17+
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*

docs/README.md

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Website
2+
3+
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
4+
5+
### Installation
6+
7+
```
8+
$ yarn
9+
```
10+
11+
### Local Development
12+
13+
```
14+
$ yarn start
15+
```
16+
17+
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
18+
19+
### Build
20+
21+
```
22+
$ yarn build
23+
```
24+
25+
This command generates static content into the `build` directory and can be served using any static contents hosting service.
26+
27+
### Deployment
28+
29+
Using SSH:
30+
31+
```
32+
$ USE_SSH=true yarn deploy
33+
```
34+
35+
Not using SSH:
36+
37+
```
38+
$ GIT_USER=<Your GitHub username> yarn deploy
39+
```
40+
41+
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.

docs/babel.config.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
3+
};

docs/docs/configuration.md

Whitespace-only changes.

docs/docs/development.md

Whitespace-only changes.

docs/docs/installation.md

Whitespace-only changes.

docs/docs/intro.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
slug: /
3+
sidebar_position: 1
4+
---
5+

docs/docusaurus.config.ts

+115
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
import {themes as prismThemes} from 'prism-react-renderer';
2+
import type {Config} from '@docusaurus/types';
3+
import type * as Preset from '@docusaurus/preset-classic';
4+
5+
const config: Config = {
6+
title: 'Hoarder Docs',
7+
tagline: 'Dinosaurs are cool',
8+
favicon: 'img/favicon.ico',
9+
10+
// Set the production url of your site here
11+
url: 'https://your-docusaurus-site.example.com',
12+
// Set the /<baseUrl>/ pathname under which your site is served
13+
// For GitHub pages deployment, it is often '/<projectName>/'
14+
baseUrl: '/',
15+
16+
// GitHub pages deployment config.
17+
// If you aren't using GitHub pages, you don't need these.
18+
organizationName: 'MohamedBassem', // Usually your GitHub org/user name.
19+
projectName: 'hoarder-app', // Usually your repo name.
20+
21+
onBrokenLinks: 'throw',
22+
onBrokenMarkdownLinks: 'warn',
23+
24+
// Even if you don't use internationalization, you can use this field to set
25+
// useful metadata like html lang. For example, if your site is Chinese, you
26+
// may want to replace "en" with "zh-Hans".
27+
i18n: {
28+
defaultLocale: 'en',
29+
locales: ['en'],
30+
},
31+
32+
presets: [
33+
[
34+
'classic',
35+
{
36+
docs: {
37+
sidebarPath: './sidebars.ts',
38+
editUrl:
39+
'https://github.com/MohamedBassem/hoarder-app/tree/main/docs/',
40+
routeBasePath: "/",
41+
},
42+
blog: false,
43+
theme: {
44+
customCss: './src/css/custom.css',
45+
},
46+
} satisfies Preset.Options,
47+
],
48+
],
49+
50+
themeConfig: {
51+
// Replace with your project's social card
52+
image: 'img/docusaurus-social-card.jpg',
53+
navbar: {
54+
title: 'Hoarder Docs',
55+
logo: {
56+
alt: 'My Site Logo',
57+
src: 'img/logo.svg',
58+
},
59+
items: [
60+
{
61+
href: 'https://github.com/MohamedBassem/hoarder-app',
62+
label: 'GitHub',
63+
position: 'right',
64+
},
65+
],
66+
},
67+
footer: {
68+
style: 'dark',
69+
links: [
70+
{
71+
title: 'Docs',
72+
items: [
73+
{
74+
label: 'Tutorial',
75+
to: '/docs/intro',
76+
},
77+
],
78+
},
79+
{
80+
title: 'Community',
81+
items: [
82+
{
83+
label: 'Stack Overflow',
84+
href: 'https://stackoverflow.com/questions/tagged/docusaurus',
85+
},
86+
{
87+
label: 'Discord',
88+
href: 'https://discordapp.com/invite/docusaurus',
89+
},
90+
{
91+
label: 'Twitter',
92+
href: 'https://twitter.com/docusaurus',
93+
},
94+
],
95+
},
96+
{
97+
title: 'More',
98+
items: [
99+
{
100+
label: 'GitHub',
101+
href: 'https://github.com/MohamedBassem/hoarder-app',
102+
},
103+
],
104+
},
105+
],
106+
copyright: `Copyright © ${new Date().getFullYear()} My Project, Inc. Built with Docusaurus.`,
107+
},
108+
prism: {
109+
theme: prismThemes.github,
110+
darkTheme: prismThemes.dracula,
111+
},
112+
} satisfies Preset.ThemeConfig,
113+
};
114+
115+
export default config;

docs/package.json

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{
2+
"name": "@hoarder/docs",
3+
"version": "0.0.0",
4+
"private": true,
5+
"scripts": {
6+
"docusaurus": "docusaurus",
7+
"start": "docusaurus start",
8+
"build": "docusaurus build",
9+
"swizzle": "docusaurus swizzle",
10+
"deploy": "docusaurus deploy",
11+
"clear": "docusaurus clear",
12+
"serve": "docusaurus serve",
13+
"write-translations": "docusaurus write-translations",
14+
"write-heading-ids": "docusaurus write-heading-ids",
15+
"typecheck": "tsc"
16+
},
17+
"dependencies": {
18+
"@docusaurus/core": "3.1.1",
19+
"@docusaurus/preset-classic": "3.1.1",
20+
"@mdx-js/react": "^3.0.0",
21+
"clsx": "^2.1.0",
22+
"prism-react-renderer": "^2.3.0",
23+
"react": "^18.2.0",
24+
"react-dom": "^18.2.0"
25+
},
26+
"devDependencies": {
27+
"@docusaurus/module-type-aliases": "3.1.1",
28+
"@docusaurus/tsconfig": "3.1.1",
29+
"@docusaurus/types": "3.1.1",
30+
"typescript": "^5.3.3"
31+
},
32+
"browserslist": {
33+
"production": [
34+
">0.5%",
35+
"not dead",
36+
"not op_mini all"
37+
],
38+
"development": [
39+
"last 3 chrome version",
40+
"last 3 firefox version",
41+
"last 5 safari version"
42+
]
43+
},
44+
"eslintConfig": {
45+
"root": true,
46+
"extends": [
47+
"@hoarder/eslint-config/base",
48+
"@hoarder/eslint-config/nextjs",
49+
"@hoarder/eslint-config/react"
50+
]
51+
},
52+
"prettier": "@hoarder/prettier-config",
53+
"engines": {
54+
"node": ">=18.0"
55+
}
56+
}

docs/sidebars.ts

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import type {SidebarsConfig} from '@docusaurus/plugin-content-docs';
2+
3+
/**
4+
* Creating a sidebar enables you to:
5+
- create an ordered group of docs
6+
- render a sidebar for each doc of that group
7+
- provide next/previous navigation
8+
9+
The sidebars can be generated from the filesystem, or explicitly defined here.
10+
11+
Create as many sidebars as you want.
12+
*/
13+
const sidebars: SidebarsConfig = {
14+
// By default, Docusaurus generates a sidebar from the docs folder structure
15+
tutorialSidebar: [{type: 'autogenerated', dirName: '.'}],
16+
17+
// But you can create a sidebar manually
18+
/*
19+
tutorialSidebar: [
20+
'intro',
21+
'hello',
22+
{
23+
type: 'category',
24+
label: 'Tutorial',
25+
items: ['tutorial-basics/create-a-document'],
26+
},
27+
],
28+
*/
29+
};
30+
31+
export default sidebars;

docs/src/css/custom.css

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/**
2+
* Any CSS included here will be global. The classic template
3+
* bundles Infima by default. Infima is a CSS framework designed to
4+
* work well for content-centric websites.
5+
*/
6+
7+
/* You can override the default Infima variables here. */
8+
:root {
9+
--ifm-color-primary: #2e8555;
10+
--ifm-color-primary-dark: #29784c;
11+
--ifm-color-primary-darker: #277148;
12+
--ifm-color-primary-darkest: #205d3b;
13+
--ifm-color-primary-light: #33925d;
14+
--ifm-color-primary-lighter: #359962;
15+
--ifm-color-primary-lightest: #3cad6e;
16+
--ifm-code-font-size: 95%;
17+
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
18+
}
19+
20+
/* For readability concerns, you should choose a lighter palette in dark mode. */
21+
[data-theme='dark'] {
22+
--ifm-color-primary: #25c2a0;
23+
--ifm-color-primary-dark: #21af90;
24+
--ifm-color-primary-darker: #1fa588;
25+
--ifm-color-primary-darkest: #1a8870;
26+
--ifm-color-primary-light: #29d5b0;
27+
--ifm-color-primary-lighter: #32d8b4;
28+
--ifm-color-primary-lightest: #4fddbf;
29+
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
30+
}

docs/static/.nojekyll

Whitespace-only changes.
54.4 KB
Loading

docs/static/img/docusaurus.png

5.02 KB
Loading

docs/static/img/favicon.ico

3.54 KB
Binary file not shown.

docs/static/img/logo.svg

+1
Loading

0 commit comments

Comments
 (0)