Skip to content

Commit 84eec90

Browse files
ofriwclaude
andcommitted
Add Docusaurus website configuration
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 94079f4 commit 84eec90

File tree

13 files changed

+22729
-0
lines changed

13 files changed

+22729
-0
lines changed

website/.eslintrc.js

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
module.exports = {
2+
root: true,
3+
env: {
4+
browser: true,
5+
es2021: true,
6+
node: true,
7+
},
8+
extends: [
9+
'eslint:recommended',
10+
'plugin:@typescript-eslint/recommended',
11+
'plugin:react/recommended',
12+
'plugin:react-hooks/recommended',
13+
],
14+
parser: '@typescript-eslint/parser',
15+
parserOptions: {
16+
ecmaVersion: 'latest',
17+
sourceType: 'module',
18+
ecmaFeatures: {
19+
jsx: true,
20+
},
21+
},
22+
plugins: ['@typescript-eslint', 'react', 'react-hooks'],
23+
settings: {
24+
react: {
25+
version: 'detect',
26+
},
27+
},
28+
rules: {
29+
'react/react-in-jsx-scope': 'off', // Not needed in modern React
30+
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
31+
'@typescript-eslint/no-explicit-any': 'warn',
32+
'@typescript-eslint/no-require-imports': 'off', // Docusaurus uses require for static assets
33+
},
34+
ignorePatterns: ['build/', '.docusaurus/', 'node_modules/', '*.config.js'],
35+
};

website/.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Dependencies
2+
/node_modules
3+
4+
# Production
5+
/build
6+
7+
# Generated files
8+
.docusaurus
9+
.cache-loader
10+
11+
# Misc
12+
.DS_Store
13+
.env.local
14+
.env.development.local
15+
.env.test.local
16+
.env.production.local
17+
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*

website/.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx lint-staged

website/.lintstagedrc.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
'website/**/*.{ts,tsx}': ['eslint --fix', 'prettier --write'],
3+
'website/**/*.{js,jsx,json,css,md}': ['prettier --write'],
4+
};

website/.prettierignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Build output
2+
build/
3+
.docusaurus/
4+
5+
# Dependencies
6+
node_modules/
7+
8+
# Lock files
9+
package-lock.json
10+
yarn.lock
11+
pnpm-lock.yaml
12+
13+
# Cache
14+
.cache/

website/.prettierrc.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"semi": true,
3+
"trailingComma": "es5",
4+
"singleQuote": true,
5+
"printWidth": 80,
6+
"tabWidth": 2,
7+
"useTabs": false,
8+
"arrowParens": "always",
9+
"endOfLine": "lf"
10+
}

website/README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Website
2+
3+
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
4+
5+
## Installation
6+
7+
```bash
8+
npm install
9+
```
10+
11+
## Local Development
12+
13+
```bash
14+
npm run start
15+
```
16+
17+
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
18+
19+
## Build
20+
21+
```bash
22+
npm run build
23+
```
24+
25+
This command generates static content into the `build` directory and can be served using any static contents hosting service.
26+
27+
## Deployment
28+
29+
The website is automatically deployed to GitHub Pages via GitHub Actions when changes are pushed to the main branch. See `../.github/workflows/deploy.yml` for configuration.

website/docusaurus.config.ts

Lines changed: 178 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
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

Comments
 (0)