|
| 1 | +import { themes as prismThemes } from 'prism-react-renderer'; |
| 2 | +import type { Config } from '@docusaurus/types'; |
| 3 | +import type * as Preset from '@docusaurus/preset-classic'; |
| 4 | + |
| 5 | +// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...) |
| 6 | + |
| 7 | +const config: Config = { |
| 8 | + title: 'AI Coding Course', |
| 9 | + tagline: 'Master AI-assisted software engineering for experienced developers', |
| 10 | + favicon: 'img/favicon.ico', |
| 11 | + |
| 12 | + // Future flags, see https://docusaurus.io/docs/api/docusaurus-config#future |
| 13 | + future: { |
| 14 | + v4: true, // Improve compatibility with the upcoming Docusaurus v4 |
| 15 | + }, |
| 16 | + |
| 17 | + // Set the production url of your site here |
| 18 | + url: 'https://ofriw.github.io', |
| 19 | + // Set the /<baseUrl>/ pathname under which your site is served |
| 20 | + // For GitHub pages deployment, it is often '/<projectName>/' |
| 21 | + baseUrl: '/AI-Coding-Course/', |
| 22 | + |
| 23 | + // GitHub pages deployment config. |
| 24 | + // If you aren't using GitHub pages, you don't need these. |
| 25 | + organizationName: 'ofriw', // Usually your GitHub org/user name. |
| 26 | + projectName: 'AI-Coding-Course', // Usually your repo name. |
| 27 | + deploymentBranch: 'gh-pages', |
| 28 | + trailingSlash: false, |
| 29 | + |
| 30 | + onBrokenLinks: 'throw', |
| 31 | + |
| 32 | + // Even if you don't use internationalization, you can use this field to set |
| 33 | + // useful metadata like html lang. For example, if your site is Chinese, you |
| 34 | + // may want to replace "en" with "zh-Hans". |
| 35 | + i18n: { |
| 36 | + defaultLocale: 'en', |
| 37 | + locales: ['en'], |
| 38 | + }, |
| 39 | + |
| 40 | + presets: [ |
| 41 | + [ |
| 42 | + 'classic', |
| 43 | + { |
| 44 | + docs: { |
| 45 | + sidebarPath: './sidebars.ts', |
| 46 | + editUrl: |
| 47 | + 'https://github.com/ofriw/AI-Coding-Course/tree/main/website/', |
| 48 | + showLastUpdateTime: false, |
| 49 | + showLastUpdateAuthor: false, |
| 50 | + }, |
| 51 | + blog: { |
| 52 | + showReadingTime: true, |
| 53 | + feedOptions: { |
| 54 | + type: ['rss', 'atom'], |
| 55 | + xslt: true, |
| 56 | + }, |
| 57 | + editUrl: |
| 58 | + 'https://github.com/ofriw/AI-Coding-Course/tree/main/website/', |
| 59 | + blogTitle: 'AI Coding Insights', |
| 60 | + blogDescription: |
| 61 | + 'Case studies, industry trends, and best practices for AI-assisted development', |
| 62 | + postsPerPage: 10, |
| 63 | + blogSidebarTitle: 'Recent posts', |
| 64 | + blogSidebarCount: 'ALL', |
| 65 | + onInlineTags: 'warn', |
| 66 | + onInlineAuthors: 'warn', |
| 67 | + onUntruncatedBlogPosts: 'warn', |
| 68 | + }, |
| 69 | + theme: { |
| 70 | + customCss: './src/css/custom.css', |
| 71 | + }, |
| 72 | + } satisfies Preset.Options, |
| 73 | + ], |
| 74 | + ], |
| 75 | + |
| 76 | + themes: ['@docusaurus/theme-live-codeblock'], |
| 77 | + |
| 78 | + plugins: [ |
| 79 | + [ |
| 80 | + require.resolve('@easyops-cn/docusaurus-search-local'), |
| 81 | + { |
| 82 | + hashed: true, |
| 83 | + language: ['en'], |
| 84 | + highlightSearchTermsOnTargetPage: true, |
| 85 | + explicitSearchResultPath: true, |
| 86 | + indexBlog: true, |
| 87 | + indexDocs: true, |
| 88 | + docsRouteBasePath: '/docs', |
| 89 | + }, |
| 90 | + ], |
| 91 | + ], |
| 92 | + |
| 93 | + themeConfig: { |
| 94 | + // Replace with your project's social card |
| 95 | + image: 'img/docusaurus-social-card.jpg', |
| 96 | + colorMode: { |
| 97 | + respectPrefersColorScheme: true, |
| 98 | + }, |
| 99 | + navbar: { |
| 100 | + title: 'AI Coding Course', |
| 101 | + logo: { |
| 102 | + alt: 'AI Coding Course Logo', |
| 103 | + src: 'img/logo.svg', |
| 104 | + }, |
| 105 | + items: [ |
| 106 | + { |
| 107 | + type: 'docSidebar', |
| 108 | + sidebarId: 'tutorialSidebar', |
| 109 | + position: 'left', |
| 110 | + label: 'Course', |
| 111 | + }, |
| 112 | + { to: '/blog', label: 'Blog', position: 'left' }, |
| 113 | + { |
| 114 | + type: 'docsVersionDropdown', |
| 115 | + position: 'right', |
| 116 | + dropdownActiveClassDisabled: true, |
| 117 | + }, |
| 118 | + { |
| 119 | + href: 'https://github.com/ofriw/AI-Coding-Course', |
| 120 | + label: 'GitHub', |
| 121 | + position: 'right', |
| 122 | + }, |
| 123 | + ], |
| 124 | + }, |
| 125 | + footer: { |
| 126 | + style: 'dark', |
| 127 | + links: [ |
| 128 | + { |
| 129 | + title: 'Course', |
| 130 | + items: [ |
| 131 | + { |
| 132 | + label: 'Getting Started', |
| 133 | + to: '/docs', |
| 134 | + }, |
| 135 | + { |
| 136 | + label: 'Course Modules', |
| 137 | + to: '/docs/fundamentals', |
| 138 | + }, |
| 139 | + ], |
| 140 | + }, |
| 141 | + { |
| 142 | + title: 'Community', |
| 143 | + items: [ |
| 144 | + { |
| 145 | + label: 'GitHub Discussions', |
| 146 | + href: 'https://github.com/ofriw/AI-Coding-Course/discussions', |
| 147 | + }, |
| 148 | + { |
| 149 | + label: 'Report Issues', |
| 150 | + href: 'https://github.com/ofriw/AI-Coding-Course/issues', |
| 151 | + }, |
| 152 | + ], |
| 153 | + }, |
| 154 | + { |
| 155 | + title: 'More', |
| 156 | + items: [ |
| 157 | + { |
| 158 | + label: 'Blog', |
| 159 | + to: '/blog', |
| 160 | + }, |
| 161 | + { |
| 162 | + label: 'GitHub', |
| 163 | + href: 'https://github.com/ofriw/AI-Coding-Course', |
| 164 | + }, |
| 165 | + ], |
| 166 | + }, |
| 167 | + ], |
| 168 | + copyright: `Copyright © ${new Date().getFullYear()} AI Coding Course. Built with Docusaurus.`, |
| 169 | + }, |
| 170 | + prism: { |
| 171 | + theme: prismThemes.github, |
| 172 | + darkTheme: prismThemes.dracula, |
| 173 | + additionalLanguages: ['bash', 'python', 'yaml', 'json', 'markdown'], |
| 174 | + }, |
| 175 | + } satisfies Preset.ThemeConfig, |
| 176 | +}; |
| 177 | + |
| 178 | +export default config; |
0 commit comments