|
| 1 | +// @ts-check |
| 2 | +// `@type` JSDoc annotations allow editor autocompletion and type checking |
| 3 | +// (when paired with `@ts-check`). |
| 4 | +// There are various equivalent ways to declare your Docusaurus config. |
| 5 | +// See: https://docusaurus.io/docs/api/docusaurus-config |
| 6 | + |
| 7 | +import {themes as prismThemes} from 'prism-react-renderer'; |
| 8 | + |
| 9 | +// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...) |
| 10 | + |
| 11 | +/** @type {import('@docusaurus/types').Config} */ |
| 12 | +const config = { |
| 13 | + title: 'The Python Ledger', |
| 14 | + tagline: 'Let`s learn Python', |
| 15 | + favicon: 'img/favicon.ico', |
| 16 | + |
| 17 | + // Future flags, see https://docusaurus.io/docs/api/docusaurus-config#future |
| 18 | + future: { |
| 19 | + v4: true, // Improve compatibility with the upcoming Docusaurus v4 |
| 20 | + }, |
| 21 | + |
| 22 | + // Set the production url of your site here |
| 23 | + url: 'https://your-docusaurus-site.example.com', |
| 24 | + // Set the /<baseUrl>/ pathname under which your site is served |
| 25 | + // For GitHub pages deployment, it is often '/<projectName>/' |
| 26 | + baseUrl: '/', |
| 27 | + |
| 28 | + // GitHub pages deployment config. |
| 29 | + // If you aren't using GitHub pages, you don't need these. |
| 30 | + organizationName: 'facebook', // Usually your GitHub org/user name. |
| 31 | + projectName: 'docusaurus', // Usually your repo name. |
| 32 | + |
| 33 | + onBrokenLinks: 'throw', |
| 34 | + |
| 35 | + // Even if you don't use internationalization, you can use this field to set |
| 36 | + // useful metadata like html lang. For example, if your site is Chinese, you |
| 37 | + // may want to replace "en" with "zh-Hans". |
| 38 | + i18n: { |
| 39 | + defaultLocale: 'en', |
| 40 | + locales: ['en'], |
| 41 | + }, |
| 42 | + |
| 43 | + presets: [ |
| 44 | + [ |
| 45 | + 'classic', |
| 46 | + /** @type {import('@docusaurus/preset-classic').Options} */ |
| 47 | + ({ |
| 48 | + docs: { |
| 49 | + path: '../the-python-ledger/curriculum', // Path to your local Markdown repo |
| 50 | + routeBasePath: '/', |
| 51 | + sidebarPath: require.resolve('./sidebars.js'), |
| 52 | + // This allows students to click "Edit this page" and go to the content repo |
| 53 | + editUrl: 'https://github.com/razorblade23/the-python-ledger/edit/main/', |
| 54 | + }, |
| 55 | + blog: { |
| 56 | + showReadingTime: true, |
| 57 | + feedOptions: { |
| 58 | + type: ['rss', 'atom'], |
| 59 | + xslt: true, |
| 60 | + }, |
| 61 | + // Please change this to your repo. |
| 62 | + // Remove this to remove the "edit this page" links. |
| 63 | + editUrl: |
| 64 | + 'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/', |
| 65 | + // Useful options to enforce blogging best practices |
| 66 | + onInlineTags: 'warn', |
| 67 | + onInlineAuthors: 'warn', |
| 68 | + onUntruncatedBlogPosts: 'warn', |
| 69 | + }, |
| 70 | + theme: { |
| 71 | + customCss: './src/css/custom.css', |
| 72 | + }, |
| 73 | + }), |
| 74 | + ], |
| 75 | + ], |
| 76 | + |
| 77 | + themeConfig: |
| 78 | + /** @type {import('@docusaurus/preset-classic').ThemeConfig} */ |
| 79 | + ({ |
| 80 | + // Replace with your project's social card |
| 81 | + image: 'img/docusaurus-social-card.jpg', |
| 82 | + colorMode: { |
| 83 | + respectPrefersColorScheme: true, |
| 84 | + }, |
| 85 | + navbar: { |
| 86 | + title: 'The Python Ledger', |
| 87 | + logo: { |
| 88 | + alt: 'The python Ledger logo', |
| 89 | + src: 'img/logo.svg', |
| 90 | + }, |
| 91 | + items: [ |
| 92 | + { |
| 93 | + type: 'docSidebar', |
| 94 | + sidebarId: 'tutorialSidebar', |
| 95 | + position: 'left', |
| 96 | + label: 'Tutorial', |
| 97 | + }, |
| 98 | + { |
| 99 | + href: 'https://github.com/razorblade23/the-python-ledger', |
| 100 | + label: 'GitHub', |
| 101 | + position: 'right', |
| 102 | + }, |
| 103 | + ], |
| 104 | + }, |
| 105 | + footer: { |
| 106 | + style: 'dark', |
| 107 | + links: [ |
| 108 | + { |
| 109 | + title: 'The Python Ledger', |
| 110 | + items: [ |
| 111 | + { |
| 112 | + label: 'Curriculum', |
| 113 | + href: 'https://github.com/razorblade23/the-python-ledger', |
| 114 | + }, |
| 115 | + { |
| 116 | + label: 'Engine', |
| 117 | + href: 'https://github.com/razorblade23/the-python-ledger-engine', |
| 118 | + }, |
| 119 | + ], |
| 120 | + }, |
| 121 | + { |
| 122 | + title: 'Community', |
| 123 | + items: [ |
| 124 | + { |
| 125 | + label: 'Discord', |
| 126 | + href: 'https://discordapp.com/invite/docusaurus', |
| 127 | + } |
| 128 | + ], |
| 129 | + }, |
| 130 | + { |
| 131 | + title: 'More', |
| 132 | + items: [ |
| 133 | + { |
| 134 | + label: 'GitHub', |
| 135 | + href: 'https://github.com/facebook/docusaurus', |
| 136 | + }, |
| 137 | + ], |
| 138 | + }, |
| 139 | + ], |
| 140 | + copyright: `Copyright © ${new Date().getFullYear()} The Python Ledger. Built with Docusaurus.`, |
| 141 | + }, |
| 142 | + prism: { |
| 143 | + theme: prismThemes.github, |
| 144 | + darkTheme: prismThemes.dracula, |
| 145 | + }, |
| 146 | + }), |
| 147 | +}; |
| 148 | + |
| 149 | +export default config; |
0 commit comments