diff --git a/beta/.husky/pre-commit b/beta/.husky/pre-commit
new file mode 100755
index 00000000..038a9316
--- /dev/null
+++ b/beta/.husky/pre-commit
@@ -0,0 +1,6 @@
+#!/bin/sh
+. "$(dirname "$0")/_/husky.sh"
+
+cd beta
+yarn generate-ids
+git add -u src/pages/**/*.md
diff --git a/beta/package.json b/beta/package.json
index 380d923a..c732efba 100644
--- a/beta/package.json
+++ b/beta/package.json
@@ -12,10 +12,11 @@
"nit:source": "prettier --config .prettierrc --list-different \"{plugins,src}/**/*.{js,ts,jsx,tsx}\"",
"prettier": "yarn format:source",
"prettier:diff": "yarn nit:source",
- "generate-ids": "node scripts/generateHeadingIDs.js src/pages/docs && node scripts/generateHeadingIDs.js src/pages/blog",
+ "generate-ids": "node scripts/generateHeadingIDs.js src/pages/",
"ci-check": "npm-run-all prettier:diff --parallel lint tsc",
"tsc": "tsc --noEmit",
- "start": "next start"
+ "start": "next start",
+ "postinstall": "is-ci || (cd .. && husky install beta/.husky)"
},
"dependencies": {
"@codesandbox/sandpack-react": "^0.1.20",
@@ -66,6 +67,8 @@
"fs-extra": "^9.0.1",
"globby": "^11.0.1",
"gray-matter": "^4.0.2",
+ "husky": "^7.0.4",
+ "is-ci": "^3.0.1",
"mdast-util-to-string": "^1.1.0",
"npm-run-all": "^4.1.5",
"patch-package": "^6.2.2",
diff --git a/beta/src/pages/community/acknowledgements.md b/beta/src/pages/community/acknowledgements.md
index 0aef7a8c..ba614c90 100644
--- a/beta/src/pages/community/acknowledgements.md
+++ b/beta/src/pages/community/acknowledgements.md
@@ -3,7 +3,7 @@ title: Acknowledgements
layout: Home
---
-## React
+## React {#react}
React was originally created by [Jordan Walke](https://github.com/jordwalke). Today, React has a [dedicated full-time team working on it](/community/team.html), as well as over a thousand [open source contributors](https://github.com/facebook/react/blob/main/AUTHORS). We'd like to recognize a few people who have made significant contributions to React and its documentation in the past and have helped maintain them over the years:
@@ -46,21 +46,21 @@ This list is not exhaustive.
We'd like to give special thanks to [Tom Occhino](https://github.com/tomocchino) and [Adam Wolff](https://github.com/wolffiex) for their guidance and support over the years. We are also thankful to all the volunteers who [translated React into other languages](https://translations.reactjs.org/).
-## React Docs
+## React Docs {#react-docs}
-### Documentation
+### Documentation {#documentation}
* [Rachel Nabors](https://twitter.com/RachelNabors): editing, writing, illustrating
* [Dan Abramov](https://twitter.com/dan_abramov): writing, curriculum design
* [Sylwia Vargas](https://twitter.com/SylwiaVargas): example code
-### Design
+### Design {#design}
* [Dan Lebowitz](https://twitter.com/lebo): design
* [Razvan Gradinar](https://dribbble.com/GradinarRazvan): design
* [Maggie Appleton](https://maggieappleton.com/): diagram system
-### Development
+### Development {#development}
* [Jared Palmer](https://twitter.com/jaredpalmer): site development
* [ThisDotLabs](https://www.thisdot.co/) ([Dane Grant](https://twitter.com/danecando), [Dustin Goodman](https://twitter.com/dustinsgoodman)): site development
@@ -69,7 +69,7 @@ We'd like to give special thanks to [Tom Occhino](https://github.com/tomocchino)
We'd also like to thank countless alpha testers and community members who gave us feedback along the way.
-## Additional Thanks
+## Additional Thanks {#additional-thanks}
Additionally, we're grateful to:
diff --git a/beta/src/pages/community/index.md b/beta/src/pages/community/index.md
index 1eb3eaf8..68e8197a 100644
--- a/beta/src/pages/community/index.md
+++ b/beta/src/pages/community/index.md
@@ -9,11 +9,11 @@ React has a community of millions of developers. On this page we've listed some
-## Code of Conduct
+## Code of Conduct {#code-of-conduct}
Before participating in React's communities, [please read our Code of Conduct](https://github.com/facebook/react/blob/main/CODE_OF_CONDUCT.md). We have adopted the [Contributor Covenant](https://www.contributor-covenant.org/) and we expect that all community members adhere to the guidelines within.
-## Stack Overflow
+## Stack Overflow {#stack-overflow}
Stack Overflow is a popular forum to ask code-level questions or if you're stuck with a specific error. Read through the [existing questions](https://stackoverflow.com/questions/tagged/reactjs) tagged with **reactjs** or [ask your own](https://stackoverflow.com/questions/ask?tags=reactjs)!
@@ -21,7 +21,7 @@ Stack Overflow is a popular forum to ask code-level questions or if you're stuck
TODO: decide on the criteria for inclusion before uncommenting.
-## Popular Discussion Forums
+## Popular Discussion Forums {#popular-discussion-forums}
There are many online forums which are a great place for discussion about best practices and application architecture as well as the future of React. If you have an answerable code-level question, Stack Overflow is usually a better fit.
@@ -34,6 +34,6 @@ Each community consists of many thousands of React users.
-->
-## News
+## News {#news}
For the latest news about React, [follow **@reactjs** on Twitter](https://twitter.com/reactjs) and the [official React blog](/blog/) on this website.
diff --git a/beta/src/pages/community/meet-the-team.md b/beta/src/pages/community/meet-the-team.md
index cef173ae..6b0d5a4a 100644
--- a/beta/src/pages/community/meet-the-team.md
+++ b/beta/src/pages/community/meet-the-team.md
@@ -8,13 +8,13 @@ React development is led by a small dedicated team working full time at Facebook
-## React Core
+## React Core {#react-core}
The React Core team members work full time on the core component APIs, the engine that powers React DOM and React Native, React DevTools, and the React documentation website.
Current members of the React team are listed in alphabetical order below.
-### Andrew Clark
+### Andrew Clark {#andrew-clark}

@@ -22,7 +22,7 @@ Current members of the React team are listed in alphabetical order below.
Andrew got started with web development by making sites with WordPress, and eventually tricked himself into doing JavaScript. His favorite pastime is karaoke. Andrew is either a Disney villain or a Disney princess, depending on the day.
-### Brian Vaughn
+### Brian Vaughn {#brian-vaughn}

@@ -30,7 +30,7 @@ Andrew got started with web development by making sites with WordPress, and even
Brian studied art in college and did programming on the side to pay for his education. Eventually, he realized that he enjoys working on open source. Brian has one [one-person band](https://soundcloud.com/brianvaughn/) and two [two-person](https://soundcloud.com/pilotlessdrone) [bands](https://soundcloud.com/pinwurm). He also takes care of the cutest cat in the world.
-### Dan Abramov
+### Dan Abramov {#dan-abramov}

@@ -38,7 +38,7 @@ Brian studied art in college and did programming on the side to pay for his educ
Dan got into programming after he accidentally discovered Visual Basic inside Microsoft PowerPoint. He has found his true calling in turning [Sebastian](#sebastian-markbåge)'s tweets into long-form blog posts. Dan occasionally wins at Fortnite by hiding in a bush until the game ends.
-### Luna Ruan
+### Luna Ruan {#luna-ruan}

@@ -46,7 +46,7 @@ Dan got into programming after he accidentally discovered Visual Basic inside Mi
Luna learned programming because she thought it meant creating video games. Instead, she ended up working on the Pinterest web app, and now on React itself. Luna doesn't want to make video games anymore, but she plans to do creative writing if she ever gets bored.
-### Marco Salazar
+### Marco Salazar {#marco-salazar}

@@ -54,7 +54,7 @@ Luna learned programming because she thought it meant creating video games. Inst
Marco's first programming language was Assembly because he could use it to hack video games. Now online games are much more secure so he settles for playing fairly (mostly). In his spare time he plays games on his treadmill desk and makes art that he never finishes. Hopefully his PRs don't have the same fate.
-### Rachel Nabors
+### Rachel Nabors {#rachel-nabors}

@@ -62,7 +62,7 @@ Marco's first programming language was Assembly because he could use it to hack
Rachel wrote a [book about UI animation](https://abookapart.com/products/animation-at-work) once and worked with MDN and the W3C on the web animations API. Now she is busy with education materials and community engineering on the React team. Secretly, she is an award-winning cartoonist for teenage girls. Catch her making fancy tea with lukewarm water in the microkitchen.
-### Rick Hanlon
+### Rick Hanlon {#rick-hanlon}

@@ -70,7 +70,7 @@ Rachel wrote a [book about UI animation](https://abookapart.com/products/animati
Ricky majored in theoretical math and somehow found himself on the React Native team for a couple years before joining the React team. When he's not programming you can find him snowboarding, biking, climbing, golfing, or closing GitHub issues that do not match the issue template.
-### Sebastian Markbåge
+### Sebastian Markbåge {#sebastian-markbåge}

@@ -78,7 +78,7 @@ Ricky majored in theoretical math and somehow found himself on the React Native
Sebastian majored in psychology. He's usually quiet. Even when he says something, it often doesn't make sense to the rest of us until a few months later. The correct way to pronounce his surname is "mark-boa-geh" but he settled for "mark-beige" out of pragmatism -- and that's how he approaches React.
-### Seth Webster
+### Seth Webster {#seth-webster}

@@ -86,7 +86,7 @@ Sebastian majored in psychology. He's usually quiet. Even when he says something
Seth started programming as a kid growing up in Tucson, AZ. After school, he was bitten by the music bug and was a touring musician for about 10 years before returning to *work*, starting with Intuit. In his spare time, he loves [taking pictures](https://www.sethwebster.com) and flying for animal rescues in the northeastern United States.
-## Past contributors
+## Past contributors {#past-contributors}
You can find the past team members and other people who significantly contributed to React over the years on the [acknowledgements](/community/acknowledgements) page.
diff --git a/beta/src/pages/index.md b/beta/src/pages/index.md
index 4f9ebf4b..8e56cb67 100644
--- a/beta/src/pages/index.md
+++ b/beta/src/pages/index.md
@@ -7,7 +7,7 @@ permalink: index.html