Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
datlechin authored Oct 25, 2021
2 parents cbf8a38 + 11acc2d commit d1b4fc1
Show file tree
Hide file tree
Showing 205 changed files with 3,359 additions and 1,950 deletions.
4 changes: 3 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ module.exports = {
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
'airbnb',
'prettier',
'prettier/react',
Expand All @@ -41,6 +42,8 @@ module.exports = {
},
plugins: ['react-hooks', 'header'],
rules: {
'react-hooks/rules-of-hooks': ERROR,
'react-hooks/exhaustive-deps': ERROR,
'class-methods-use-this': OFF, // It's a way of allowing private variables.
'func-names': OFF,
// Ignore certain webpack alias because it can't be resolved
Expand Down Expand Up @@ -77,7 +80,6 @@ module.exports = {
'react/destructuring-assignment': OFF, // Too many lines.
'react/prefer-stateless-function': WARNING,
'react/jsx-props-no-spreading': OFF,
'react-hooks/rules-of-hooks': ERROR,
'react/require-default-props': [ERROR, {ignoreFunctionalComponents: true}],
'@typescript-eslint/no-inferrable-types': OFF,
'import/first': OFF,
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ blank_issues_enabled: false
contact_links:
- name: 🚀 Feature request
url: https://docusaurus.io/feature-requests
about: The Canny board to send us feature requests, vote and measure the interest of users. Useful to submit a featurre request when you have an idea but no concrete api design proposal.
about: The Canny board to send us feature requests, vote and measure the interest of users. Useful to submit a feature request when you have an idea but no concrete API design proposal.
- name: ❓ Simple question - Discord chat
url: https://discord.gg/docusaurus
about: This issue tracker is not for technical support. Please use our Discord chat, and ask the community for help.
Expand Down
80 changes: 80 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,85 @@
# Docusaurus 2 Changelog

## 2.0.0-beta.8 (2021-10-21)

#### :rocket: New Feature

- `docusaurus-plugin-content-blog`
- [#5702](https://github.com/facebook/docusaurus/pull/5702) feat(content-blog): new readingTime plugin option ([@Josh-Cena](https://github.com/Josh-Cena))
- `docusaurus`
- [#5740](https://github.com/facebook/docusaurus/pull/5740) feat(core): write-heading-ids options maintainCasing, overwrite ([@Josh-Cena](https://github.com/Josh-Cena))
- `docusaurus-plugin-content-docs`
- [#5705](https://github.com/facebook/docusaurus/pull/5705) feat(content-docs): new front matter options to customize pagination ([@Josh-Cena](https://github.com/Josh-Cena))

#### :boom: Breaking Change

- `docusaurus-theme-search-algolia`
- [#5751](https://github.com/facebook/docusaurus/pull/5751) fix: stable callbacks in useSearchQuery + refactor ([@slorber](https://github.com/slorber))

#### :bug: Bug Fix

- `docusaurus-plugin-ideal-image`
- [#5760](https://github.com/facebook/docusaurus/pull/5760) fix(ideal-image): fix IdealImage in dev not handling ES import images properly ([@slorber](https://github.com/slorber))
- `docusaurus-theme-classic`
- [#5732](https://github.com/facebook/docusaurus/pull/5732) fix(theme-classic): allow tabs with number as value ([@Josh-Cena](https://github.com/Josh-Cena))
- [#5721](https://github.com/facebook/docusaurus/pull/5721) fix: handle rubber band scrolling in hideable navbar ([@lex111](https://github.com/lex111))
- `docusaurus-theme-search-algolia`
- [#5751](https://github.com/facebook/docusaurus/pull/5751) fix: stable callbacks in useSearchQuery + refactor ([@slorber](https://github.com/slorber))

#### :nail_care: Polish

- `docusaurus-theme-classic`
- [#5717](https://github.com/facebook/docusaurus/pull/5717) refactor: Polish de translation ([@philipp985](https://github.com/philipp985))
- [#5725](https://github.com/facebook/docusaurus/pull/5725) refactor: add missing Turkish translations to theme-classic ([@canercanbaz](https://github.com/canercanbaz))
- [#5723](https://github.com/facebook/docusaurus/pull/5723) refactor(v2): update Vietnamese translations ([@datlechin](https://github.com/datlechin))
- `docusaurus-module-type-aliases`, `docusaurus-plugin-ideal-image`, `docusaurus-theme-classic`, `docusaurus`
- [#5726](https://github.com/facebook/docusaurus/pull/5726) refactor(module-type-aliases): remove fallback aliases ([@Josh-Cena](https://github.com/Josh-Cena))

#### :memo: Documentation

- Other
- [#5755](https://github.com/facebook/docusaurus/pull/5755) docs: rename docusaurus.config.js route + redirects cleanup ([@slorber](https://github.com/slorber))
- [#5750](https://github.com/facebook/docusaurus/pull/5750) docs(v2): Fix typo in using-plugins.md ([@thanasis00](https://github.com/thanasis00))
- [#5727](https://github.com/facebook/docusaurus/pull/5727) docs(v2): Add Fenghua Frontend Developer site to showcase page ([@zxuqian](https://github.com/zxuqian))
- [#5746](https://github.com/facebook/docusaurus/pull/5746) docs: Add plugin-image-zoom ([@ataft](https://github.com/ataft))
- [#5728](https://github.com/facebook/docusaurus/pull/5728) docs: add h4 into toc on certain pages ([@Josh-Cena](https://github.com/Josh-Cena))
- [#5737](https://github.com/facebook/docusaurus/pull/5737) docs: Add Apex FP to showcase ([@ipavlic](https://github.com/ipavlic))
- `docusaurus-plugin-content-blog`
- [#5753](https://github.com/facebook/docusaurus/pull/5753) fix(content-blog): temporarily swallow feed mdxToHtml errors + feed refactor ([@slorber](https://github.com/slorber))

#### :house: Internal

- `docusaurus`
- [#5761](https://github.com/facebook/docusaurus/pull/5761) chore: upgrade html-webpack-plugin, remove terser 4 ([@slorber](https://github.com/slorber))
- `docusaurus-theme-classic`, `docusaurus-theme-common`, `docusaurus-theme-search-algolia`, `docusaurus`
- [#5714](https://github.com/facebook/docusaurus/pull/5714) chore: Enable ESLint rules of hooks + fix new lint errors ([@slorber](https://github.com/slorber))
- Other
- [#5722](https://github.com/facebook/docusaurus/pull/5722) chore: fix gen script to support TS template ([@lex111](https://github.com/lex111))
- [#5730](https://github.com/facebook/docusaurus/pull/5730) chore: fix typos / casing in issue template ([@johnnyreilly](https://github.com/johnnyreilly))
- [#5720](https://github.com/facebook/docusaurus/pull/5720) chore: regenerate beta.7 examples ([@lex111](https://github.com/lex111))
- [#5719](https://github.com/facebook/docusaurus/pull/5719) chore: remove beta.5 docs ([@lex111](https://github.com/lex111))

#### :running_woman: Performance

- `docusaurus`
- [#5748](https://github.com/facebook/docusaurus/pull/5748) refactor: perform shallow clone during deploy ([@nlfurniss](https://github.com/nlfurniss))

#### Committers: 13

- Alexey Pyltsyn ([@lex111](https://github.com/lex111))
- Andrew Taft ([@ataft](https://github.com/ataft))
- Caner Canbaz ([@canercanbaz](https://github.com/canercanbaz))
- Dimi Mikadze ([@DimiMikadze](https://github.com/DimiMikadze))
- Ilija Pavlic ([@ipavlic](https://github.com/ipavlic))
- John Reilly ([@johnnyreilly](https://github.com/johnnyreilly))
- Joshua Chen ([@Josh-Cena](https://github.com/Josh-Cena))
- Nathaniel Furniss ([@nlfurniss](https://github.com/nlfurniss))
- Ngô Quốc Đạt ([@datlechin](https://github.com/datlechin))
- Sébastien Lorber ([@slorber](https://github.com/slorber))
- Thanasis Katsadas ([@thanasis00](https://github.com/thanasis00))
- Xuqian ([@zxuqian](https://github.com/zxuqian))
- [@philipp985](https://github.com/philipp985)

## 2.0.0-beta.7 (2021-10-15)

#### :rocket: New Feature
Expand Down
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": "2.0.0-beta.7",
"version": "2.0.0-beta.8",
"private": true,
"scripts": {
"start": "netlify dev"
Expand Down
10 changes: 8 additions & 2 deletions examples/classic-typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@
"serve": "docusaurus serve",
"write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids",
"typecheck": "tsc",
"dev": "docusaurus start"
},
"dependencies": {
"@docusaurus/core": "2.0.0-beta.7",
"@docusaurus/preset-classic": "2.0.0-beta.7",
"@docusaurus/core": "2.0.0-beta.8",
"@docusaurus/preset-classic": "2.0.0-beta.8",
"@mdx-js/react": "^1.6.21",
"@svgr/webpack": "^5.5.0",
"clsx": "^1.1.1",
Expand All @@ -26,6 +27,11 @@
"react-dom": "^17.0.1",
"url-loader": "^4.1.1"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "2.0.0-beta.8",
"@tsconfig/docusaurus": "^1.0.4",
"typescript": "^4.3.5"
},
"browserslist": {
"production": [
">0.5%",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import React from 'react';
import clsx from 'clsx';
import styles from './HomepageFeatures.module.css';

const FeatureList = [
type FeatureItem = {
title: string;
image: string;
description: JSX.Element;
};

const FeatureList: FeatureItem[] = [
{
title: 'Easy to Use',
Svg: require('../../static/img/undraw_docusaurus_mountain.svg').default,
image: '/img/undraw_docusaurus_mountain.svg',
description: (
<>
Docusaurus was designed from the ground up to be easily installed and
Expand All @@ -15,7 +27,7 @@ const FeatureList = [
},
{
title: 'Focus on What Matters',
Svg: require('../../static/img/undraw_docusaurus_tree.svg').default,
image: '/img/undraw_docusaurus_tree.svg',
description: (
<>
Docusaurus lets you focus on your docs, and we&apos;ll do the chores. Go
Expand All @@ -25,7 +37,7 @@ const FeatureList = [
},
{
title: 'Powered by React',
Svg: require('../../static/img/undraw_docusaurus_react.svg').default,
image: '/img/undraw_docusaurus_react.svg',
description: (
<>
Extend or customize your website layout by reusing React. Docusaurus can
Expand All @@ -35,11 +47,11 @@ const FeatureList = [
},
];

function Feature({Svg, title, description}) {
function Feature({title, image, description}: FeatureItem) {
return (
<div className={clsx('col col--4')}>
<div className="text--center">
<Svg className={styles.featureSvg} alt={title} />
<img className={styles.featureSvg} alt={title} src={image} />
</div>
<div className="text--center padding-horiz--md">
<h3>{title}</h3>
Expand All @@ -49,7 +61,7 @@ function Feature({Svg, title, description}) {
);
}

export default function HomepageFeatures() {
export default function HomepageFeatures(): JSX.Element {
return (
<section className={styles.features}>
<div className="container">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function HomepageHeader() {
);
}

export default function Home() {
export default function Home(): JSX.Element {
const {siteConfig} = useDocusaurusContext();
return (
<Layout
Expand Down
7 changes: 7 additions & 0 deletions examples/classic-typescript/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
// This file is not used in compilation. It is here just for a nice editor experience.
"extends": "@tsconfig/docusaurus/tsconfig.json",
"compilerOptions": {
"baseUrl": "."
}
}
Loading

0 comments on commit d1b4fc1

Please sign in to comment.