From 7f59a2338e7d0f4d9ff7bc5a10a0dfe6896f5199 Mon Sep 17 00:00:00 2001 From: Eyad Date: Tue, 12 Mar 2024 13:51:54 -0400 Subject: [PATCH] removed some docusaurus config --- babel.config.js | 1 - crowdin.yml | 11 -- docusaurus.config.js | 270 ------------------------------------------- sidebars.js | 3 +- 4 files changed, 1 insertion(+), 284 deletions(-) delete mode 100644 crowdin.yml delete mode 100644 docusaurus.config.js diff --git a/babel.config.js b/babel.config.js index 1e2707ac8b9..6441b7bde4d 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,4 +1,3 @@ module.exports = { - presets: [require.resolve('@docusaurus/core/lib/babel/preset')], compact: true, }; diff --git a/crowdin.yml b/crowdin.yml deleted file mode 100644 index 2ef948202b6..00000000000 --- a/crowdin.yml +++ /dev/null @@ -1,11 +0,0 @@ -files: - - source: /docs/**/*.md - translation: /i18n/%two_letters_code%/docusaurus-plugin-content-docs/current/**/%original_file_name% - - source: /docs/**/*.json - translation: /i18n/%two_letters_code%/docusaurus-plugin-content-docs/current/**/%original_file_name% - - source: /docs/**/**/*.md - translation: /i18n/%two_letters_code%/docusaurus-plugin-content-docs/current/**/**/%original_file_name% - - source: /docs/**/*.svg - translation: /i18n/%two_letters_code%/docusaurus-plugin-content-docs/current/**/%original_file_name% - - source: /docs/**/*.webp - translation: /i18n/%two_letters_code%/docusaurus-plugin-content-docs/current/**/%original_file_name% diff --git a/docusaurus.config.js b/docusaurus.config.js deleted file mode 100644 index c9d51b3270b..00000000000 --- a/docusaurus.config.js +++ /dev/null @@ -1,270 +0,0 @@ -const lightCodeTheme = require("prism-react-renderer/themes/github"); -const darkCodeTheme = require("prism-react-renderer/themes/dracula"); -const math = require("remark-math"); - -async function createConfig() { - const katex = (await import("rehype-katex")).default; - return { - title: "Learn Prompting: Your Guide to Communicating with AI", - tagline: - "A Free, Open Source Course on Communicating with Artificial Intelligence", - url: "https://learnprompting.org", - baseUrl: "/", - onBrokenLinks: "throw", - onBrokenMarkdownLinks: "warn", - favicon: "img/favicon.ico", - organizationName: "trigaten", - projectName: "promptgineering", - deploymentBranch: "gh-pages", - trailingSlash: false, - i18n: { - defaultLocale: "en", - locales: [ - "en", - "es", - "fr", - "ja", - "pt", - "zh-Hans", - "zh-tw", - "ko", - "si", - "ru", - "ar", - "de", - "uk", - "id", - "ur", - ], - localeConfigs: { - 'zh-tw': { - label: '繁體中文', - direction: 'ltr', - }, - 'ur': { - label: 'اردو', - direction: 'rtl', - }, - }, - }, - scripts: [ - { - src: - "https://tag.clearbitscripts.com/v1/pk_5621ff511ea83a6ec015bee0a0b5dd79/tags.js", - async: true, - }, - ], - plugins: [ - [ - "@docusaurus/plugin-client-redirects", - { - redirects: [ - { - to: "/docs/basics/formalizing", - from: "/docs/basics/standard_prompt", - }, - { - to: "/docs/tooling/IDEs/intro", - from: "/docs/IDEs/intro", - }, - { - to: "/our_services", - from: "/consulting", - }, - ], - }, - ], - async function myPlugin(context, options) { - return { - name: "docusaurus-tailwindcss", - configurePostCss(postcssOptions) { - postcssOptions.plugins.push(require("tailwindcss")); - postcssOptions.plugins.push(require("autoprefixer")); - return postcssOptions; - }, - }; - }, - ["posthog-docusaurus", { - apiKey: process.env.POSTHOG_API_KEY || "DEV", - appUrl: "https://app.posthog.com", // optional - enableInDevelopment: false, // optional - }], - ], - - presets: [ - [ - "classic", - { - gtag: { - trackingID: "G-FV0C417KS8", - }, - googleAnalytics: { - trackingID: "G-FV0C417KS8", - }, - docs: { - admonitions: { - tag: ":::", - keywords: [ - "note", - "tip", - "info", - "caution", - "danger", - "takeaways", - ], - }, - sidebarPath: require.resolve("./sidebars.js"), - editUrl: "https://github.com/trigaten/promptgineering/tree/v1.2.3", - remarkPlugins: [ - math, - (await import("remark-gfm")).default, - [ - (await import("@benchmark-urbanism/remark-bibtex")).default, - { bibtexFile: "bibliography.bib" }, - ], - [ - (await import("@renatonagliati/remark-auto-glossary")).default, - { yamlFile: "glossary.yml" }, - ], - ], - rehypePlugins: [[katex, { strict: false }]], - }, - theme: { - customCss: require.resolve("./src/css/custom.css"), - }, - }, - ], - ], - stylesheets: [ - { - href: "https://cdn.jsdelivr.net/npm/katex@0.13.24/dist/katex.min.css", - type: "text/css", - integrity: - "sha384-odtC+0UGzzFL/6PNoE8rX/SPcQDXBJ+uRepguP4QkPCm2LBxH3FA3y+fKSiJ+AmM", - crossorigin: "anonymous", - defer: true, - }, - { - href: "https://fonts.googleapis.com", - rel: "preconnect", - async: true, - }, - { - href: "https://fonts.gstatic.com", - rel: "preconnect", - crossorigin: "", - async: true, - }, - { - href: - "https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap", - async: true, - }, - ], - themeConfig: { - metadata: [ - { - name: "description", - content: - "Learn Prompting is the largest and most comprehensive course in prompt engineering available on the internet, with over 60 content modules, translated into 9 languages, and a thriving community.", - }, - { - name: "keywords", - content: - "prompting, prompt engineering, learn prompting, learn, prompt, AI, chatGPT", - }, - { - name: "og:title", - content: "Learn Prompting: Your Guide to Communicating with AI", - }, - { - name: "og:description", - content: - "Learn Prompting is the largest and most comprehensive course in prompt engineering available on the internet, with over 60 content modules, translated into 9 languages, and a thriving community.", - }, - { - name: "og:url", - content: "https://learnprompting.org", - }, - { - name: "og:image", - content: "https://learnprompting.org/docs/assets/astronaut.webp", // Replace this with the actual path to your og-image. - }, - { - name: "og:type", - content: "website", - }, - { - to: "consulting", - label: "Consulting", - position: "left", - }, - { - name: "twitter:card", - content: "summary_large_image", - }, - { - name: "twitter:title", - content: "Learn Prompting: Your Guide to Communicating with AI", - }, - { - name: "twitter:description", - content: - "Learn Prompting is the largest and most comprehensive course in prompt engineering available on the internet, with over 60 content modules, translated into 9 languages, and a thriving community.", - }, - { - name: "twitter:url", - content: "https://learnprompting.org", - }, - { - name: "twitter:image", - content: "https://learnprompting.org/img/twitter-image.webp", // Replace this with the actual path to your twitter-image. - }, - ], - navbar: { - title: "Learn Prompting", - logo: { - alt: "My Site Logo", - src: "img/simple_ai.webp", - }, - items: [ - { - type: "custom-myAwesomeNavbarItem", - position: "left", - }, - { - type: "localeDropdown", - position: "right", - }, - { - href: "https://github.com/trigaten/Learn_Prompting/releases", - label: "Change Log", - position: "right", - }, - ], - }, - announcementBar: { - id: "announcement", - content: - 'Now available: Intro to Prompt Engineering', - backgroundColor: "#53ffd4", - textColor: "#000", - isCloseable: true, - }, - footer: { - style: "dark", - copyright: `Copyright © ${new Date().getFullYear()} Learn Prompting.`, - }, - prism: { - theme: lightCodeTheme, - darkTheme: darkCodeTheme, - }, - }, - markdown: { - mermaid: true, - }, - themes: ["@docusaurus/theme-mermaid"], - }; -} - -module.exports = createConfig; \ No newline at end of file diff --git a/sidebars.js b/sidebars.js index 9ab54c2459c..9395420bf43 100644 --- a/sidebars.js +++ b/sidebars.js @@ -11,10 +11,9 @@ // @ts-check -/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */ const sidebars = { // By default, Docusaurus generates a sidebar from the docs folder structure - tutorialSidebar: [{type: 'autogenerated', dirName: '.'}], + tutorialSidebar: [{ type: "autogenerated", dirName: "." }], // But you can create a sidebar manually /*