Docusaurus: Replace config basics (#1314)

Summary:
Pull Request resolved: https://github.com/facebook/yoga/pull/1314

Replace some of the basic parts of the config with values for Yoga

Reviewed By: yungsters

Differential Revision: D46884432

fbshipit-source-id: ff729d93b4378925c9b526b50dd06f95f5e27b51
This commit is contained in:
Nick Gerleman
2023-06-23 17:56:41 -07:00
committed by Facebook GitHub Bot
parent 3e3c4f09f9
commit 23e58ebaf5
5 changed files with 31 additions and 34 deletions

View File

@@ -6,34 +6,25 @@
*/ */
// @ts-check // @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
const lightCodeTheme = require('prism-react-renderer/themes/github'); const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula'); const darkCodeTheme = require('prism-react-renderer/themes/dracula');
/** @type {import('@docusaurus/types').Config} */ /** @type {import('@docusaurus/types').Config} */
const config = { const config = {
title: 'My Site', title: 'Yoga',
tagline: 'Dinosaurs are cool', tagline: 'Build flexible layouts on any platform with a highly optimized open source layout engine designed with speed, size, and ease of use in mind.',
favicon: 'img/favicon.ico', favicon: 'img/favicon.png',
// Set the production url of your site here url: 'https:/yogalayout.com',
url: 'https://your-docusaurus-test-site.com',
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/', baseUrl: '/',
// GitHub pages deployment config. organizationName: 'facebook',
// If you aren't using GitHub pages, you don't need these. projectName: 'yoga',
organizationName: 'facebook', // Usually your GitHub org/user name.
projectName: 'docusaurus', // Usually your repo name.
onBrokenLinks: 'throw', onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn', onBrokenMarkdownLinks: 'warn',
// Even if you don't use internalization, 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: { i18n: {
defaultLocale: 'en', defaultLocale: 'en',
locales: ['en'], locales: ['en'],
@@ -46,17 +37,13 @@ const config = {
({ ({
docs: { docs: {
sidebarPath: require.resolve('./sidebars.js'), sidebarPath: require.resolve('./sidebars.js'),
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl: editUrl:
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/', 'https://github.com/facebook/yoga/tree/main/website',
}, },
blog: { blog: {
showReadingTime: true, showReadingTime: true,
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl: editUrl:
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/', 'https://github.com/facebook/yoga/tree/main/website',
}, },
theme: { theme: {
customCss: require.resolve('./src/css/custom.css'), customCss: require.resolve('./src/css/custom.css'),
@@ -68,12 +55,10 @@ const config = {
themeConfig: themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */ /** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({ ({
// Replace with your project's social card
image: 'img/docusaurus-social-card.jpg',
navbar: { navbar: {
title: 'My Site', title: 'Yoga',
logo: { logo: {
alt: 'My Site Logo', alt: 'Yoga Logo',
src: 'img/logo.svg', src: 'img/logo.svg',
}, },
items: [ items: [
@@ -108,15 +93,11 @@ const config = {
items: [ items: [
{ {
label: 'Stack Overflow', label: 'Stack Overflow',
href: 'https://stackoverflow.com/questions/tagged/docusaurus', href: 'https://stackoverflow.com/questions/tagged/yoga',
},
{
label: 'Discord',
href: 'https://discordapp.com/invite/docusaurus',
}, },
{ {
label: 'Twitter', label: 'Twitter',
href: 'https://twitter.com/docusaurus', href: 'https://twitter.com/yogalayout',
}, },
], ],
}, },
@@ -129,12 +110,12 @@ const config = {
}, },
{ {
label: 'GitHub', label: 'GitHub',
href: 'https://github.com/facebook/docusaurus', href: 'https://github.com/facebook/yoga',
}, },
], ],
}, },
], ],
copyright: `Copyright © ${new Date().getFullYear()} My Project, Inc. Built with Docusaurus.`, copyright: `Copyright © ${new Date().getFullYear()} Meta Platforms, Inc.`,
}, },
prism: { prism: {
theme: lightCodeTheme, theme: lightCodeTheme,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB