diff --git a/.prettierignore b/.prettierignore index 5d5be9fe..c67f3c21 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,3 +1,6 @@ -**/*.md +CHANGELOG.md coverage +DEPENDENCIES.md dist +site/.docusaurus +site/build diff --git a/site/README.md b/site/README.md index aaba2fa1..47a81d80 100644 --- a/site/README.md +++ b/site/README.md @@ -1,6 +1,7 @@ # Website -This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator. +This website is built using [Docusaurus 2](https://docusaurus.io/), a modern +static website generator. ### Installation @@ -14,7 +15,8 @@ $ yarn $ 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. +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 @@ -22,7 +24,8 @@ This command starts a local development server and opens up a browser window. Mo $ yarn build ``` -This command generates static content into the `build` directory and can be served using any static contents hosting service. +This command generates static content into the `build` directory and can be +served using any static contents hosting service. ### Deployment @@ -38,4 +41,5 @@ Not using SSH: $ GIT_USER= 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. +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. diff --git a/site/blog/2019-05-28-first-blog-post.md b/site/blog/2019-05-28-first-blog-post.md deleted file mode 100644 index 02f3f81b..00000000 --- a/site/blog/2019-05-28-first-blog-post.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -slug: first-blog-post -title: First Blog Post -authors: - name: Gao Wei - title: Docusaurus Core Team - url: https://github.com/wgao19 - image_url: https://github.com/wgao19.png -tags: [hola, docusaurus] ---- - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet diff --git a/site/blog/2019-05-29-long-blog-post.md b/site/blog/2019-05-29-long-blog-post.md deleted file mode 100644 index 26ffb1b1..00000000 --- a/site/blog/2019-05-29-long-blog-post.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -slug: long-blog-post -title: Long Blog Post -authors: endi -tags: [hello, docusaurus] ---- - -This is the summary of a very long blog post, - -Use a `` comment to limit blog post size in the list view. - - - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet diff --git a/site/blog/2021-08-01-mdx-blog-post.mdx b/site/blog/2021-08-01-mdx-blog-post.mdx deleted file mode 100644 index c04ebe32..00000000 --- a/site/blog/2021-08-01-mdx-blog-post.mdx +++ /dev/null @@ -1,20 +0,0 @@ ---- -slug: mdx-blog-post -title: MDX Blog Post -authors: [slorber] -tags: [docusaurus] ---- - -Blog posts support [Docusaurus Markdown features](https://docusaurus.io/docs/markdown-features), such as [MDX](https://mdxjs.com/). - -:::tip - -Use the power of React to create interactive blog posts. - -```js - -``` - - - -::: diff --git a/site/blog/2021-08-26-welcome/docusaurus-plushie-banner.jpeg b/site/blog/2021-08-26-welcome/docusaurus-plushie-banner.jpeg deleted file mode 100644 index 11bda092..00000000 Binary files a/site/blog/2021-08-26-welcome/docusaurus-plushie-banner.jpeg and /dev/null differ diff --git a/site/blog/2021-08-26-welcome/index.md b/site/blog/2021-08-26-welcome/index.md deleted file mode 100644 index 9455168f..00000000 --- a/site/blog/2021-08-26-welcome/index.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -slug: welcome -title: Welcome -authors: [slorber, yangshun] -tags: [facebook, hello, docusaurus] ---- - -[Docusaurus blogging features](https://docusaurus.io/docs/blog) are powered by the [blog plugin](https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-content-blog). - -Simply add Markdown files (or folders) to the `blog` directory. - -Regular blog authors can be added to `authors.yml`. - -The blog post date can be extracted from filenames, such as: - -- `2019-05-30-welcome.md` -- `2019-05-30-welcome/index.md` - -A blog post folder can be convenient to co-locate blog post images: - -![Docusaurus Plushie](./docusaurus-plushie-banner.jpeg) - -The blog supports tags as well! - -**And if you don't want a blog**: just delete this directory, and use `blog: false` in your Docusaurus config. diff --git a/site/blog/authors.yml b/site/blog/authors.yml deleted file mode 100644 index bcb29915..00000000 --- a/site/blog/authors.yml +++ /dev/null @@ -1,17 +0,0 @@ -endi: - name: Endilie Yacop Sucipto - title: Maintainer of Docusaurus - url: https://github.com/endiliey - image_url: https://github.com/endiliey.png - -yangshun: - name: Yangshun Tay - title: Front End Engineer @ Facebook - url: https://github.com/yangshun - image_url: https://github.com/yangshun.png - -slorber: - name: Sébastien Lorber - title: Docusaurus maintainer - url: https://sebastienlorber.com - image_url: https://github.com/slorber.png diff --git a/site/blog/index.md b/site/blog/index.md new file mode 100644 index 00000000..05761ac5 --- /dev/null +++ b/site/blog/index.md @@ -0,0 +1 @@ +# Blog diff --git a/site/docs/config-option.md b/site/docs/config-option.md new file mode 100644 index 00000000..404be92f --- /dev/null +++ b/site/docs/config-option.md @@ -0,0 +1,4 @@ +--- +id: config-option +title: --config +--- diff --git a/site/docs/custom-types-config.md b/site/docs/custom-types-config.md new file mode 100644 index 00000000..ed6a3f4e --- /dev/null +++ b/site/docs/custom-types-config.md @@ -0,0 +1,4 @@ +--- +id: custom-types-config +title: customTypes +--- diff --git a/site/docs/dependency-types-config.md b/site/docs/dependency-types-config.md new file mode 100644 index 00000000..a61eb837 --- /dev/null +++ b/site/docs/dependency-types-config.md @@ -0,0 +1,4 @@ +--- +id: dependency-types-config +title: dependencyTypes +--- diff --git a/site/docs/filter-config.md b/site/docs/filter-config.md new file mode 100644 index 00000000..ef4014e5 --- /dev/null +++ b/site/docs/filter-config.md @@ -0,0 +1,4 @@ +--- +id: filter-config +title: filter +--- diff --git a/site/docs/filter-option.md b/site/docs/filter-option.md new file mode 100644 index 00000000..f4ae8a9c --- /dev/null +++ b/site/docs/filter-option.md @@ -0,0 +1,4 @@ +--- +id: filter-option +title: --filter +--- diff --git a/site/docs/fix-mismatches.md b/site/docs/fix-mismatches.md new file mode 100644 index 00000000..8c2a3a49 --- /dev/null +++ b/site/docs/fix-mismatches.md @@ -0,0 +1,4 @@ +--- +id: fix-mismatches +title: fix-mismatches +--- diff --git a/site/docs/format.md b/site/docs/format.md new file mode 100644 index 00000000..77ee8515 --- /dev/null +++ b/site/docs/format.md @@ -0,0 +1,4 @@ +--- +id: format +title: format +--- diff --git a/site/docs/indent-config.md b/site/docs/indent-config.md new file mode 100644 index 00000000..c3c5acdc --- /dev/null +++ b/site/docs/indent-config.md @@ -0,0 +1,4 @@ +--- +id: indent-config +title: indent +--- diff --git a/site/docs/indent-option.md b/site/docs/indent-option.md new file mode 100644 index 00000000..72e450c4 --- /dev/null +++ b/site/docs/indent-option.md @@ -0,0 +1,4 @@ +--- +id: indent-option +title: --indent +--- diff --git a/site/docs/installation.md b/site/docs/installation.md new file mode 100644 index 00000000..95409e2c --- /dev/null +++ b/site/docs/installation.md @@ -0,0 +1,6 @@ +--- +id: installation +title: Installation +--- + +sdasdasd diff --git a/site/docs/intro.md b/site/docs/intro.md deleted file mode 100644 index 8a2e69d9..00000000 --- a/site/docs/intro.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -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 16.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. diff --git a/site/docs/lint-semver-ranges.md b/site/docs/lint-semver-ranges.md new file mode 100644 index 00000000..5677c454 --- /dev/null +++ b/site/docs/lint-semver-ranges.md @@ -0,0 +1,4 @@ +--- +id: lint-semver-ranges +title: lint-semver-ranges +--- diff --git a/site/docs/list-mismatches.md b/site/docs/list-mismatches.md new file mode 100644 index 00000000..9dbda20e --- /dev/null +++ b/site/docs/list-mismatches.md @@ -0,0 +1,4 @@ +--- +id: list-mismatches +title: list-mismatches +--- diff --git a/site/docs/list.md b/site/docs/list.md new file mode 100644 index 00000000..2ef10152 --- /dev/null +++ b/site/docs/list.md @@ -0,0 +1,7 @@ +--- +id: list +title: list +--- + +x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x +x x x x x x x x x x x x x x x x x x x x x x x x diff --git a/site/docs/semver-groups-config.md b/site/docs/semver-groups-config.md new file mode 100644 index 00000000..08a4e466 --- /dev/null +++ b/site/docs/semver-groups-config.md @@ -0,0 +1,4 @@ +--- +id: semver-groups-config +title: semverGroups +--- diff --git a/site/docs/semver-range-config.md b/site/docs/semver-range-config.md new file mode 100644 index 00000000..69813f12 --- /dev/null +++ b/site/docs/semver-range-config.md @@ -0,0 +1,4 @@ +--- +id: semver-range-config +title: semverRange +--- diff --git a/site/docs/semver-range-option.md b/site/docs/semver-range-option.md new file mode 100644 index 00000000..957bf6a7 --- /dev/null +++ b/site/docs/semver-range-option.md @@ -0,0 +1,4 @@ +--- +id: semver-range-option +title: --semverRange +--- diff --git a/site/docs/set-semver-ranges.md b/site/docs/set-semver-ranges.md new file mode 100644 index 00000000..8ee013ea --- /dev/null +++ b/site/docs/set-semver-ranges.md @@ -0,0 +1,4 @@ +--- +id: set-semver-ranges +title: set-semver-ranges +--- diff --git a/site/docs/sort-az-config.md b/site/docs/sort-az-config.md new file mode 100644 index 00000000..9edfd8f4 --- /dev/null +++ b/site/docs/sort-az-config.md @@ -0,0 +1,4 @@ +--- +id: sort-az-config +title: sortAz +--- diff --git a/site/docs/sort-first-config.md b/site/docs/sort-first-config.md new file mode 100644 index 00000000..923ed586 --- /dev/null +++ b/site/docs/sort-first-config.md @@ -0,0 +1,4 @@ +--- +id: sort-first-config +title: sortFirst +--- diff --git a/site/docs/source-config.md b/site/docs/source-config.md new file mode 100644 index 00000000..814e3a23 --- /dev/null +++ b/site/docs/source-config.md @@ -0,0 +1,4 @@ +--- +id: source-config +title: source +--- diff --git a/site/docs/source-option.md b/site/docs/source-option.md new file mode 100644 index 00000000..3fb03297 --- /dev/null +++ b/site/docs/source-option.md @@ -0,0 +1,4 @@ +--- +id: source-option +title: --source +--- diff --git a/site/docs/tutorial-basics/_category_.json b/site/docs/tutorial-basics/_category_.json deleted file mode 100644 index 2e6db55b..00000000 --- a/site/docs/tutorial-basics/_category_.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "label": "Tutorial - Basics", - "position": 2, - "link": { - "type": "generated-index", - "description": "5 minutes to learn the most important Docusaurus concepts." - } -} diff --git a/site/docs/tutorial-basics/congratulations.md b/site/docs/tutorial-basics/congratulations.md deleted file mode 100644 index 04771a00..00000000 --- a/site/docs/tutorial-basics/congratulations.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -sidebar_position: 6 ---- - -# Congratulations! - -You have just learned the **basics of Docusaurus** and made some changes to the **initial template**. - -Docusaurus has **much more to offer**! - -Have **5 more minutes**? Take a look at **[versioning](../tutorial-extras/manage-docs-versions.md)** and **[i18n](../tutorial-extras/translate-your-site.md)**. - -Anything **unclear** or **buggy** in this tutorial? [Please report it!](https://github.com/facebook/docusaurus/discussions/4610) - -## What's next? - -- Read the [official documentation](https://docusaurus.io/) -- Modify your site configuration with [`docusaurus.config.js`](https://docusaurus.io/docs/api/docusaurus-config) -- Add navbar and footer items with [`themeConfig`](https://docusaurus.io/docs/api/themes/configuration) -- Add a custom [Design and Layout](https://docusaurus.io/docs/styling-layout) -- Add a [search bar](https://docusaurus.io/docs/search) -- Find inspirations in the [Docusaurus showcase](https://docusaurus.io/showcase) -- Get involved in the [Docusaurus Community](https://docusaurus.io/community/support) diff --git a/site/docs/tutorial-basics/create-a-blog-post.md b/site/docs/tutorial-basics/create-a-blog-post.md deleted file mode 100644 index ea472bba..00000000 --- a/site/docs/tutorial-basics/create-a-blog-post.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -sidebar_position: 3 ---- - -# Create a Blog Post - -Docusaurus creates a **page for each blog post**, but also a **blog index page**, a **tag system**, an **RSS** feed... - -## Create your first Post - -Create a file at `blog/2021-02-28-greetings.md`: - -```md title="blog/2021-02-28-greetings.md" ---- -slug: greetings -title: Greetings! -authors: - - name: Joel Marcey - title: Co-creator of Docusaurus 1 - url: https://github.com/JoelMarcey - image_url: https://github.com/JoelMarcey.png - - name: Sébastien Lorber - title: Docusaurus maintainer - url: https://sebastienlorber.com - image_url: https://github.com/slorber.png -tags: [greetings] ---- - -Congratulations, you have made your first post! - -Feel free to play around and edit this post as much you like. -``` - -A new blog post is now available at [http://localhost:3000/blog/greetings](http://localhost:3000/blog/greetings). diff --git a/site/docs/tutorial-basics/create-a-document.md b/site/docs/tutorial-basics/create-a-document.md deleted file mode 100644 index ffddfa8e..00000000 --- a/site/docs/tutorial-basics/create-a-document.md +++ /dev/null @@ -1,57 +0,0 @@ ---- -sidebar_position: 2 ---- - -# Create a Document - -Documents are **groups of pages** connected through: - -- a **sidebar** -- **previous/next navigation** -- **versioning** - -## Create your first Doc - -Create a Markdown file at `docs/hello.md`: - -```md title="docs/hello.md" -# Hello - -This is my **first Docusaurus document**! -``` - -A new document is now available at [http://localhost:3000/docs/hello](http://localhost:3000/docs/hello). - -## Configure the Sidebar - -Docusaurus automatically **creates a sidebar** from the `docs` folder. - -Add metadata to customize the sidebar label and position: - -```md title="docs/hello.md" {1-4} ---- -sidebar_label: 'Hi!' -sidebar_position: 3 ---- - -# Hello - -This is my **first Docusaurus document**! -``` - -It is also possible to create your sidebar explicitly in `sidebars.js`: - -```js title="sidebars.js" -module.exports = { - tutorialSidebar: [ - 'intro', - // highlight-next-line - 'hello', - { - type: 'category', - label: 'Tutorial', - items: ['tutorial-basics/create-a-document'], - }, - ], -}; -``` diff --git a/site/docs/tutorial-basics/create-a-page.md b/site/docs/tutorial-basics/create-a-page.md deleted file mode 100644 index 20e2ac30..00000000 --- a/site/docs/tutorial-basics/create-a-page.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -sidebar_position: 1 ---- - -# Create a Page - -Add **Markdown or React** files to `src/pages` to create a **standalone page**: - -- `src/pages/index.js` → `localhost:3000/` -- `src/pages/foo.md` → `localhost:3000/foo` -- `src/pages/foo/bar.js` → `localhost:3000/foo/bar` - -## Create your first React Page - -Create a file at `src/pages/my-react-page.js`: - -```jsx title="src/pages/my-react-page.js" -import React from 'react'; -import Layout from '@theme/Layout'; - -export default function MyReactPage() { - return ( - -

My React page

-

This is a React page

-
- ); -} -``` - -A new page is now available at [http://localhost:3000/my-react-page](http://localhost:3000/my-react-page). - -## Create your first Markdown Page - -Create a file at `src/pages/my-markdown-page.md`: - -```mdx title="src/pages/my-markdown-page.md" -# My Markdown page - -This is a Markdown page -``` - -A new page is now available at [http://localhost:3000/my-markdown-page](http://localhost:3000/my-markdown-page). diff --git a/site/docs/tutorial-basics/deploy-your-site.md b/site/docs/tutorial-basics/deploy-your-site.md deleted file mode 100644 index 1c50ee06..00000000 --- a/site/docs/tutorial-basics/deploy-your-site.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -sidebar_position: 5 ---- - -# Deploy your site - -Docusaurus is a **static-site-generator** (also called **[Jamstack](https://jamstack.org/)**). - -It builds your site as simple **static HTML, JavaScript and CSS files**. - -## Build your site - -Build your site **for production**: - -```bash -npm run build -``` - -The static files are generated in the `build` folder. - -## Deploy your site - -Test your production build locally: - -```bash -npm run serve -``` - -The `build` folder is now served at [http://localhost:3000/](http://localhost:3000/). - -You can now deploy the `build` folder **almost anywhere** easily, **for free** or very small cost (read the **[Deployment Guide](https://docusaurus.io/docs/deployment)**). diff --git a/site/docs/tutorial-basics/markdown-features.mdx b/site/docs/tutorial-basics/markdown-features.mdx deleted file mode 100644 index 0337f34d..00000000 --- a/site/docs/tutorial-basics/markdown-features.mdx +++ /dev/null @@ -1,150 +0,0 @@ ---- -sidebar_position: 4 ---- - -# Markdown Features - -Docusaurus supports **[Markdown](https://daringfireball.net/projects/markdown/syntax)** and a few **additional features**. - -## Front Matter - -Markdown documents have metadata at the top called [Front Matter](https://jekyllrb.com/docs/front-matter/): - -```text title="my-doc.md" -// highlight-start ---- -id: my-doc-id -title: My document title -description: My document description -slug: /my-custom-url ---- -// highlight-end - -## Markdown heading - -Markdown text with [links](./hello.md) -``` - -## Links - -Regular Markdown links are supported, using url paths or relative file paths. - -```md -Let's see how to [Create a page](/create-a-page). -``` - -```md -Let's see how to [Create a page](./create-a-page.md). -``` - -**Result:** Let's see how to [Create a page](./create-a-page.md). - -## Images - -Regular Markdown images are supported. - -You can use absolute paths to reference images in the static directory (`static/img/docusaurus.png`): - -```md -![Docusaurus logo](/img/docusaurus.png) -``` - -![Docusaurus logo](/img/docusaurus.png) - -You can reference images relative to the current file as well. This is particularly useful to colocate images close to the Markdown files using them: - -```md -![Docusaurus logo](./img/docusaurus.png) -``` - -## Code Blocks - -Markdown code blocks are supported with Syntax highlighting. - - ```jsx title="src/components/HelloDocusaurus.js" - function HelloDocusaurus() { - return ( -

Hello, Docusaurus!

- ) - } - ``` - -```jsx title="src/components/HelloDocusaurus.js" -function HelloDocusaurus() { - return

Hello, Docusaurus!

; -} -``` - -## Admonitions - -Docusaurus has a special syntax to create admonitions and callouts: - - :::tip My tip - - Use this awesome feature option - - ::: - - :::danger Take care - - This action is dangerous - - ::: - -:::tip My tip - -Use this awesome feature option - -::: - -:::danger Take care - -This action is dangerous - -::: - -## MDX and React Components - -[MDX](https://mdxjs.com/) can make your documentation more **interactive** and allows using any **React components inside Markdown**: - -```jsx -export const Highlight = ({children, color}) => ( - { - alert(`You clicked the color ${color} with label ${children}`) - }}> - {children} - -); - -This is Docusaurus green ! - -This is Facebook blue ! -``` - -export const Highlight = ({children, color}) => ( - { - alert(`You clicked the color ${color} with label ${children}`); - }}> - {children} - -); - -This is Docusaurus green ! - -This is Facebook blue ! diff --git a/site/docs/tutorial-extras/_category_.json b/site/docs/tutorial-extras/_category_.json deleted file mode 100644 index a8ffcc19..00000000 --- a/site/docs/tutorial-extras/_category_.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "label": "Tutorial - Extras", - "position": 3, - "link": { - "type": "generated-index" - } -} diff --git a/site/docs/tutorial-extras/img/docsVersionDropdown.png b/site/docs/tutorial-extras/img/docsVersionDropdown.png deleted file mode 100644 index 97e41646..00000000 Binary files a/site/docs/tutorial-extras/img/docsVersionDropdown.png and /dev/null differ diff --git a/site/docs/tutorial-extras/img/localeDropdown.png b/site/docs/tutorial-extras/img/localeDropdown.png deleted file mode 100644 index e257edc1..00000000 Binary files a/site/docs/tutorial-extras/img/localeDropdown.png and /dev/null differ diff --git a/site/docs/tutorial-extras/manage-docs-versions.md b/site/docs/tutorial-extras/manage-docs-versions.md deleted file mode 100644 index e12c3f34..00000000 --- a/site/docs/tutorial-extras/manage-docs-versions.md +++ /dev/null @@ -1,55 +0,0 @@ ---- -sidebar_position: 1 ---- - -# Manage Docs Versions - -Docusaurus can manage multiple versions of your docs. - -## Create a docs version - -Release a version 1.0 of your project: - -```bash -npm run docusaurus docs:version 1.0 -``` - -The `docs` folder is copied into `versioned_docs/version-1.0` and `versions.json` is created. - -Your docs now have 2 versions: - -- `1.0` at `http://localhost:3000/docs/` for the version 1.0 docs -- `current` at `http://localhost:3000/docs/next/` for the **upcoming, unreleased docs** - -## Add a Version Dropdown - -To navigate seamlessly across versions, add a version dropdown. - -Modify the `docusaurus.config.js` file: - -```js title="docusaurus.config.js" -module.exports = { - themeConfig: { - navbar: { - items: [ - // highlight-start - { - type: 'docsVersionDropdown', - }, - // highlight-end - ], - }, - }, -}; -``` - -The docs version dropdown appears in your navbar: - -![Docs Version Dropdown](./img/docsVersionDropdown.png) - -## Update an existing version - -It is possible to edit versioned docs in their respective folder: - -- `versioned_docs/version-1.0/hello.md` updates `http://localhost:3000/docs/hello` -- `docs/hello.md` updates `http://localhost:3000/docs/next/hello` diff --git a/site/docs/tutorial-extras/translate-your-site.md b/site/docs/tutorial-extras/translate-your-site.md deleted file mode 100644 index caeaffb0..00000000 --- a/site/docs/tutorial-extras/translate-your-site.md +++ /dev/null @@ -1,88 +0,0 @@ ---- -sidebar_position: 2 ---- - -# Translate your site - -Let's translate `docs/intro.md` to French. - -## Configure i18n - -Modify `docusaurus.config.js` to add support for the `fr` locale: - -```js title="docusaurus.config.js" -module.exports = { - i18n: { - defaultLocale: 'en', - locales: ['en', 'fr'], - }, -}; -``` - -## Translate a doc - -Copy the `docs/intro.md` file to the `i18n/fr` folder: - -```bash -mkdir -p i18n/fr/docusaurus-plugin-content-docs/current/ - -cp docs/intro.md i18n/fr/docusaurus-plugin-content-docs/current/intro.md -``` - -Translate `i18n/fr/docusaurus-plugin-content-docs/current/intro.md` in French. - -## Start your localized site - -Start your site on the French locale: - -```bash -npm run start -- --locale fr -``` - -Your localized site is accessible at [http://localhost:3000/fr/](http://localhost:3000/fr/) and the `Getting Started` page is translated. - -:::caution - -In development, you can only use one locale at a same time. - -::: - -## Add a Locale Dropdown - -To navigate seamlessly across languages, add a locale dropdown. - -Modify the `docusaurus.config.js` file: - -```js title="docusaurus.config.js" -module.exports = { - themeConfig: { - navbar: { - items: [ - // highlight-start - { - type: 'localeDropdown', - }, - // highlight-end - ], - }, - }, -}; -``` - -The locale dropdown now appears in your navbar: - -![Locale Dropdown](./img/localeDropdown.png) - -## Build your localized site - -Build your site for a specific locale: - -```bash -npm run build -- --locale fr -``` - -Or build your site to include all the locales at once: - -```bash -npm run build -``` diff --git a/site/docs/types-option.md b/site/docs/types-option.md new file mode 100644 index 00000000..3701fac0 --- /dev/null +++ b/site/docs/types-option.md @@ -0,0 +1,4 @@ +--- +id: types-option +title: --types +--- diff --git a/site/docs/version-groups-config.md b/site/docs/version-groups-config.md new file mode 100644 index 00000000..f0fcfa20 --- /dev/null +++ b/site/docs/version-groups-config.md @@ -0,0 +1,4 @@ +--- +id: version-groups-config +title: versionGroups +--- diff --git a/site/docusaurus.config.js b/site/docusaurus.config.js index d664b650..2e6995b2 100644 --- a/site/docusaurus.config.js +++ b/site/docusaurus.config.js @@ -6,20 +6,21 @@ const darkCodeTheme = require('prism-react-renderer/themes/dracula'); /** @type {import('@docusaurus/types').Config} */ const config = { - title: 'My Site', - tagline: 'Dinosaurs are cool', + title: 'Syncpack', + tagline: 'Consistent dependency versions in large JavaScript Monorepos', favicon: 'img/favicon.ico', // Set the production url of your site here - url: 'https://your-docusaurus-test-site.com', + url: 'https://jamiemason.github.io', // Set the // pathname under which your site is served // For GitHub pages deployment, it is often '//' - baseUrl: '/', + baseUrl: '/syncpack', // GitHub pages deployment config. // If you aren't using GitHub pages, you don't need these. - organizationName: 'facebook', // Usually your GitHub org/user name. - projectName: 'docusaurus', // Usually your repo name. + organizationName: 'JamieMason', // Usually your GitHub org/user name. + projectName: 'syncpack', // Usually your repo name. + trailingSlash: false, onBrokenLinks: 'throw', onBrokenMarkdownLinks: 'warn', @@ -38,18 +39,20 @@ const config = { /** @type {import('@docusaurus/preset-classic').Options} */ ({ docs: { + showLastUpdateAuthor: true, + showLastUpdateTime: true, + path: './docs', + routeBasePath: '/', sidebarPath: require.resolve('./sidebars.js'), // 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/', + editUrl: 'https://github.com/JamieMason/syncpack/tree/master/site/', }, blog: { - showReadingTime: true, + showReadingTime: false, // 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/', + editUrl: 'https://github.com/JamieMason/syncpack/tree/master/site/', }, theme: { customCss: require.resolve('./src/css/custom.css'), @@ -63,22 +66,24 @@ const config = { ({ // Replace with your project's social card image: 'img/docusaurus-social-card.jpg', + colorMode: { + respectPrefersColorScheme: true, + }, navbar: { - title: 'My Site', + title: 'Syncpack', logo: { - alt: 'My Site Logo', + alt: 'Syncpack Logo', src: 'img/logo.svg', }, items: [ { type: 'doc', - docId: 'intro', + docId: 'installation', position: 'left', - label: 'Tutorial', + label: 'Docs', }, - {to: '/blog', label: 'Blog', position: 'left'}, { - href: 'https://github.com/facebook/docusaurus', + href: 'https://github.com/JamieMason/syncpack', label: 'GitHub', position: 'right', }, @@ -88,29 +93,16 @@ const config = { style: 'dark', links: [ { - title: 'Docs', + title: 'Community', items: [ { - label: 'Tutorial', - to: '/docs/intro', + label: 'Twitter', + href: 'https://twitter.com/fold_left', }, - ], - }, - { - title: 'Community', - items: [ { label: 'Stack Overflow', href: 'https://stackoverflow.com/questions/tagged/docusaurus', }, - { - label: 'Discord', - href: 'https://discordapp.com/invite/docusaurus', - }, - { - label: 'Twitter', - href: 'https://twitter.com/docusaurus', - }, ], }, { @@ -122,12 +114,12 @@ const config = { }, { label: 'GitHub', - href: 'https://github.com/facebook/docusaurus', + href: 'https://github.com/JamieMason/syncpack', }, ], }, ], - copyright: `Copyright © ${new Date().getFullYear()} My Project, Inc. Built with Docusaurus.`, + copyright: `Copyright © ${new Date().getFullYear()} Jamie Mason.`, }, prism: { theme: lightCodeTheme, diff --git a/site/package.json b/site/package.json index 28f70aba..6df6a157 100644 --- a/site/package.json +++ b/site/package.json @@ -1,33 +1,6 @@ { "name": "site", "version": "0.0.0", - "private": true, - "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": { - "@docusaurus/core": "2.3.1", - "@docusaurus/preset-classic": "2.3.1", - "@mdx-js/react": "^1.6.22", - "clsx": "^1.2.1", - "prism-react-renderer": "^1.3.5", - "react": "^17.0.2", - "react-dom": "^17.0.2" - }, - "devDependencies": { - "@docusaurus/module-type-aliases": "2.3.1", - "@tsconfig/docusaurus": "^1.0.5", - "typescript": "^4.7.4" - }, "browserslist": { "production": [ ">0.5%", @@ -40,7 +13,34 @@ "last 1 safari version" ] }, + "dependencies": { + "@docusaurus/core": "2.3.1", + "@docusaurus/preset-classic": "2.3.1", + "@mdx-js/react": "1.6.22", + "clsx": "1.2.1", + "prism-react-renderer": "1.3.5", + "react": "17.0.2", + "react-dom": "17.0.2" + }, + "devDependencies": { + "@docusaurus/module-type-aliases": "2.3.1", + "@tsconfig/docusaurus": "1.0.5", + "typescript": "4.7.4" + }, "engines": { "node": ">=16.14" + }, + "private": true, + "scripts": { + "build": "docusaurus build", + "clear": "docusaurus clear", + "deploy": "docusaurus deploy", + "docusaurus": "docusaurus", + "serve": "docusaurus serve", + "start": "docusaurus start", + "swizzle": "docusaurus swizzle", + "typecheck": "tsc", + "write-heading-ids": "docusaurus write-heading-ids", + "write-translations": "docusaurus write-translations" } } diff --git a/site/sidebars.js b/site/sidebars.js index 9ab54c24..91e18163 100644 --- a/site/sidebars.js +++ b/site/sidebars.js @@ -13,21 +13,37 @@ /** @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: [ - 'intro', - 'hello', - { - type: 'category', - label: 'Tutorial', - items: ['tutorial-basics/create-a-document'], - }, - ], - */ + docs: { + 'Introduction': ['installation'], + 'CLI Commands': [ + 'fix-mismatches', + 'format', + 'lint-semver-ranges', + 'list-mismatches', + 'list', + 'set-semver-ranges', + ], + 'CLI Options': [ + 'config-option', + 'filter-option', + 'indent-option', + 'semver-range-option', + 'source-option', + 'types-option', + ], + 'Configuration File': [ + 'custom-types-config', + 'dependency-types-config', + 'filter-config', + 'indent-config', + 'semver-groups-config', + 'semver-range-config', + 'sort-az-config', + 'sort-first-config', + 'source-config', + 'version-groups-config', + ], + }, }; module.exports = sidebars; diff --git a/site/src/components/HomepageFeatures/index.tsx b/site/src/components/HomepageFeatures/index.tsx index 91ef4601..64820a1d 100644 --- a/site/src/components/HomepageFeatures/index.tsx +++ b/site/src/components/HomepageFeatures/index.tsx @@ -8,40 +8,9 @@ type FeatureItem = { description: JSX.Element; }; -const FeatureList: FeatureItem[] = [ - { - title: 'Easy to Use', - Svg: require('@site/static/img/undraw_docusaurus_mountain.svg').default, - description: ( - <> - Docusaurus was designed from the ground up to be easily installed and - used to get your website up and running quickly. - - ), - }, - { - title: 'Focus on What Matters', - Svg: require('@site/static/img/undraw_docusaurus_tree.svg').default, - description: ( - <> - Docusaurus lets you focus on your docs, and we'll do the chores. Go - ahead and move your docs into the docs directory. - - ), - }, - { - title: 'Powered by React', - Svg: require('@site/static/img/undraw_docusaurus_react.svg').default, - description: ( - <> - Extend or customize your website layout by reusing React. Docusaurus can - be extended while reusing the same header and footer. - - ), - }, -]; +const FeatureList: FeatureItem[] = []; -function Feature({title, Svg, description}: FeatureItem) { +function Feature({ title, Svg, description }: FeatureItem) { return (
diff --git a/site/src/pages/index.tsx b/site/src/pages/index.tsx index 305139fb..98dec4a7 100644 --- a/site/src/pages/index.tsx +++ b/site/src/pages/index.tsx @@ -4,11 +4,10 @@ import Link from '@docusaurus/Link'; import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; import Layout from '@theme/Layout'; import HomepageFeatures from '@site/src/components/HomepageFeatures'; - import styles from './index.module.css'; function HomepageHeader() { - const {siteConfig} = useDocusaurusContext(); + const { siteConfig } = useDocusaurusContext(); return (
@@ -17,8 +16,9 @@ function HomepageHeader() {
- Docusaurus Tutorial - 5min ⏱️ + to="/installation" + > + Get Started
@@ -27,11 +27,12 @@ function HomepageHeader() { } export default function Home(): JSX.Element { - const {siteConfig} = useDocusaurusContext(); + const { siteConfig } = useDocusaurusContext(); return ( + title={`${siteConfig.title}`} + description="Consistent dependency versions in large JavaScript Monorepos" + >
diff --git a/site/static/img/logo.svg b/site/static/img/logo.svg index 9db6d0d0..4287480e 100644 --- a/site/static/img/logo.svg +++ b/site/static/img/logo.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/site/yarn.lock b/site/yarn.lock index ebb27219..9b3cf572 100644 --- a/site/yarn.lock +++ b/site/yarn.lock @@ -1728,7 +1728,7 @@ unist-builder "2.0.3" unist-util-visit "2.0.3" -"@mdx-js/react@^1.6.22": +"@mdx-js/react@1.6.22", "@mdx-js/react@^1.6.22": version "1.6.22" resolved "https://registry.yarnpkg.com/@mdx-js/react/-/react-1.6.22.tgz#ae09b4744fddc74714ee9f9d6f17a66e77c43573" integrity sha512-TDoPum4SHdfPiGSAaRBw7ECyI8VaHpK8GJugbJIJuqyh6kzw9ZLJZW3HGL3NNrJGxcAixUvqROm+YuQOo5eXtg== @@ -1918,10 +1918,10 @@ resolved "https://registry.yarnpkg.com/@trysound/sax/-/sax-0.2.0.tgz#cccaab758af56761eb7bf37af6f03f326dd798ad" integrity sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA== -"@tsconfig/docusaurus@^1.0.5": - version "1.0.6" - resolved "https://registry.yarnpkg.com/@tsconfig/docusaurus/-/docusaurus-1.0.6.tgz#7305a7fa590decc0d5968500234e95fd68788978" - integrity sha512-1QxDaP54hpzM6bq9E+yFEo4F9WbWHhsDe4vktZXF/iDlc9FqGr9qlg+3X/nuKQXx8QxHV7ue8NXFazzajsxFBA== +"@tsconfig/docusaurus@1.0.5": + version "1.0.5" + resolved "https://registry.yarnpkg.com/@tsconfig/docusaurus/-/docusaurus-1.0.5.tgz#5298c5b0333c6263f06c3149b38ebccc9f169a4e" + integrity sha512-KM/TuJa9fugo67dTGx+ktIqf3fVc077J6jwHu845Hex4EQf7LABlNonP/mohDKT0cmncdtlYVHHF74xR/YpThg== "@types/body-parser@*": version "1.19.2" @@ -2919,7 +2919,7 @@ clone-response@^1.0.2: dependencies: mimic-response "^1.0.0" -clsx@^1.2.1: +clsx@1.2.1, clsx@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/clsx/-/clsx-1.2.1.tgz#0ddc4a20a549b59c93a4116bb26f5294ca17dc12" integrity sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg== @@ -5841,7 +5841,7 @@ pretty-time@^1.1.0: resolved "https://registry.yarnpkg.com/pretty-time/-/pretty-time-1.1.0.tgz#ffb7429afabb8535c346a34e41873adf3d74dd0e" integrity sha512-28iF6xPQrP8Oa6uxE6a1biz+lWeTOAPKggvjB8HAs6nVMKZwf5bG++632Dx614hIWgUPkgivRfG+a8uAXGTIbA== -prism-react-renderer@^1.3.5: +prism-react-renderer@1.3.5, prism-react-renderer@^1.3.5: version "1.3.5" resolved "https://registry.yarnpkg.com/prism-react-renderer/-/prism-react-renderer-1.3.5.tgz#786bb69aa6f73c32ba1ee813fbe17a0115435085" integrity sha512-IJ+MSwBWKG+SM3b2SUfdrhC+gu01QkV2KmRQgREThBfSQRoufqRfxfHUxpG1WcaFjP+kojcFyO9Qqtpgt3qLCg== @@ -6021,7 +6021,7 @@ react-dev-utils@^12.0.1: strip-ansi "^6.0.1" text-table "^0.2.0" -react-dom@^17.0.2: +react-dom@17.0.2: version "17.0.2" resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-17.0.2.tgz#ecffb6845e3ad8dbfcdc498f0d0a939736502c23" integrity sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA== @@ -6122,7 +6122,7 @@ react-textarea-autosize@^8.3.2: use-composed-ref "^1.3.0" use-latest "^1.2.1" -react@^17.0.2: +react@17.0.2: version "17.0.2" resolved "https://registry.yarnpkg.com/react/-/react-17.0.2.tgz#d0b5cc516d29eb3eee383f75b62864cfb6800037" integrity sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA== @@ -7030,10 +7030,10 @@ typedarray-to-buffer@^3.1.5: dependencies: is-typedarray "^1.0.0" -typescript@^4.7.4: - version "4.9.5" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" - integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== +typescript@4.7.4: + version "4.7.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235" + integrity sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ== ua-parser-js@^0.7.30: version "0.7.33"