-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from tiktok/octogonz/docusaurus
Initial Docusaurus setup
- Loading branch information
Showing
22 changed files
with
8,221 additions
and
645 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ jobs: | |
fail-fast: false | ||
matrix: | ||
node: | ||
- '16' | ||
- '18' | ||
platform: | ||
- ubuntu-latest | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -85,4 +85,8 @@ lib-shim | |
dist | ||
dist-storybook | ||
*.scss.ts | ||
*.sass.ts | ||
*.sass.ts | ||
|
||
# Docusaurus build outputs | ||
build | ||
.docusaurus |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Website | ||
|
||
This is the [Docusaurus](https://docusaurus.io/) project for the Sparo website. | ||
|
||
## Development | ||
|
||
1. Install the monorepo dependencies using [RushJS](https://rushjs.io/): | ||
|
||
```shell | ||
rush install | ||
rush build | ||
``` | ||
|
||
2. Launch the local development server: | ||
|
||
```shell | ||
cd apps/website | ||
rushx 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. | ||
|
||
## Deployment | ||
|
||
1. If you will manually copy the files to a server, you can build the **apps/sparo/build** folder like this: | ||
|
||
```shell | ||
cd apps/website | ||
rushx build | ||
``` | ||
|
||
2. To automatically deploy to GitHub Pages (as an administrator): | ||
|
||
```shell | ||
# If you are using HTTPS authentication for GitHub: | ||
cd apps/website | ||
GIT_USER=<Your GitHub username> rushx deploy | ||
``` | ||
|
||
``` | ||
# If you are using SSH authentication for GitHub: | ||
USE_SSH=true rushx deploy | ||
``` | ||
|
||
## See also | ||
|
||
- [Deployment](https://docusaurus.io/docs/deployment) from the Docusaurus help | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
presets: [require.resolve('@docusaurus/core/lib/babel/preset')] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
title: Sparo profiles | ||
--- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
// @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: 'Sparo', | ||
tagline: 'Faster Git for large frontend monorepos', | ||
favicon: 'images/site/sparo-favicon.ico', | ||
|
||
// Set the production url of your site here | ||
url: 'https://tiktok.github.io', | ||
// Set the /<baseUrl>/ pathname under which your site is served | ||
// For GitHub pages deployment, it is often '/<projectName>/' | ||
baseUrl: '/sparo/', | ||
|
||
// GitHub pages deployment config. | ||
// If you aren't using GitHub pages, you don't need these. | ||
organizationName: 'tiktok', // Usually your GitHub org/user name. | ||
projectName: 'sparo', // Usually your repo name. | ||
|
||
onBrokenLinks: 'throw', | ||
onBrokenMarkdownLinks: 'throw', | ||
|
||
// 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: { | ||
routeBasePath: '/', | ||
sidebarPath: './sidebars.js', | ||
breadcrumbs: false, | ||
// Please change this to your repo. | ||
// Remove this to remove the "edit this page" links. | ||
editUrl: 'https://github.com/tiktok/sparo/tree/main/apps/website/' | ||
}, | ||
/* | ||
blog: { | ||
showReadingTime: true, | ||
// Please change this to your repo. | ||
// Remove this to remove the "edit this page" links. | ||
editUrl: | ||
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/' | ||
}, | ||
*/ | ||
theme: { | ||
customCss: './src/css/custom.css' | ||
} | ||
}) | ||
] | ||
], | ||
|
||
themeConfig: | ||
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */ | ||
({ | ||
// Replace with your project's social card | ||
image: 'images/site/sparo-ograph.png', | ||
navbar: { | ||
title: '', | ||
logo: { | ||
alt: 'Sparo', | ||
src: 'images/site/sparo-title.svg' | ||
}, | ||
items: [ | ||
{ | ||
type: 'localeDropdown', | ||
position: 'left' | ||
}, | ||
{ | ||
to: 'pages/guide/getting_started', | ||
position: 'right', | ||
label: 'Docs' | ||
}, | ||
{ | ||
href: 'https://github.com/tiktok/sparo', | ||
label: 'GitHub', | ||
position: 'right' | ||
}, | ||
{ | ||
to: 'pages/support/news', | ||
position: 'right', | ||
label: 'News' | ||
}, | ||
{ | ||
to: 'pages/support/help', | ||
position: 'right', | ||
label: 'Help' | ||
} | ||
] | ||
}, | ||
footer: { | ||
style: 'dark', | ||
links: [], | ||
copyright: `Copyright © ${new Date().getFullYear()} TikTok Pte. Ltd.` | ||
}, | ||
prism: { | ||
theme: prismThemes.github, | ||
darkTheme: prismThemes.dracula | ||
} | ||
}) | ||
}; | ||
|
||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"name": "website", | ||
"version": "0.0.0", | ||
"private": true, | ||
"description": "The Sparo documentation website", | ||
"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" | ||
}, | ||
"dependencies": { | ||
"@docusaurus/core": "3.1.1", | ||
"@docusaurus/preset-classic": "3.1.1", | ||
"@mdx-js/react": "^3.0.0", | ||
"clsx": "^2.0.0", | ||
"prism-react-renderer": "^2.3.0", | ||
"react": "^18.0.0", | ||
"react-dom": "^18.0.0" | ||
}, | ||
"devDependencies": { | ||
"@docusaurus/module-type-aliases": "3.1.1", | ||
"@docusaurus/types": "3.1.1" | ||
}, | ||
"browserslist": { | ||
"production": [ | ||
">0.5%", | ||
"not dead", | ||
"not op_mini all" | ||
], | ||
"development": [ | ||
"last 3 chrome version", | ||
"last 3 firefox version", | ||
"last 5 safari version" | ||
] | ||
}, | ||
"engines": { | ||
"node": ">=18.0" | ||
} | ||
} |
Oops, something went wrong.