Skip to content

Commit

Permalink
Merge branch 'main' into ozaki/mdx-unused-directives
Browse files Browse the repository at this point in the history
  • Loading branch information
slorber committed Oct 23, 2023
2 parents 1b59e60 + aa958f0 commit b21537e
Show file tree
Hide file tree
Showing 313 changed files with 4,606 additions and 4,841 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/argos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ jobs:
steps:
- name: Check out repository code
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
with:
# A minimal fetch-depth of 2 is required
# to automatically detect branch in @argos-ci/cli
fetch-depth: 2

- name: Use Node.js
uses: actions/setup-node@v3
Expand All @@ -49,7 +45,3 @@ jobs:

- name: Take Argos screenshots
run: yarn argos:screenshot

- name: Upload Argos screenshots
continue-on-error: true
run: yarn argos:upload
2 changes: 1 addition & 1 deletion admin/new.docusaurus.io/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "new.docusaurus.io",
"version": "3.0.0-beta.0",
"version": "3.0.0-rc.0",
"private": true,
"scripts": {
"start": "npx --package netlify-cli netlify dev"
Expand Down
5 changes: 2 additions & 3 deletions argos/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "argos",
"version": "3.0.0-beta.0",
"version": "3.0.0-rc.0",
"description": "Argos visual diff tests",
"license": "MIT",
"private": true,
Expand All @@ -10,8 +10,7 @@
"report": "playwright show-report"
},
"dependencies": {
"@argos-ci/cli": "^0.4.6",
"@argos-ci/playwright": "^0.0.6",
"@argos-ci/playwright": "1.0.0-alpha.4",
"@playwright/test": "^1.36.1",
"cheerio": "^1.0.0-rc.12"
}
Expand Down
2 changes: 2 additions & 0 deletions argos/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import type {PlaywrightTestConfig} from '@playwright/test';
const config: PlaywrightTestConfig = {
testDir: './tests',

reporter: [['list'], ['@argos-ci/playwright/reporter']],

// Run website production built
// Need to run "yarn website:build:fast" before
webServer: {
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "3.0.0-beta.0",
"version": "3.0.0-rc.0",
"npmClient": "yarn",
"useWorkspaces": true,
"useNx": false,
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
"crowdin:download": "crowdin download --config ./crowdin-v2.yaml",
"crowdin:download:website": "yarn crowdin:download --language fr --language ko --language pt-BR --language zh-CN --language ja",
"argos:screenshot": "yarn workspace argos screenshot",
"argos:upload": "yarn workspace argos upload",
"canary": "yarn canary:bumpVersion && yarn canary:publish",
"canary:version": "echo 0.0.0-`git rev-list --count HEAD`+`git rev-parse --short HEAD`",
"canary:bumpVersion": "yarn lerna version `yarn --silent canary:version` --exact --no-push --yes",
Expand Down
6 changes: 3 additions & 3 deletions packages/create-docusaurus/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-docusaurus",
"version": "3.0.0-beta.0",
"version": "3.0.0-rc.0",
"description": "Create Docusaurus apps easily.",
"type": "module",
"repository": {
Expand All @@ -22,8 +22,8 @@
},
"license": "MIT",
"dependencies": {
"@docusaurus/logger": "3.0.0-beta.0",
"@docusaurus/utils": "3.0.0-beta.0",
"@docusaurus/logger": "3.0.0-rc.0",
"@docusaurus/utils": "3.0.0-rc.0",
"commander": "^5.1.0",
"fs-extra": "^11.1.1",
"lodash": "^4.17.21",
Expand Down
11 changes: 0 additions & 11 deletions packages/create-docusaurus/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,17 +157,6 @@ async function copyTemplate(
): Promise<void> {
await fs.copy(path.join(templatesDir, 'shared'), dest);

// TypeScript variants will copy duplicate resources like CSS & config from
// base template
if (typescript) {
await fs.copy(template.path, dest, {
filter: async (filePath) =>
(await fs.stat(filePath)).isDirectory() ||
path.extname(filePath) === '.css' ||
path.basename(filePath) === 'docusaurus.config.js',
});
}

await fs.copy(typescript ? template.tsVariantPath! : template.path, dest, {
// Symlinks don't exist in published npm packages anymore, so this is only
// to prevent errors during local testing
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
import {themes as prismThemes} from 'prism-react-renderer';
import type {Config} from '@docusaurus/types';
import type * as Preset from '@docusaurus/preset-classic';

const config: Config = {
title: 'My Site',
tagline: 'Dinosaurs are cool',
favicon: 'img/favicon.ico',

// Set the production url of your site here
url: 'https://your-docusaurus-site.example.com',
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/',

// 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.

onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',

// 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',
{
docs: {
sidebarPath: './sidebars.ts',
// 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/',
},
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',
},
} satisfies Preset.Options,
],
],

themeConfig: {
// Replace with your project's social card
image: 'img/docusaurus-social-card.jpg',
navbar: {
title: 'My Site',
logo: {
alt: 'My Site Logo',
src: 'img/logo.svg',
},
items: [
{
type: 'docSidebar',
sidebarId: 'tutorialSidebar',
position: 'left',
label: 'Tutorial',
},
{to: '/blog', label: 'Blog', position: 'left'},
{
href: 'https://github.com/facebook/docusaurus',
label: 'GitHub',
position: 'right',
},
],
},
footer: {
style: 'dark',
links: [
{
title: 'Docs',
items: [
{
label: 'Tutorial',
to: '/docs/intro',
},
],
},
{
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',
},
],
},
{
title: 'More',
items: [
{
label: 'Blog',
to: '/blog',
},
{
label: 'GitHub',
href: 'https://github.com/facebook/docusaurus',
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} My Project, Inc. Built with Docusaurus.`,
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
},
} satisfies Preset.ThemeConfig,
};

export default config;
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "docusaurus-2-classic-typescript-template",
"version": "3.0.0-beta.0",
"version": "3.0.0-rc.0",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
Expand All @@ -15,17 +15,18 @@
"typecheck": "tsc"
},
"dependencies": {
"@docusaurus/core": "3.0.0-beta.0",
"@docusaurus/preset-classic": "3.0.0-beta.0",
"@docusaurus/core": "3.0.0-rc.0",
"@docusaurus/preset-classic": "3.0.0-rc.0",
"@mdx-js/react": "^2.3.0",
"clsx": "^1.2.1",
"prism-react-renderer": "^2.1.0",
"react": "^18.0.0",
"react-dom": "^18.0.0"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "3.0.0-beta.0",
"@docusaurus/tsconfig": "3.0.0-beta.0",
"@docusaurus/module-type-aliases": "3.0.0-rc.0",
"@docusaurus/tsconfig": "3.0.0-rc.0",
"@docusaurus/types": "3.0.0-rc.0",
"typescript": "~5.2.2"
},
"browserslist": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import type {SidebarsConfig} from '@docusaurus/plugin-content-docs';

/**
* 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.
*/
const sidebars: SidebarsConfig = {
// 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'],
},
],
*/
};

export default sidebars;

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@
// There are various equivalent ways to declare your Docusaurus config.
// See: https://docusaurus.io/docs/api/docusaurus-config

const {themes} = require('prism-react-renderer');

const lightCodeTheme = themes.github;
const darkCodeTheme = themes.dracula;
import {themes as prismThemes} from 'prism-react-renderer';

/** @type {import('@docusaurus/types').Config} */
const config = {
Expand Down Expand Up @@ -43,7 +40,7 @@ const config = {
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
sidebarPath: require.resolve('./sidebars.js'),
sidebarPath: './sidebars.js',
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl:
Expand All @@ -57,7 +54,7 @@ const config = {
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
customCss: './src/css/custom.css',
},
}),
],
Expand Down Expand Up @@ -135,10 +132,10 @@ const config = {
copyright: `Copyright © ${new Date().getFullYear()} My Project, Inc. Built with Docusaurus.`,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
},
}),
};

module.exports = config;
export default config;
9 changes: 5 additions & 4 deletions packages/create-docusaurus/templates/classic/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "docusaurus-2-classic-template",
"version": "3.0.0-beta.0",
"version": "3.0.0-rc.0",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
Expand All @@ -14,16 +14,17 @@
"write-heading-ids": "docusaurus write-heading-ids"
},
"dependencies": {
"@docusaurus/core": "3.0.0-beta.0",
"@docusaurus/preset-classic": "3.0.0-beta.0",
"@docusaurus/core": "3.0.0-rc.0",
"@docusaurus/preset-classic": "3.0.0-rc.0",
"@mdx-js/react": "^2.3.0",
"clsx": "^1.2.1",
"prism-react-renderer": "^2.1.0",
"react": "^18.0.0",
"react-dom": "^18.0.0"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "3.0.0-beta.0"
"@docusaurus/module-type-aliases": "3.0.0-rc.0",
"@docusaurus/types": "3.0.0-rc.0"
},
"browserslist": {
"production": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ const sidebars = {
*/
};

module.exports = sidebars;
export default sidebars;
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ This is my **first Docusaurus document**!
It is also possible to create your sidebar explicitly in `sidebars.js`:

```js title="sidebars.js"
module.exports = {
export default {
tutorialSidebar: [
'intro',
// highlight-next-line
Expand Down
Loading

0 comments on commit b21537e

Please sign in to comment.