From ef1da1f583cbe9fd1ec5aeea53137dec74ddf032 Mon Sep 17 00:00:00 2001 From: davidvader Date: Mon, 16 Dec 2024 09:43:39 -0600 Subject: [PATCH 1/4] feat: mdx icons and color tweaks --- docusaurus.config.js | 125 +++++++++++++++-------- package.json | 5 + pnpm-lock.yaml | 65 ++++++++++++ src/components/HomepageFeatures/index.js | 15 +-- src/css/custom.css | 14 +-- src/theme/MDXComponents.js | 14 +++ 6 files changed, 180 insertions(+), 58 deletions(-) create mode 100644 src/theme/MDXComponents.js diff --git a/docusaurus.config.js b/docusaurus.config.js index e1207a1..fa137e3 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -1,24 +1,60 @@ -import {themes as prismThemes} from 'prism-react-renderer'; +import { themes as prismThemes } from 'prism-react-renderer'; // This runs in Node.js - Don't use client-side code here (browser APIs, JSX...) +function modifyContent(filename, content) { + const titleMatch = content.match(/^#\s*(.+)/); + if (titleMatch && titleMatch[1]) { + filename = `${titleMatch[1]}.md`; + } + + return { + filename: filename, + content: content, + }; +} + /** @type {import('@docusaurus/types').Config} */ const config = { - title: 'Vela External Prototype', - tagline: 'Wouldst thou like to Vela deliciously?', + title: 'Vela', + tagline: 'Vela is a Pipeline Automation (CI/CD) framework built on Linux container technology written in Golang.', favicon: 'img/favicon.ico', // Set the production url of your site here - url: 'https://go-vela.github.io/', + url: 'https://pages.git.target.com', // Set the // pathname under which your site is served // For GitHub pages deployment, it is often '//' - baseUrl: '/docs-v2/', - plugins: [require.resolve('docusaurus-lunr-search')], + baseUrl: '/actions-playground/vela-prototype', + plugins: [ + require.resolve('docusaurus-lunr-search'), + // [ + // "docusaurus-plugin-remote-content", + // { + // // options here + // name: "plugin-content-bar", // used by CLI, must be path safe + // sourceBaseUrl: "https://@raw.git.target.com/DavidVader/remote-docs-bar/main/", // the base url for the markdown (gets prepended to all of the documents when fetching) + // outDir: "docs/usage/plugins/registry", // the base directory to output to. + // documents: ["DOCS.md"], // the file names to download + // modifyContent: modifyContent, + // }, + // ], + // [ + // "docusaurus-plugin-remote-content", + // { + // // options here + // name: "plugin-content-foo", // used by CLI, must be path safe + // sourceBaseUrl: "https://@raw.git.target.com/DavidVader/remote-docs-foo/main/", // the base url for the markdown (gets prepended to all of the documents when fetching) + // outDir: "docs/usage/plugins/registry", // the base directory to output to. + // documents: ["DOCS.md"], // the file names to download + // modifyContent: modifyContent, + // }, + // ], + ], // GitHub pages deployment config. // If you aren't using GitHub pages, you don't need these. - organizationName: 'actions-playground', - projectName: 'vela-prototype', + organizationName: 'actions-playground', + projectName: 'vela-prototype', deploymentBranch: 'gh-pages', onBrokenLinks: 'warn', onBrokenMarkdownLinks: 'warn', @@ -59,7 +95,6 @@ const config = { }, }), ], - ], themeConfig: @@ -67,45 +102,45 @@ const config = { ({ image: 'img/vela.png', navbar: { - title: 'Vela External Protoype', + title: 'Vela', logo: { alt: 'My Site Logo', src: 'img/vela.png', }, - items: - [ - { - type: 'docSidebar', - position: 'left', - sidebarId: 'installation', - label: 'Installation', - }, - { - type: 'docSidebar', - position: 'left', - sidebarId: 'usage', - label: 'Usage', - }, - { - type: 'docSidebar', - position: 'left', - sidebarId: 'reference', - label: 'Reference', - }, - {to: '/blog', label: 'Blog', position: 'left'}, - { - type: 'docsVersionDropdown', - label: 'version', - position: 'right', - dropdownItemsAfter: [{to: '/versions', label: 'All versions'}], - dropdownActiveClassDisabled: true, - }, - { - href: 'https://github.com/go-vela', - label: 'Vela on GitHub', - position: 'right', - }, - ], + items: + [ + { + type: 'docSidebar', + position: 'left', + sidebarId: 'installation', + label: 'Installation', + }, + { + type: 'docSidebar', + position: 'left', + sidebarId: 'usage', + label: 'Usage', + }, + { + type: 'docSidebar', + position: 'left', + sidebarId: 'reference', + label: 'Reference', + }, + { to: '/blog', label: 'Blog', position: 'left' }, + { + type: 'docsVersionDropdown', + label: 'version', + position: 'right', + dropdownItemsAfter: [{to: '/versions', label: 'All versions'}], + dropdownActiveClassDisabled: true, + }, + { + href: 'https://github.com/go-vela', + label: 'Vela on GitHub', + position: 'right', + }, + ], }, footer: { style: 'dark', @@ -117,5 +152,5 @@ const config = { }, }), }; - // hihello + export default config; diff --git a/package.json b/package.json index 0354bd4..91420f2 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,11 @@ "dependencies": { "@docusaurus/core": "3.6.3", "@docusaurus/preset-classic": "3.6.3", + "@fortawesome/fontawesome-svg-core": "^6.7.1", + "@fortawesome/free-brands-svg-icons": "^6.7.1", + "@fortawesome/free-regular-svg-icons": "^6.7.1", + "@fortawesome/free-solid-svg-icons": "^6.7.1", + "@fortawesome/react-fontawesome": "^0.2.2", "@mdx-js/react": "^3.0.0", "clsx": "^2.0.0", "docusaurus-lunr-search": "^3.5.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0f980df..6bdec5f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -14,6 +14,21 @@ importers: '@docusaurus/preset-classic': specifier: 3.6.3 version: 3.6.3(@algolia/client-search@5.15.0)(@mdx-js/react@3.1.0(@types/react@18.3.12)(react@18.3.1))(@types/react@18.3.12)(acorn@8.14.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.17.3)(typescript@5.7.2) + '@fortawesome/fontawesome-svg-core': + specifier: ^6.7.1 + version: 6.7.1 + '@fortawesome/free-brands-svg-icons': + specifier: ^6.7.1 + version: 6.7.1 + '@fortawesome/free-regular-svg-icons': + specifier: ^6.7.1 + version: 6.7.1 + '@fortawesome/free-solid-svg-icons': + specifier: ^6.7.1 + version: 6.7.1 + '@fortawesome/react-fontawesome': + specifier: ^0.2.2 + version: 0.2.2(@fortawesome/fontawesome-svg-core@6.7.1)(react@18.3.1) '@mdx-js/react': specifier: ^3.0.0 version: 3.1.0(@types/react@18.3.12)(react@18.3.1) @@ -1179,6 +1194,32 @@ packages: resolution: {integrity: sha512-0R/FR3bKVl4yl8QwbL4TYFfR+OXBRpVUaTJdENapBGR3YMwfM6/JnhGilWQO8AOwPJGtGoDK7ib8+8UF9f3OZQ==} engines: {node: '>=18.0'} + '@fortawesome/fontawesome-common-types@6.7.1': + resolution: {integrity: sha512-gbDz3TwRrIPT3i0cDfujhshnXO9z03IT1UKRIVi/VEjpNHtSBIP2o5XSm+e816FzzCFEzAxPw09Z13n20PaQJQ==} + engines: {node: '>=6'} + + '@fortawesome/fontawesome-svg-core@6.7.1': + resolution: {integrity: sha512-8dBIHbfsKlCk2jHQ9PoRBg2Z+4TwyE3vZICSnoDlnsHA6SiMlTwfmW6yX0lHsRmWJugkeb92sA0hZdkXJhuz+g==} + engines: {node: '>=6'} + + '@fortawesome/free-brands-svg-icons@6.7.1': + resolution: {integrity: sha512-nJR76eqPzCnMyhbiGf6X0aclDirZriTPRcFm1YFvuupyJOGwlNF022w3YBqu+yrHRhnKRpzFX+8wJKqiIjWZkA==} + engines: {node: '>=6'} + + '@fortawesome/free-regular-svg-icons@6.7.1': + resolution: {integrity: sha512-e13cp+bAx716RZOTQ59DhqikAgETA9u1qTBHO3e3jMQQ+4H/N1NC1ZVeFYt1V0m+Th68BrEL1/X6XplISutbXg==} + engines: {node: '>=6'} + + '@fortawesome/free-solid-svg-icons@6.7.1': + resolution: {integrity: sha512-BTKc0b0mgjWZ2UDKVgmwaE0qt0cZs6ITcDgjrti5f/ki7aF5zs+N91V6hitGo3TItCFtnKg6cUVGdTmBFICFRg==} + engines: {node: '>=6'} + + '@fortawesome/react-fontawesome@0.2.2': + resolution: {integrity: sha512-EnkrprPNqI6SXJl//m29hpaNzOp1bruISWaOiRtkMi/xSvHJlzc2j2JAYS7egxt/EbjSNV/k6Xy0AQI6vB2+1g==} + peerDependencies: + '@fortawesome/fontawesome-svg-core': ~1 || ~6 + react: '>=16.3' + '@hapi/hoek@9.3.0': resolution: {integrity: sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==} @@ -7186,6 +7227,30 @@ snapshots: - uglify-js - webpack-cli + '@fortawesome/fontawesome-common-types@6.7.1': {} + + '@fortawesome/fontawesome-svg-core@6.7.1': + dependencies: + '@fortawesome/fontawesome-common-types': 6.7.1 + + '@fortawesome/free-brands-svg-icons@6.7.1': + dependencies: + '@fortawesome/fontawesome-common-types': 6.7.1 + + '@fortawesome/free-regular-svg-icons@6.7.1': + dependencies: + '@fortawesome/fontawesome-common-types': 6.7.1 + + '@fortawesome/free-solid-svg-icons@6.7.1': + dependencies: + '@fortawesome/fontawesome-common-types': 6.7.1 + + '@fortawesome/react-fontawesome@0.2.2(@fortawesome/fontawesome-svg-core@6.7.1)(react@18.3.1)': + dependencies: + '@fortawesome/fontawesome-svg-core': 6.7.1 + prop-types: 15.8.1 + react: 18.3.1 + '@hapi/hoek@9.3.0': {} '@hapi/topo@5.1.0': diff --git a/src/components/HomepageFeatures/index.js b/src/components/HomepageFeatures/index.js index cf26f43..5797aac 100644 --- a/src/components/HomepageFeatures/index.js +++ b/src/components/HomepageFeatures/index.js @@ -1,11 +1,14 @@ import clsx from 'clsx'; import Heading from '@theme/Heading'; import styles from './styles.module.css'; +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import * as brandIcons from '@fortawesome/free-brands-svg-icons'; +import * as solidIcons from '@fortawesome/free-solid-svg-icons' const FeatureList = [ { title: 'Target Engineering Blog', - Svg: require('@site/static/img/undraw_docusaurus_mountain.svg').default, + Svg: , description: ( <> Hear more about other products and Target Engineering on our blog. @@ -14,7 +17,7 @@ const FeatureList = [ }, { title: 'Contributors welcome', - Svg: require('@site/static/img/undraw_docusaurus_tree.svg').default, + Svg: , description: ( <> Learn more about getting started in our community. @@ -23,7 +26,7 @@ const FeatureList = [ }, { title: 'Join us on Slack', - Svg: require('@site/static/img/undraw_docusaurus_react.svg').default, + Svg: , description: ( <> Come hang out with us in the Gopher Slack workspace. @@ -32,11 +35,11 @@ const FeatureList = [ }, ]; -function Feature({Svg, title, description}) { +function Feature({ Svg, title, description }) { return (
-
- +
+ {Svg}
{title} diff --git a/src/css/custom.css b/src/css/custom.css index 97f1d7b..fb784bc 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -6,13 +6,13 @@ /* You can override the default Infima variables here. */ :root { - --ifm-color-primary: #2e8555; - --ifm-color-primary-dark: #29784c; - --ifm-color-primary-darker: #277148; - --ifm-color-primary-darkest: #205d3b; - --ifm-color-primary-light: #33925d; - --ifm-color-primary-lighter: #359962; - --ifm-color-primary-lightest: #3cad6e; + --ifm-color-primary: #007a99; + --ifm-color-primary-dark: #016781; + --ifm-color-primary-darker: #00576d; + --ifm-color-primary-darkest: #013e4e; + --ifm-color-primary-light: #2e9aa6; + --ifm-color-primary-lighter: #389faa; + --ifm-color-primary-lightest: #4cafba; --ifm-code-font-size: 95%; --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1); } diff --git a/src/theme/MDXComponents.js b/src/theme/MDXComponents.js new file mode 100644 index 0000000..7b1e270 --- /dev/null +++ b/src/theme/MDXComponents.js @@ -0,0 +1,14 @@ +import React from 'react'; +import MDXComponents from '@theme-original/MDXComponents'; +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import { library } from '@fortawesome/fontawesome-svg-core'; +import { fab } from '@fortawesome/free-brands-svg-icons'; +import { fas } from '@fortawesome/free-solid-svg-icons'; + +library.add(fab, fas); + +export default { + ...MDXComponents, + FAIcon: FontAwesomeIcon, +}; + From c7218c1ad7b93df2792e544bc84afcf842b9973b Mon Sep 17 00:00:00 2001 From: davidvader Date: Mon, 16 Dec 2024 09:44:45 -0600 Subject: [PATCH 2/4] feat: mdx icons and color tweaks --- docusaurus.config.js | 125 +++++++++++++++-------- package-lock.json | 69 +++++++++++++ package.json | 5 + pnpm-lock.yaml | 65 ++++++++++++ src/components/HomepageFeatures/index.js | 15 +-- src/css/custom.css | 14 +-- src/theme/MDXComponents.js | 14 +++ 7 files changed, 249 insertions(+), 58 deletions(-) create mode 100644 src/theme/MDXComponents.js diff --git a/docusaurus.config.js b/docusaurus.config.js index e1207a1..fa137e3 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -1,24 +1,60 @@ -import {themes as prismThemes} from 'prism-react-renderer'; +import { themes as prismThemes } from 'prism-react-renderer'; // This runs in Node.js - Don't use client-side code here (browser APIs, JSX...) +function modifyContent(filename, content) { + const titleMatch = content.match(/^#\s*(.+)/); + if (titleMatch && titleMatch[1]) { + filename = `${titleMatch[1]}.md`; + } + + return { + filename: filename, + content: content, + }; +} + /** @type {import('@docusaurus/types').Config} */ const config = { - title: 'Vela External Prototype', - tagline: 'Wouldst thou like to Vela deliciously?', + title: 'Vela', + tagline: 'Vela is a Pipeline Automation (CI/CD) framework built on Linux container technology written in Golang.', favicon: 'img/favicon.ico', // Set the production url of your site here - url: 'https://go-vela.github.io/', + url: 'https://pages.git.target.com', // Set the // pathname under which your site is served // For GitHub pages deployment, it is often '//' - baseUrl: '/docs-v2/', - plugins: [require.resolve('docusaurus-lunr-search')], + baseUrl: '/actions-playground/vela-prototype', + plugins: [ + require.resolve('docusaurus-lunr-search'), + // [ + // "docusaurus-plugin-remote-content", + // { + // // options here + // name: "plugin-content-bar", // used by CLI, must be path safe + // sourceBaseUrl: "https://@raw.git.target.com/DavidVader/remote-docs-bar/main/", // the base url for the markdown (gets prepended to all of the documents when fetching) + // outDir: "docs/usage/plugins/registry", // the base directory to output to. + // documents: ["DOCS.md"], // the file names to download + // modifyContent: modifyContent, + // }, + // ], + // [ + // "docusaurus-plugin-remote-content", + // { + // // options here + // name: "plugin-content-foo", // used by CLI, must be path safe + // sourceBaseUrl: "https://@raw.git.target.com/DavidVader/remote-docs-foo/main/", // the base url for the markdown (gets prepended to all of the documents when fetching) + // outDir: "docs/usage/plugins/registry", // the base directory to output to. + // documents: ["DOCS.md"], // the file names to download + // modifyContent: modifyContent, + // }, + // ], + ], // GitHub pages deployment config. // If you aren't using GitHub pages, you don't need these. - organizationName: 'actions-playground', - projectName: 'vela-prototype', + organizationName: 'actions-playground', + projectName: 'vela-prototype', deploymentBranch: 'gh-pages', onBrokenLinks: 'warn', onBrokenMarkdownLinks: 'warn', @@ -59,7 +95,6 @@ const config = { }, }), ], - ], themeConfig: @@ -67,45 +102,45 @@ const config = { ({ image: 'img/vela.png', navbar: { - title: 'Vela External Protoype', + title: 'Vela', logo: { alt: 'My Site Logo', src: 'img/vela.png', }, - items: - [ - { - type: 'docSidebar', - position: 'left', - sidebarId: 'installation', - label: 'Installation', - }, - { - type: 'docSidebar', - position: 'left', - sidebarId: 'usage', - label: 'Usage', - }, - { - type: 'docSidebar', - position: 'left', - sidebarId: 'reference', - label: 'Reference', - }, - {to: '/blog', label: 'Blog', position: 'left'}, - { - type: 'docsVersionDropdown', - label: 'version', - position: 'right', - dropdownItemsAfter: [{to: '/versions', label: 'All versions'}], - dropdownActiveClassDisabled: true, - }, - { - href: 'https://github.com/go-vela', - label: 'Vela on GitHub', - position: 'right', - }, - ], + items: + [ + { + type: 'docSidebar', + position: 'left', + sidebarId: 'installation', + label: 'Installation', + }, + { + type: 'docSidebar', + position: 'left', + sidebarId: 'usage', + label: 'Usage', + }, + { + type: 'docSidebar', + position: 'left', + sidebarId: 'reference', + label: 'Reference', + }, + { to: '/blog', label: 'Blog', position: 'left' }, + { + type: 'docsVersionDropdown', + label: 'version', + position: 'right', + dropdownItemsAfter: [{to: '/versions', label: 'All versions'}], + dropdownActiveClassDisabled: true, + }, + { + href: 'https://github.com/go-vela', + label: 'Vela on GitHub', + position: 'right', + }, + ], }, footer: { style: 'dark', @@ -117,5 +152,5 @@ const config = { }, }), }; - // hihello + export default config; diff --git a/package-lock.json b/package-lock.json index f54c262..23be135 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,11 @@ "dependencies": { "@docusaurus/core": "3.6.3", "@docusaurus/preset-classic": "3.6.3", + "@fortawesome/fontawesome-svg-core": "^6.7.1", + "@fortawesome/free-brands-svg-icons": "^6.7.1", + "@fortawesome/free-regular-svg-icons": "^6.7.1", + "@fortawesome/free-solid-svg-icons": "^6.7.1", + "@fortawesome/react-fontawesome": "^0.2.2", "@mdx-js/react": "^3.0.0", "clsx": "^2.0.0", "docusaurus-lunr-search": "^3.5.0", @@ -3759,6 +3764,70 @@ "node": ">=18.0" } }, + "node_modules/@fortawesome/fontawesome-common-types": { + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-6.7.1.tgz", + "integrity": "sha512-gbDz3TwRrIPT3i0cDfujhshnXO9z03IT1UKRIVi/VEjpNHtSBIP2o5XSm+e816FzzCFEzAxPw09Z13n20PaQJQ==", + "engines": { + "node": ">=6" + } + }, + "node_modules/@fortawesome/fontawesome-svg-core": { + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-6.7.1.tgz", + "integrity": "sha512-8dBIHbfsKlCk2jHQ9PoRBg2Z+4TwyE3vZICSnoDlnsHA6SiMlTwfmW6yX0lHsRmWJugkeb92sA0hZdkXJhuz+g==", + "dependencies": { + "@fortawesome/fontawesome-common-types": "6.7.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@fortawesome/free-brands-svg-icons": { + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/@fortawesome/free-brands-svg-icons/-/free-brands-svg-icons-6.7.1.tgz", + "integrity": "sha512-nJR76eqPzCnMyhbiGf6X0aclDirZriTPRcFm1YFvuupyJOGwlNF022w3YBqu+yrHRhnKRpzFX+8wJKqiIjWZkA==", + "dependencies": { + "@fortawesome/fontawesome-common-types": "6.7.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@fortawesome/free-regular-svg-icons": { + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/@fortawesome/free-regular-svg-icons/-/free-regular-svg-icons-6.7.1.tgz", + "integrity": "sha512-e13cp+bAx716RZOTQ59DhqikAgETA9u1qTBHO3e3jMQQ+4H/N1NC1ZVeFYt1V0m+Th68BrEL1/X6XplISutbXg==", + "dependencies": { + "@fortawesome/fontawesome-common-types": "6.7.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@fortawesome/free-solid-svg-icons": { + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-6.7.1.tgz", + "integrity": "sha512-BTKc0b0mgjWZ2UDKVgmwaE0qt0cZs6ITcDgjrti5f/ki7aF5zs+N91V6hitGo3TItCFtnKg6cUVGdTmBFICFRg==", + "dependencies": { + "@fortawesome/fontawesome-common-types": "6.7.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@fortawesome/react-fontawesome": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/@fortawesome/react-fontawesome/-/react-fontawesome-0.2.2.tgz", + "integrity": "sha512-EnkrprPNqI6SXJl//m29hpaNzOp1bruISWaOiRtkMi/xSvHJlzc2j2JAYS7egxt/EbjSNV/k6Xy0AQI6vB2+1g==", + "dependencies": { + "prop-types": "^15.8.1" + }, + "peerDependencies": { + "@fortawesome/fontawesome-svg-core": "~1 || ~6", + "react": ">=16.3" + } + }, "node_modules/@hapi/hoek": { "version": "9.3.0", "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz", diff --git a/package.json b/package.json index 0354bd4..91420f2 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,11 @@ "dependencies": { "@docusaurus/core": "3.6.3", "@docusaurus/preset-classic": "3.6.3", + "@fortawesome/fontawesome-svg-core": "^6.7.1", + "@fortawesome/free-brands-svg-icons": "^6.7.1", + "@fortawesome/free-regular-svg-icons": "^6.7.1", + "@fortawesome/free-solid-svg-icons": "^6.7.1", + "@fortawesome/react-fontawesome": "^0.2.2", "@mdx-js/react": "^3.0.0", "clsx": "^2.0.0", "docusaurus-lunr-search": "^3.5.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0f980df..6bdec5f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -14,6 +14,21 @@ importers: '@docusaurus/preset-classic': specifier: 3.6.3 version: 3.6.3(@algolia/client-search@5.15.0)(@mdx-js/react@3.1.0(@types/react@18.3.12)(react@18.3.1))(@types/react@18.3.12)(acorn@8.14.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.17.3)(typescript@5.7.2) + '@fortawesome/fontawesome-svg-core': + specifier: ^6.7.1 + version: 6.7.1 + '@fortawesome/free-brands-svg-icons': + specifier: ^6.7.1 + version: 6.7.1 + '@fortawesome/free-regular-svg-icons': + specifier: ^6.7.1 + version: 6.7.1 + '@fortawesome/free-solid-svg-icons': + specifier: ^6.7.1 + version: 6.7.1 + '@fortawesome/react-fontawesome': + specifier: ^0.2.2 + version: 0.2.2(@fortawesome/fontawesome-svg-core@6.7.1)(react@18.3.1) '@mdx-js/react': specifier: ^3.0.0 version: 3.1.0(@types/react@18.3.12)(react@18.3.1) @@ -1179,6 +1194,32 @@ packages: resolution: {integrity: sha512-0R/FR3bKVl4yl8QwbL4TYFfR+OXBRpVUaTJdENapBGR3YMwfM6/JnhGilWQO8AOwPJGtGoDK7ib8+8UF9f3OZQ==} engines: {node: '>=18.0'} + '@fortawesome/fontawesome-common-types@6.7.1': + resolution: {integrity: sha512-gbDz3TwRrIPT3i0cDfujhshnXO9z03IT1UKRIVi/VEjpNHtSBIP2o5XSm+e816FzzCFEzAxPw09Z13n20PaQJQ==} + engines: {node: '>=6'} + + '@fortawesome/fontawesome-svg-core@6.7.1': + resolution: {integrity: sha512-8dBIHbfsKlCk2jHQ9PoRBg2Z+4TwyE3vZICSnoDlnsHA6SiMlTwfmW6yX0lHsRmWJugkeb92sA0hZdkXJhuz+g==} + engines: {node: '>=6'} + + '@fortawesome/free-brands-svg-icons@6.7.1': + resolution: {integrity: sha512-nJR76eqPzCnMyhbiGf6X0aclDirZriTPRcFm1YFvuupyJOGwlNF022w3YBqu+yrHRhnKRpzFX+8wJKqiIjWZkA==} + engines: {node: '>=6'} + + '@fortawesome/free-regular-svg-icons@6.7.1': + resolution: {integrity: sha512-e13cp+bAx716RZOTQ59DhqikAgETA9u1qTBHO3e3jMQQ+4H/N1NC1ZVeFYt1V0m+Th68BrEL1/X6XplISutbXg==} + engines: {node: '>=6'} + + '@fortawesome/free-solid-svg-icons@6.7.1': + resolution: {integrity: sha512-BTKc0b0mgjWZ2UDKVgmwaE0qt0cZs6ITcDgjrti5f/ki7aF5zs+N91V6hitGo3TItCFtnKg6cUVGdTmBFICFRg==} + engines: {node: '>=6'} + + '@fortawesome/react-fontawesome@0.2.2': + resolution: {integrity: sha512-EnkrprPNqI6SXJl//m29hpaNzOp1bruISWaOiRtkMi/xSvHJlzc2j2JAYS7egxt/EbjSNV/k6Xy0AQI6vB2+1g==} + peerDependencies: + '@fortawesome/fontawesome-svg-core': ~1 || ~6 + react: '>=16.3' + '@hapi/hoek@9.3.0': resolution: {integrity: sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==} @@ -7186,6 +7227,30 @@ snapshots: - uglify-js - webpack-cli + '@fortawesome/fontawesome-common-types@6.7.1': {} + + '@fortawesome/fontawesome-svg-core@6.7.1': + dependencies: + '@fortawesome/fontawesome-common-types': 6.7.1 + + '@fortawesome/free-brands-svg-icons@6.7.1': + dependencies: + '@fortawesome/fontawesome-common-types': 6.7.1 + + '@fortawesome/free-regular-svg-icons@6.7.1': + dependencies: + '@fortawesome/fontawesome-common-types': 6.7.1 + + '@fortawesome/free-solid-svg-icons@6.7.1': + dependencies: + '@fortawesome/fontawesome-common-types': 6.7.1 + + '@fortawesome/react-fontawesome@0.2.2(@fortawesome/fontawesome-svg-core@6.7.1)(react@18.3.1)': + dependencies: + '@fortawesome/fontawesome-svg-core': 6.7.1 + prop-types: 15.8.1 + react: 18.3.1 + '@hapi/hoek@9.3.0': {} '@hapi/topo@5.1.0': diff --git a/src/components/HomepageFeatures/index.js b/src/components/HomepageFeatures/index.js index cf26f43..5797aac 100644 --- a/src/components/HomepageFeatures/index.js +++ b/src/components/HomepageFeatures/index.js @@ -1,11 +1,14 @@ import clsx from 'clsx'; import Heading from '@theme/Heading'; import styles from './styles.module.css'; +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import * as brandIcons from '@fortawesome/free-brands-svg-icons'; +import * as solidIcons from '@fortawesome/free-solid-svg-icons' const FeatureList = [ { title: 'Target Engineering Blog', - Svg: require('@site/static/img/undraw_docusaurus_mountain.svg').default, + Svg: , description: ( <> Hear more about other products and Target Engineering on our blog. @@ -14,7 +17,7 @@ const FeatureList = [ }, { title: 'Contributors welcome', - Svg: require('@site/static/img/undraw_docusaurus_tree.svg').default, + Svg: , description: ( <> Learn more about getting started in our community. @@ -23,7 +26,7 @@ const FeatureList = [ }, { title: 'Join us on Slack', - Svg: require('@site/static/img/undraw_docusaurus_react.svg').default, + Svg: , description: ( <> Come hang out with us in the Gopher Slack workspace. @@ -32,11 +35,11 @@ const FeatureList = [ }, ]; -function Feature({Svg, title, description}) { +function Feature({ Svg, title, description }) { return (
-
- +
+ {Svg}
{title} diff --git a/src/css/custom.css b/src/css/custom.css index 97f1d7b..fb784bc 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -6,13 +6,13 @@ /* You can override the default Infima variables here. */ :root { - --ifm-color-primary: #2e8555; - --ifm-color-primary-dark: #29784c; - --ifm-color-primary-darker: #277148; - --ifm-color-primary-darkest: #205d3b; - --ifm-color-primary-light: #33925d; - --ifm-color-primary-lighter: #359962; - --ifm-color-primary-lightest: #3cad6e; + --ifm-color-primary: #007a99; + --ifm-color-primary-dark: #016781; + --ifm-color-primary-darker: #00576d; + --ifm-color-primary-darkest: #013e4e; + --ifm-color-primary-light: #2e9aa6; + --ifm-color-primary-lighter: #389faa; + --ifm-color-primary-lightest: #4cafba; --ifm-code-font-size: 95%; --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1); } diff --git a/src/theme/MDXComponents.js b/src/theme/MDXComponents.js new file mode 100644 index 0000000..7b1e270 --- /dev/null +++ b/src/theme/MDXComponents.js @@ -0,0 +1,14 @@ +import React from 'react'; +import MDXComponents from '@theme-original/MDXComponents'; +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import { library } from '@fortawesome/fontawesome-svg-core'; +import { fab } from '@fortawesome/free-brands-svg-icons'; +import { fas } from '@fortawesome/free-solid-svg-icons'; + +library.add(fab, fas); + +export default { + ...MDXComponents, + FAIcon: FontAwesomeIcon, +}; + From c45c9dccebe339637e88fac35c80f13a7e2b7158 Mon Sep 17 00:00:00 2001 From: davidvader Date: Mon, 16 Dec 2024 09:46:22 -0600 Subject: [PATCH 3/4] chore: use new baseurl --- docusaurus.config.js | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/docusaurus.config.js b/docusaurus.config.js index fa137e3..26acd88 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -2,18 +2,6 @@ import { themes as prismThemes } from 'prism-react-renderer'; // This runs in Node.js - Don't use client-side code here (browser APIs, JSX...) -function modifyContent(filename, content) { - const titleMatch = content.match(/^#\s*(.+)/); - if (titleMatch && titleMatch[1]) { - filename = `${titleMatch[1]}.md`; - } - - return { - filename: filename, - content: content, - }; -} - /** @type {import('@docusaurus/types').Config} */ const config = { title: 'Vela', @@ -24,7 +12,7 @@ const config = { url: 'https://pages.git.target.com', // Set the // pathname under which your site is served // For GitHub pages deployment, it is often '//' - baseUrl: '/actions-playground/vela-prototype', + baseUrl: '/docs-v2/', plugins: [ require.resolve('docusaurus-lunr-search'), // [ @@ -153,4 +141,16 @@ const config = { }), }; +function modifyContent(filename, content) { + const titleMatch = content.match(/^#\s*(.+)/); + if (titleMatch && titleMatch[1]) { + filename = `${titleMatch[1]}.md`; + } + + return { + filename: filename, + content: content, + }; +} + export default config; From 5c942ff80e556658c89f54025fc0ec8433719ae2 Mon Sep 17 00:00:00 2001 From: davidvader Date: Mon, 16 Dec 2024 09:49:12 -0600 Subject: [PATCH 4/4] fix: install pnpm first --- .github/workflows/test-deploy.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/test-deploy.yml b/.github/workflows/test-deploy.yml index 03fe432..818cd2f 100644 --- a/.github/workflows/test-deploy.yml +++ b/.github/workflows/test-deploy.yml @@ -15,6 +15,13 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 + + - uses: pnpm/action-setup@v2 + name: Install pnpm + with: + version: 9 + run_install: true + - uses: actions/setup-node@v4 with: node-version: 22