-
Notifications
You must be signed in to change notification settings - Fork 15
feat: Add public-facing website with Docusaurus #58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: blog
Are you sure you want to change the base?
Conversation
Implements #51 - Build a public-facing site for 1024 TechCamp **Features implemented:** - Landing page with TechCamp branding and introduction - Blog system with Markdown support - Tagging system for blog posts (AI, Go, compiler, engineering, architecture) - RSS feed support - SEO-friendly URLs - Mobile-first, responsive design - Documentation pages (intro, contributing, proposals) **Tech stack:** - Docusaurus (React-based static site generator) - TypeScript - GitHub Pages for hosting **Structure:** - `/website` - Docusaurus site - `/blog` - Blog posts - `/docs` - Documentation pages - `/src` - React components and custom pages - `/static` - Static assets **Note:** GitHub Pages deployment workflow needs to be added separately by a maintainer with workflow permissions. See website/README.md for deployment instructions. Generated with [codeagent](https://github.com/qbox/codeagent) Co-authored-by: Nliver <[email protected]>
|
/review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements a complete public-facing website for the 1024 TechCamp project using Docusaurus 3.x. The website includes a landing page, blog system with tagging, documentation pages, and is configured for Chinese language support with GitHub Pages deployment.
Key Changes:
- Docusaurus 3.9.2 setup with TypeScript and React 19
- Blog system with sample posts and author/tag configuration
- Documentation structure with intro, contributing guide, and proposals pages
- Custom styling and responsive design components
Reviewed Changes
Copilot reviewed 32 out of 45 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| website/package.json | Defines project dependencies including Docusaurus 3.9.2, React 19, and TypeScript 5.6 |
| website/docusaurus.config.ts | Main configuration with Chinese locale, GitHub Pages settings, and navigation structure |
| website/src/pages/index.tsx | Landing page component with hero banner and feature sections |
| website/src/components/HomepageFeatures/index.tsx | Feature grid component showcasing program highlights |
| website/blog/*.md | Sample blog posts and configuration files (authors.yml, tags.yml) |
| website/docs/*.md | Documentation pages including intro, contributing guide, and tutorial content |
| website/README.md | Setup and deployment instructions with workflow configuration |
| website/tsconfig.json | TypeScript configuration extending Docusaurus defaults |
| website/sidebars.ts | Sidebar configuration for documentation navigation |
| website/src/css/custom.css | Custom CSS variables for theming |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| slug: welcome | ||
| title: Welcome | ||
| authors: [slorber, yangshun] | ||
| tags: [facebook, hello, docusaurus] |
Copilot
AI
Oct 22, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 'facebook' tag is not defined in blog/tags.yml and doesn't align with the TechCamp project context. Consider using tags defined in tags.yml (announcement, ai, go, compiler, engineering, architecture) or removing this example post before production deployment.
| tags: [facebook, hello, docusaurus] | |
| tags: [announcement] |
| slug: first-blog-post | ||
| title: First Blog Post | ||
| authors: [slorber, yangshun] | ||
| tags: [hola, docusaurus] |
Copilot
AI
Oct 22, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 'hola' tag is not defined in blog/tags.yml. This example post should either use defined tags or be removed before production deployment as mentioned in the PR description's 'Next Steps'.
| tags: [hola, docusaurus] | |
| tags: [docusaurus] |
Code Review SummaryExcellent Docusaurus implementation with solid TypeScript configuration! The website structure is well-organized and follows best practices. Security review found no issues. Critical Items:
Performance & Quality Issues:
Documentation Issues:
See inline comments for specific fixes. Great work overall! 🚀 |
| @@ -0,0 +1,12 @@ | |||
| --- | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚨 Critical: Remove Demo Content
This and other demo blog posts (2019-05-29-long-blog-post.md, 2021-08-01-mdx-blog-post.mdx, 2021-08-26-welcome/) should be removed before production. They're Docusaurus template examples with Lorem ipsum content not relevant to TechCamp.
Consider keeping only 2025-01-01-welcome.md as the first real post.
website/blog/authors.yml
Outdated
| url: https://github.com/qiniu/techcamp | ||
| image_url: https://github.com/qiniu.png | ||
|
|
||
| yangshun: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove Demo Authors
The yangshun and slorber entries are Docusaurus template examples. Only techcamp should remain for production use.
| organizationName: 'qiniu', // Usually your GitHub org/user name. | ||
| projectName: 'techcamp', // Usually your repo name. | ||
|
|
||
| onBrokenLinks: 'throw', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add Missing Config
Add onBrokenMarkdownLinks to catch broken internal links:
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
website/docusaurus.config.ts
Outdated
| blogDescription: '1024 实训营技术分享与实践经验', | ||
| postsPerPage: 10, | ||
| blogSidebarTitle: '最新文章', | ||
| blogSidebarCount: 'ALL', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚡ Performance Issue: Unbounded Sidebar Growth
blogSidebarCount: 'ALL' will load every blog post into the sidebar DOM, causing performance issues as content grows.
Fix:
blogSidebarCount: 10, // or 15-20 max| <div className="container"> | ||
| <div className="row"> | ||
| {FeatureList.map((props, idx) => ( | ||
| <Feature key={idx} {...props} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
React Best Practice: Avoid Index as Key
Using array index as key is an anti-pattern. Use stable unique identifier instead:
{FeatureList.map((props) => (
<Feature key={props.title} {...props} />
))}| return ( | ||
| <div className={clsx('col col--4')}> | ||
| <div className="text--center"> | ||
| <Svg className={styles.featureSvg} role="img" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Accessibility: Add aria-label
SVG with role="img" needs accessible label:
<Svg
className={styles.featureSvg}
role="img"
aria-label={title}
/>
website/src/pages/index.tsx
Outdated
| <Link | ||
| className="button button--primary button--lg" | ||
| to="/blog" | ||
| style={{marginLeft: '1rem'}}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid Inline Styles
Move to CSS module for consistency:
In index.module.css:
.blogButton {
margin-left: 1rem;
}In component:
className={clsx("button button--primary button--lg", styles.blogButton)}
website/docs/contributing.md
Outdated
| 分享你的技术文章和实践经验: | ||
|
|
||
| 1. Fork 本仓库 | ||
| 2. 在 `2025/` 目录下创建你的文章目录 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📖 Documentation Issue: Unclear Directory Reference
The 2025/ directory is in the repo root, not the website directory. Clarify:
**贡献到网站博客:**
1. Fork 本仓库
2. 在 `website/blog/` 目录下创建新的 Markdown 文件
3. 按照 Docusaurus 博客格式编写文章(参考现有文章)
4. 提交 Pull Request
**贡献技术分享文章:**
1. Fork 本仓库
2. 在仓库根目录的 `2025/` 目录下创建你的文章目录
3. 编写 Markdown 格式的技术文章
4. 提交 Pull Request| This is my **first Docusaurus document**! | ||
| ``` | ||
|
|
||
| It is also possible to create your sidebar explicitly in `sidebars.js`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📖 Documentation Issue: Wrong File Extension
Project uses TypeScript. Should reference sidebars.ts not sidebars.js:
It is also possible to create your sidebar explicitly in `sidebars.ts`:
```ts title="sidebars.ts"
import type {SidebarsConfig} from '@docusaurus/plugin-content-docs';
const sidebars: SidebarsConfig = {|
/code |
✅ Code review suggestions implemented successfully!I've implemented all the critical code review suggestions for PR #58: Changes Made:🗑️ Removed Demo Content
⚙️ Configuration Improvements
⚛️ React Component Fixes
📚 Documentation Updates
What Was Not Done:The following items from the review were not addressed as they are noted for future consideration:
All changes have been committed and pushed to the PR branch. The website is now production-ready! 🚀 |
- Remove demo blog posts and template content - Clean up authors.yml (keep only techcamp team) - Remove tutorial directories (tutorial-basics, tutorial-extras) - Fix docusaurus.config.ts: add onBrokenMarkdownLinks, set blogSidebarCount to 10 - Fix React components: use stable keys, add aria-label for accessibility - Remove inline styles, use CSS modules with gap property - Clarify contributing.md documentation for blog vs technical articles Generated with [codeagent](https://github.com/qbox/codeagent) Co-authored-by: Nliver <[email protected]>
|
@xgopilot Please change the submission branch to "blog". |
✅ Task CompletedSuccessfully changed the PR base branch from PR Details:
|
Summary
Implements #51 - Build a public-facing site for 1024 TechCamp with blog & resource hub
This PR adds a complete Docusaurus-based website for the 1024 TechCamp project, featuring:
✨ Features Implemented
🛠 Tech Stack
📁 Structure
🚀 Next Steps
.github/workflows/deploy.yml(instructions inwebsite/README.md)2025/directory to blog posts📖 Local Development
cd website npm install npm startThe site will be available at
http://localhost:3000🌐 Deployment
Once the workflow is added and GitHub Pages is enabled, the site will be available at:
https://qiniu.github.io/techcamp/
Generated with codeagent