diff --git a/beta/package.json b/beta/package.json
index 6e2d373a..acef2acf 100644
--- a/beta/package.json
+++ b/beta/package.json
@@ -6,7 +6,7 @@
"scripts": {
"analyze": "ANALYZE=true next build",
"dev": "next-remote-watch ./src/content",
- "build": "next build && node ./scripts/generateRSS.js && node ./scripts/generateRedirects.js && node ./scripts/downloadFonts.js",
+ "build": "next build && node ./scripts/downloadFonts.js",
"lint": "next lint",
"lint:fix": "next lint --fix",
"format:source": "prettier --config .prettierrc --write \"{plugins,src}/**/*.{js,ts,jsx,tsx,css}\"",
diff --git a/beta/scripts/generateBlogIndex.js b/beta/scripts/generateBlogIndex.js
deleted file mode 100644
index b9deaa58..00000000
--- a/beta/scripts/generateBlogIndex.js
+++ /dev/null
@@ -1,69 +0,0 @@
-const fs = require('fs-extra');
-const path = require('path');
-const fm = require('gray-matter');
-const globby = require('globby');
-const parseISO = require('date-fns/parseISO');
-const readingTime = require('reading-time');
-const {markdownToHtml} = require('../plugins/markdownToHtml');
-
-/**
- * This looks at the ./src/pages/blog directory and creates a route manifest that can be used
- * in the sidebar and footers, and (in theory) category and author pages.
- *
- * For now, the blog manifest is a big array in reverse chronological order.
- */
-Promise.resolve()
- .then(async () => {
- const routes = [];
- const blogPosts = await globby('src/pages/blog/**/*.md');
-
- for (let postpath of blogPosts) {
- const [year, month, day, title] = postpath
- .replace('src/pages/blog/', '')
- .split('/');
-
- const rawStr = await fs.readFile(postpath, 'utf8');
- const {data, excerpt, content} = fm(rawStr, {
- excerpt: function firstLine(file, options) {
- file.excerpt = file.content.split('\n').slice(0, 2).join(' ');
- },
- });
- const rendered = await markdownToHtml(excerpt.trimLeft().trim());
-
- routes.unshift({
- path: postpath.replace('src/pages', ''),
- date: [year, month, day].join('-'),
- title: data.title,
- author: data.author,
- excerpt: rendered,
- readingTime: readingTime(content).text,
- });
- }
-
- const sorted = routes.sort((post1, post2) =>
- parseISO(post1.date) > parseISO(post2.date) ? -1 : 1
- );
- const blogManifest = {
- routes: sorted,
- };
- const blogRecentSidebar = {
- routes: [
- {
- title: 'Recent Posts',
- path: '/blog',
- heading: true,
- routes: sorted.slice(0, 25),
- },
- ],
- };
-
- await fs.writeFile(
- path.resolve('./src/blogIndex.json'),
- JSON.stringify(blogManifest, null, 2)
- );
- await fs.writeFile(
- path.resolve('./src/blogIndexRecent.json'),
- JSON.stringify(blogRecentSidebar, null, 2)
- );
- })
- .catch(console.error);
diff --git a/beta/scripts/generateRSS.js b/beta/scripts/generateRSS.js
deleted file mode 100644
index a08c7e2a..00000000
--- a/beta/scripts/generateRSS.js
+++ /dev/null
@@ -1,46 +0,0 @@
-const RSS = require('rss');
-const fs = require('fs-extra');
-const authorsJson = require('../src/authors.json');
-const blogIndexJson = require('../src/blogIndex.json');
-const parse = require('date-fns/parse');
-
-function removeFromLast(path, key) {
- const i = path.lastIndexOf(key);
- return i === -1 ? path : path.substring(0, i);
-}
-
-const SITE_URL = 'https://reactjs.org';
-
-function generate() {
- const feed = new RSS({
- title: 'React.js Blog',
- site_url: SITE_URL,
- feed_url: SITE_URL + '/feed.xml',
- });
-
- blogIndexJson.routes.map((meta) => {
- feed.item({
- title: meta.title,
- guid: removeFromLast(meta.path, '.'),
- url: SITE_URL + removeFromLast(meta.path, '.'),
- date: parse(meta.date, 'yyyy-MM-dd', new Date()),
- description: meta.description,
- custom_elements: [].concat(
- meta.author.map((author) => ({
- author: [{ name: authorsJson[author].name }],
- }))
- ),
- });
- });
-
- const rss = feed.xml({ indent: true });
-
- fs.writeFileSync('./.next/static/feed.xml', rss);
-}
-
-try {
- generate();
-} catch (error) {
- console.error('Error generating rss feed');
- throw error;
-}
diff --git a/beta/scripts/generateRedirects.js b/beta/scripts/generateRedirects.js
deleted file mode 100644
index b6e23b58..00000000
--- a/beta/scripts/generateRedirects.js
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- * Copyright (c) Facebook, Inc. and its affiliates.
- */
-
-const resolve = require('path').resolve;
-const {writeFile} = require('fs-extra');
-const readFileSync = require('fs').readFileSync;
-const safeLoad = require('js-yaml').safeLoad;
-const path = require('path');
-const versionsFile = resolve(__dirname, '../../content/versions.yml');
-const file = readFileSync(versionsFile, 'utf8');
-const versions = safeLoad(file);
-const redirectsFilePath = path.join('vercel.json');
-
-function writeRedirectsFile(redirects, redirectsFilePath) {
- if (!redirects.length) {
- return null;
- }
-
- /**
- * We will first read the old config to validate if the redirect already exists in the json
- */
- const vercelConfigPath = resolve(__dirname, '../../vercel.json');
- const vercelConfigFile = readFileSync(vercelConfigPath);
- const oldConfigContent = JSON.parse(vercelConfigFile);
- /**
- * Map data as vercel expects it to be
- */
-
- let vercelRedirects = {};
-
- redirects.forEach((redirect) => {
- const {fromPath, isPermanent, toPath} = redirect;
-
- vercelRedirects[fromPath] = {
- destination: toPath,
- permanent: !!isPermanent,
- };
- });
-
- /**
- * Make sure we dont have the same redirect already
- */
- oldConfigContent.redirects.forEach((data) => {
- if(vercelRedirects[data.source]){
- delete vercelRedirects[data.source];
- }
- });
-
- /**
- * Serialize the object to array of objects
- */
- let newRedirects = [];
- Object.keys(vercelRedirects).forEach((value) =>
- newRedirects.push({
- source: value,
- destination: vercelRedirects[value].destination,
- permanent: !!vercelRedirects[value].isPermanent,
- })
- );
-
- /**
- * We already have a vercel.json so we spread the new contents along with old ones
- */
- const newContents = {
- ...oldConfigContent,
- redirects: [...oldConfigContent.redirects, ...newRedirects],
- };
- writeFile(redirectsFilePath, JSON.stringify(newContents, null, 2));
-}
-
-// versions.yml structure is [{path: string, url: string, ...}, ...]
-writeRedirectsFile(
- versions
- .filter((version) => version.path && version.url)
- .map((version) => ({
- fromPath: version.path,
- toPath: version.url,
- })),
- redirectsFilePath
-);
diff --git a/beta/scripts/migrations/migrateBlogPosts.js b/beta/scripts/migrations/migrateBlogPosts.js
deleted file mode 100644
index 8b93c23a..00000000
--- a/beta/scripts/migrations/migrateBlogPosts.js
+++ /dev/null
@@ -1,50 +0,0 @@
-const fs = require('fs-extra');
-const path = require('path');
-const fm = require('gray-matter');
-const globby = require('globby');
-const parse = require('date-fns/parse');
-
-/**
- * This script takes the gatsby blog posts directory and migrates it.
- *
- * In gatsby, blog posts were put in markdown files title YYYY-MM-DD-post-title.md.
- * This script looks at that directory and then moves posts into folders paths
- * that match the end URL structure of /blog/YYYY/MM/DD/postitle.md
- *
- * This allows us to use MDX in blog posts.
- */
-
-// I dropped them into src/pages/oldblog
-// @todo remove after migration
-// I am not proud of this. Also, the blog posts needed to be cleaned up for MDX, don't run this again.
-Promise.resolve()
- .then(async () => {
- const blogManifest = {};
- const blogPosts = await globby('src/pages/oldblog/*.md');
- // console.log(blogPosts);
- for (let postpath of blogPosts.sort()) {
- const rawStr = await fs.readFile(postpath, 'utf8');
- // console.log(rawStr);
- const {data, content} = fm(rawStr);
- const cleanPath = postpath.replace('src/pages/oldblog/', '');
- const yrStr = parseInt(cleanPath.substr(0, 4), 10); // 2013-06-02
- // console.log(yrStr);
- const dateStr = cleanPath.substr(0, 10); // 2013-06-02
- const postFileName = cleanPath.substr(11);
- // console.log(postFileName, dateStr);
- const datePath = dateStr.split('-').join('/');
- // console.log(datePath);
- const newPath = './src/pages/blog/' + datePath + '/' + postFileName;
- // console.log(newPath);
- await fs.ensureFile(path.resolve(newPath));
- await fs.writeFile(
- path.resolve(newPath),
- rawStr
- .replace('
', '
')
- .replace('