Docusaurus is a modern static website generator that helps you maintain open source documentation websites. We use Docusaurus to showcase our team documentation and update project progress.
- Home page:
- Release viewer:
Demo: https://the-company-tcus.netlify.app/releases/view/nocodb/nocodb?from=11-30-2022&to=01-04-2023
- PDF viewer:
Server
- PDF viewer.
- GitHub release viewer.
- Dynamic routes (pdf viewer, release viewer).
- Custom navbar (cursor-effect button).
These colors are defined in the
src/css/custom.css
file when bootstrapping a new project.
- Light theme:
- Dark theme:
*: These are not default WindiCSS utilities. It is defined in windi.config.ts
.
See example configuration below.
**: These variables applies to selector [data-theme='dark']
only.
- WindiCSS colors:
You can style your components with WindiCSS colors. See color reference at WindiCSS color utility.
Configure WindiCSS colors
// windi.config.ts
export default {
theme: {
extend: {
colors: {
primary: {
DEFAULT: '#1e40af',
dark: '#1b3a9d',
darker: '#193695',
darkest: '#152d7b',
light: '#2146c1',
lighter: '#224ac9',
lightest: '#2f58db',
},
'dark-primary': {
DEFAULT: '#bfdbfe',
dark: '#93c2fd',
darker: '#7db6fd',
darkest: '#3c91fc',
light: '#ebf4ff',
lighter: '#ffffff',
lightest: '#ffffff',
},
},
},
},
};
To run this project, you will need to add the following environment variables to
your .env
file:
-
App configs:
GH_TOKEN
: GitHub personal access token to fetch data from GitHub API.Note: It's recommended that the token has the following scopes:
repo.public_repo
.PDF_EMBED_CLIENT_ID
(optional): Client ID (API Key) for Adobe PDF Embed API. You can checkout the documentation, or generate a new one here.Note: This is optional because the default client id for domains:
localhost
(development) andthe-company-tcus.netlify.app
(production) are already set in the filedocusaurus.config.js
.
E.g:
# .env
GH_TOKEN=ghp_HH8T***
PDF_EMBED_CLIENT_ID=e11a5***
You can also check out the file .env.example
to see all required environment
variables.
This project uses pnpm as package manager:
npm install --global pnpm
Clone the project:
git clone https://github.com/the-company-tcus/docs.git
Go to the project directory:
cd docs
Install dependencies:
pnpm install
Start the server:
pnpm start
To deploy this project run:
GIT_USER=<GITHUB_USERNAME> pnpm deploy
Warning: You have to change the
baseUrl
indocusaurus.config.js
todocs/
before deploying to GitHub Pages.
For more information, check out the doc Document Site Deployment.
- Architecture.
- Components Management.
- Dynamic Routes.
- Production Setup:
- API References.
-
Features:
- Remark plugin to transform PDF links to
PDFViewer
component. - Integrate
remark-emoji
plugin.
- Remark plugin to transform PDF links to
-
Blogs:
- Add custom dynamic routes to Docusaurus.
- Add your custom navbar to Docusaurus.
- Create your first remark plugin.
-
Docs:
- Git branching strategy.
- Privacy Policy.
- Terms of Service.
Duong Vinh - @duckymomo20012 - [email protected]
Project Link: https://github.com/the-company-tcus/docs.
Here are useful resources and libraries that we have used in our projects:
- Docusaurus: Build optimized websites quickly, focus on your content.
- Awesome Readme Template: A detailed template to bootstrap your README file quickly.