feat(docs): add docusaurus workspace, initial setup of docs

This commit is contained in:
Amruth Pillai 2022-03-08 23:54:00 +01:00
parent a131bb3652
commit dc4aa0b496
No known key found for this signature in database
GPG Key ID: E3C57DF9B80855AD
16 changed files with 6184 additions and 177 deletions

View File

@ -1,4 +1,16 @@
dist
.next
__ENV.js
node_modules
# Global
node_modules
# Schema
schema/dist
# Server
server/dist
# Client
client/.next
client/public/__ENV.js
# Docs
docs/build
docs/.docusaurus

4
docs/.eslintrc.json Normal file
View File

@ -0,0 +1,4 @@
{
"extends": "../.eslintrc.json",
"ignorePatterns": ["build", ".docusaurus"]
}

20
docs/.gitignore vendored Normal file
View File

@ -0,0 +1,20 @@
# 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*

3
docs/babel.config.js Normal file
View File

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

47
docs/docs/index.md Normal file
View File

@ -0,0 +1,47 @@
---
sidebar_position: 1
---
# Tutorial Intro
Let's discover **Docusaurus in less than 5 minutes**.
## Getting Started
Get started by **creating a new site**.
Or **try Docusaurus immediately** with **[docusaurus.new](https://docusaurus.new)**.
### What you'll need
- [Node.js](https://nodejs.org/en/download/) version 14 or above:
- When installing Node.js, you are recommended to check all checkboxes related to dependencies.
## Generate a new site
Generate a new Docusaurus site using the **classic template**.
The classic template will automatically be added to your project after you run the command:
```bash
npm init docusaurus@latest my-website classic
```
You can type this command into Command Prompt, Powershell, Terminal, or any other integrated terminal of your code editor.
The command also installs all necessary dependencies you need to run Docusaurus.
## Start your site
Run the development server:
```bash
cd my-website
npm run start
```
The `cd` command changes the directory you're working with. In order to work with your newly created Docusaurus site, you'll need to navigate the terminal there.
The `npm run start` command builds your website locally and serves it through a development server, ready for you to view at http://localhost:3000/.
Open `docs/intro.md` (this page) and edit some lines: the site **reloads automatically** and displays your changes.

120
docs/docusaurus.config.js Normal file
View File

@ -0,0 +1,120 @@
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'Reactive Resume',
tagline: 'A free and open source resume builder.',
url: 'https://docs.rxresu.me',
baseUrl: '/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
favicon: 'img/favicon.ico',
organizationName: 'AmruthPillai',
projectName: 'Reactive-Resume',
presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
blog: false,
docs: {
routeBasePath: '/',
sidebarPath: require.resolve('./sidebars.js'),
editUrl: 'https://github.com/AmruthPillai/Reactive-Resume/tree/main/docs',
},
sitemap: {
changefreq: 'weekly',
priority: 0.5,
},
theme: {
customCss: require.resolve('./styles/custom.css'),
},
}),
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
navbar: {
title: 'Reactive Resume',
logo: {
alt: 'Reactive Resume',
src: 'img/logo.svg',
},
items: [
{
href: 'https://github.com/AmruthPillai/Reactive-Resume',
position: 'right',
label: 'GitHub',
},
],
},
footer: {
style: 'dark',
links: [
{
title: 'Sections',
items: [
{
label: 'Documentation',
to: '/docs/intro',
},
],
},
{
title: 'Community',
items: [
{
label: 'GitHub',
href: 'https://github.com/AmruthPillai/Reactive-Resume',
},
{
label: 'Twitter',
href: 'https://twitter.com/AmruthPillai',
},
],
},
{
title: 'Support',
items: [
{
label: 'Translate',
href: 'https://translate.rxresu.me',
},
{
label: 'Donate',
href: 'https://buymeacoffee.com/AmruthPillai',
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} Amruth Pillai. Licensed under MIT. Built with Docusaurus.`,
},
metadata: [
{
name: 'keywords',
content: [
'reactive resume',
'resume builder',
'free resumes',
'resume templates',
'free resume templates',
'open source resume builder',
'resume builder source code',
].join(', '),
},
],
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
}),
};
module.exports = config;

43
docs/package.json Normal file
View File

@ -0,0 +1,43 @@
{
"name": "@reactive-resume/docs",
"scripts": {
"docusaurus": "docusaurus",
"start": "docusaurus start",
"build": "docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
"clear": "docusaurus clear",
"serve": "docusaurus serve",
"write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids",
"typecheck": "tsc"
},
"dependencies": {
"@algolia/client-search": "^4.9.1",
"@docusaurus/core": "2.0.0-beta.17",
"@docusaurus/preset-classic": "2.0.0-beta.17",
"@mdx-js/react": "^1.6.22",
"clsx": "^1.1.1",
"prism-react-renderer": "^1.2.1",
"react": "^17.0.1",
"react-dom": "^17.0.1"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "2.0.0-beta.17",
"@tsconfig/docusaurus": "^1.0.4",
"@types/react": ">=16.8.0 <18.0.0",
"typescript": "^4.6.2"
},
"browserslist": {
"production": [
">0.5%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}

31
docs/sidebars.js Normal file
View File

@ -0,0 +1,31 @@
/**
* Creating a sidebar enables you to:
- create an ordered group of docs
- render a sidebar for each doc of that group
- provide next/previous navigation
The sidebars can be generated from the filesystem, or explicitly defined here.
Create as many sidebars as you want.
*/
// @ts-check
/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
const sidebars = {
// By default, Docusaurus generates a sidebar from the docs folder structure
tutorialSidebar: [{ type: 'autogenerated', dirName: '.' }],
// But you can create a sidebar manually
/*
tutorialSidebar: [
{
type: 'category',
label: 'Tutorial',
items: ['hello'],
},
],
*/
};
module.exports = sidebars;

0
docs/static/.nojekyll vendored Normal file
View File

BIN
docs/static/img/favicon.ico vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

17
docs/static/img/logo.svg vendored Normal file
View File

@ -0,0 +1,17 @@
<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
d="M0 10C0 4.47715 4.47715 0 10 0H502C507.523 0 512 4.47715 512 10V502C512 507.523 507.523 512 502 512H10C4.47715 512 0 507.523 0 502V10Z"
fill="white" />
<path
d="M209.701 220L197.079 201.522L183.546 220H156.74L183.546 184.736L157.521 149.472H185.367L197.859 167.299L210.872 149.472H237.027L211.002 183.825L237.938 220H209.701Z"
fill="#444444" />
<path
d="M108.927 165.797H94.8735V190H69.1088V98.9125H110.749C118.99 98.9125 126.147 100.3 132.219 103.076C138.292 105.766 142.976 109.669 146.273 114.788C149.569 119.819 151.218 125.762 151.218 132.615C151.218 139.208 149.656 144.977 146.533 149.921C143.497 154.779 139.116 158.596 133.391 161.372L153.039 190H125.453L108.927 165.797ZM125.193 132.615C125.193 128.364 123.848 125.068 121.159 122.725C118.47 120.383 114.479 119.212 109.187 119.212H94.8735V145.888H109.187C114.479 145.888 118.47 144.76 121.159 142.504C123.848 140.162 125.193 136.866 125.193 132.615Z"
fill="#444444" />
<path
d="M94.08 273.12H85.44V288H69.6V232H95.2C100.267 232 104.667 232.853 108.4 234.56C112.133 236.213 115.013 238.613 117.04 241.76C119.067 244.853 120.08 248.507 120.08 252.72C120.08 256.773 119.12 260.32 117.2 263.36C115.333 266.347 112.64 268.693 109.12 270.4L121.2 288H104.24L94.08 273.12ZM104.08 252.72C104.08 250.107 103.253 248.08 101.6 246.64C99.9467 245.2 97.4933 244.48 94.24 244.48H85.44V260.88H94.24C97.4933 260.88 99.9467 260.187 101.6 258.8C103.253 257.36 104.08 255.333 104.08 252.72ZM172.419 266.4C172.419 266.507 172.339 267.76 172.179 270.16H140.659C141.299 272.4 142.525 274.133 144.339 275.36C146.205 276.533 148.525 277.12 151.299 277.12C153.379 277.12 155.165 276.827 156.659 276.24C158.205 275.653 159.752 274.693 161.299 273.36L169.299 281.68C165.085 286.373 158.925 288.72 150.819 288.72C145.752 288.72 141.299 287.76 137.459 285.84C133.619 283.92 130.632 281.253 128.499 277.84C126.419 274.427 125.379 270.56 125.379 266.24C125.379 261.973 126.392 258.16 128.419 254.8C130.499 251.387 133.352 248.72 136.979 246.8C140.605 244.88 144.685 243.92 149.219 243.92C153.539 243.92 157.459 244.827 160.979 246.64C164.499 248.4 167.272 250.987 169.299 254.4C171.379 257.76 172.419 261.76 172.419 266.4ZM149.299 254.72C146.952 254.72 144.979 255.387 143.379 256.72C141.832 258.053 140.845 259.867 140.419 262.16H158.179C157.752 259.867 156.739 258.053 155.139 256.72C153.592 255.387 151.645 254.72 149.299 254.72ZM195.187 288.72C191.56 288.72 187.987 288.32 184.467 287.52C180.947 286.667 178.12 285.573 175.987 284.24L180.547 273.84C182.52 275.067 184.867 276.053 187.587 276.8C190.307 277.493 193 277.84 195.667 277.84C198.12 277.84 199.854 277.6 200.867 277.12C201.934 276.587 202.467 275.84 202.467 274.88C202.467 273.92 201.827 273.253 200.547 272.88C199.32 272.453 197.347 272.053 194.627 271.68C191.16 271.253 188.2 270.693 185.747 270C183.347 269.307 181.267 268.027 179.507 266.16C177.747 264.293 176.867 261.68 176.867 258.32C176.867 255.547 177.694 253.093 179.347 250.96C181 248.773 183.4 247.067 186.547 245.84C189.747 244.56 193.56 243.92 197.987 243.92C201.134 243.92 204.254 244.24 207.347 244.88C210.44 245.52 213.027 246.427 215.107 247.6L210.547 257.92C206.707 255.787 202.547 254.72 198.067 254.72C195.667 254.72 193.907 255.013 192.787 255.6C191.667 256.133 191.107 256.853 191.107 257.76C191.107 258.773 191.72 259.493 192.947 259.92C194.174 260.293 196.2 260.693 199.027 261.12C202.6 261.653 205.56 262.267 207.907 262.96C210.254 263.653 212.28 264.933 213.987 266.8C215.747 268.613 216.627 271.173 216.627 274.48C216.627 277.2 215.8 279.653 214.147 281.84C212.494 283.973 210.04 285.653 206.787 286.88C203.587 288.107 199.72 288.72 195.187 288.72ZM268.777 244.64V288H254.297V283.36C252.697 285.12 250.777 286.453 248.537 287.36C246.297 288.267 243.924 288.72 241.417 288.72C235.817 288.72 231.337 287.067 227.977 283.76C224.67 280.453 223.017 275.493 223.017 268.88V244.64H238.217V266.4C238.217 269.653 238.83 272.027 240.057 273.52C241.284 275.013 243.07 275.76 245.417 275.76C247.817 275.76 249.764 274.933 251.257 273.28C252.804 271.573 253.577 268.987 253.577 265.52V244.64H268.777ZM335.048 243.92C340.381 243.92 344.621 245.52 347.768 248.72C350.968 251.92 352.568 256.747 352.568 263.2V288H337.368V265.68C337.368 262.64 336.781 260.4 335.608 258.96C334.488 257.52 332.888 256.8 330.808 256.8C328.514 256.8 326.674 257.6 325.288 259.2C323.901 260.8 323.208 263.227 323.208 266.48V288H308.008V265.68C308.008 259.76 305.821 256.8 301.448 256.8C299.101 256.8 297.234 257.6 295.848 259.2C294.461 260.8 293.768 263.227 293.768 266.48V288H278.568V244.64H293.048V249.2C294.648 247.44 296.541 246.133 298.728 245.28C300.968 244.373 303.394 243.92 306.008 243.92C309.048 243.92 311.768 244.48 314.168 245.6C316.568 246.72 318.514 248.427 320.008 250.72C321.714 248.533 323.874 246.853 326.488 245.68C329.101 244.507 331.954 243.92 335.048 243.92ZM407.106 266.4C407.106 266.507 407.026 267.76 406.866 270.16H375.346C375.986 272.4 377.213 274.133 379.026 275.36C380.893 276.533 383.213 277.12 385.986 277.12C388.066 277.12 389.853 276.827 391.346 276.24C392.893 275.653 394.44 274.693 395.986 273.36L403.986 281.68C399.773 286.373 393.613 288.72 385.506 288.72C380.44 288.72 375.986 287.76 372.146 285.84C368.306 283.92 365.32 281.253 363.186 277.84C361.106 274.427 360.066 270.56 360.066 266.24C360.066 261.973 361.08 258.16 363.106 254.8C365.186 251.387 368.04 248.72 371.666 246.8C375.293 244.88 379.373 243.92 383.906 243.92C388.226 243.92 392.146 244.827 395.666 246.64C399.186 248.4 401.96 250.987 403.986 254.4C406.066 257.76 407.106 261.76 407.106 266.4ZM383.986 254.72C381.64 254.72 379.666 255.387 378.066 256.72C376.52 258.053 375.533 259.867 375.106 262.16H392.866C392.44 259.867 391.426 258.053 389.826 256.72C388.28 255.387 386.333 254.72 383.986 254.72Z"
fill="#444444" />
<line x1="60" y1="358" x2="360" y2="358" stroke="#DDDDDD" stroke-width="20" stroke-miterlimit="16" />
<line x1="60" y1="398" x2="300" y2="398" stroke="#BBBBBB" stroke-width="20" stroke-miterlimit="16" />
<line x1="60" y1="438" x2="240" y2="438" stroke="#DDDDDD" stroke-width="20" stroke-miterlimit="16" />
</svg>

After

Width:  |  Height:  |  Size: 6.1 KiB

39
docs/styles/custom.css Normal file
View File

@ -0,0 +1,39 @@
/**
* Any CSS included here will be global. The classic template
* bundles Infima by default. Infima is a CSS framework designed to
* work well for content-centric websites.
*/
/* You can override the default Infima variables here. */
:root {
--ifm-color-primary: #2e8555;
--ifm-color-primary-dark: #29784c;
--ifm-color-primary-darker: #277148;
--ifm-color-primary-darkest: #205d3b;
--ifm-color-primary-light: #33925d;
--ifm-color-primary-lighter: #359962;
--ifm-color-primary-lightest: #3cad6e;
--ifm-code-font-size: 95%;
}
/* For readability concerns, you should choose a lighter palette in dark mode. */
[data-theme='dark'] {
--ifm-color-primary: #25c2a0;
--ifm-color-primary-dark: #21af90;
--ifm-color-primary-darker: #1fa588;
--ifm-color-primary-darkest: #1a8870;
--ifm-color-primary-light: #29d5b0;
--ifm-color-primary-lighter: #32d8b4;
--ifm-color-primary-lightest: #4fddbf;
}
.docusaurus-highlight-code-line {
background-color: rgba(0, 0, 0, 0.1);
display: block;
margin: 0 calc(-1 * var(--ifm-pre-padding));
padding: 0 var(--ifm-pre-padding);
}
[data-theme='dark'] .docusaurus-highlight-code-line {
background-color: rgba(0, 0, 0, 0.3);
}

6
docs/tsconfig.json Normal file
View File

@ -0,0 +1,6 @@
{
"extends": "@tsconfig/docusaurus/tsconfig.json",
"compilerOptions": {
"baseUrl": "."
}
}

View File

@ -5,7 +5,8 @@
"workspaces": [
"schema",
"client",
"server"
"server",
"docs"
],
"config": {
"commitizen": {
@ -19,10 +20,12 @@
"dev:schema": "pnpm -F schema dev",
"dev:server": "pnpm -F server start:dev",
"dev:client": "pnpm -F client dev",
"dev:docs": "pnpm -F docs start",
"dev": "env-cmd --silent concurrently --kill-others \"pnpm run dev:*\"",
"build:schema": "pnpm -F schema build",
"build:server": "pnpm -F server build",
"build:client": "pnpm -F client build",
"build:docs": "pnpm -F docs build",
"build": "env-cmd --silent concurrently \"pnpm run build:*\"",
"start:server": "pnpm -F server start:prod",
"start:client": "pnpm -F client start",

File diff suppressed because it is too large Load Diff

View File

@ -2,3 +2,4 @@ packages:
- 'schema'
- 'server'
- 'client'
- 'docs'