Welcome to HardCode Blog! This is a modern blog platform with Neo-Brutalism design aesthetic.
Project Goals
The main goals of this project are to create a feature-rich, SEO-friendly blog platform with:
- 🎨 Neo-Brutalism Design - Unique visual style
- 📝 Markdown Support - Write articles in Markdown
- 🌍 Multi-language Support - Support for Chinese and English content
- 🔍 Powerful Search - Full-text search powered by Algolia
- 🚀 High Performance - Static site generation with Next.js 14+
Tech Stack
Frontend Framework
- Next.js 14+ - Latest version with App Router
- React 18 - Modern React features
- TypeScript - Type-safe development experience
Styling
- Tailwind CSS - Utility-first CSS framework
- Custom Theme - Complete Neo-Brutalism design system
Content Management
- Markdown - File-based content management
- Frontmatter - YAML format metadata
- remark/rehype - Powerful Markdown processing pipeline
Next Steps
We will implement in the upcoming phases:
- Markdown processing and rendering
- Code syntax highlighting
- Math formula support
- Chart rendering
- Full-text search
- RSS feeds
Stay tuned for more exciting content!
- Point A
- Point B
- Point C
| Feature | Status |
|---|---|
| Markdown Support | Done |
| Math Formulas | Done |
| Chart Rendering | Done |
Code Examples
function hello(name: string): string {
return `Hello, ${name}!`
}
console.log(hello('World'))Math Formulas
Inline formula:
Block formula:
Code Blocks and Line Numbers
All code blocks now automatically display line numbers!
function fibonacci(n) {
if (n <= 1) return n;
return fibonacci(n - 1) + fibonacci(n - 2);
}
// Call the function
const result = fibonacci(10);
console.log(`10th Fibonacci number: ${result}`);def quick_sort(arr):
if len(arr) <= 1:
return arr
pivot = arr[len(arr) // 2]
left = [x for x in arr if x < pivot]
middle = [x for x in arr if x == pivot]
right = [x for x in arr if x > pivot]
return quick_sort(left) + middle + quick_sort(right)
# Test
numbers = [3, 6, 8, 10, 1, 2, 1, 3, 6, 8, 10, 1, 2, 1, 3, 6, 8, 10, 1, 2, 1, 3, 6, 8, 10, 1, 2, 1]
print(quick_sort(numbers))Unordered Lists
Unordered lists now have beautiful Neo-Brutalism square markers:
- First item - uses retro cyan squares
- Second item - black border with shadow
- Third item - strong visual impact
- Nested list item - Barbie pink
- Another nested item
- Third-level nested - construction yellow
- Clear hierarchy
Ordered Lists
Ordered lists use numbered badges with shadows:
- Step one - planning and design
- Step two - writing code
- Step three - testing features
- Unit tests - orange badge
- Integration tests
- End-to-end tests
- Automated tests - electric blue badge
- Manual tests
- Step four - deployment
Table Showcase
Tables have full Neo-Brutalism styling:
| Feature | Description | Status |
|---|---|---|
| Code line numbers | Automatically show line numbers for all code blocks | ✅ Done |
| List styles | Custom markers and color hierarchy | ✅ Done |
| Table styles | Bold borders, shadows, hover effects | ✅ Done |
| Math formulas | KaTeX rendering support | ✅ Done |
| Mermaid | Flowchart and diagram support | ✅ Done |
Tech Stack Comparison
| Tech | Version | Usage | Advantage |
|---|---|---|---|
| Next.js | 14+ | Framework | SSG/SSR support |
| Tailwind CSS | 3.4 | Styling | Utility-first approach |
| Shiki | 3.17 | Highlight | Accurate VSCode themes |
| KaTeX | 0.16 | Math | Fast rendering |
| Mermaid | 11.12 | Diagrams | Rich diagram types |
Math Formulas
Inline formula and the Einstein field equation.
Block formula:
Matrix representation:
Mixed Content
Combining multiple elements:
-
Code and lists together
- Install dependencies:
npm install - Start the dev server:
npm run dev - Build for production:
npm run build
- Install dependencies:
-
Inline code examples
- Use
useStateto manage state - Use
useEffectto handle side effects - Use
useMemoto optimize performance
- Use
-
Blockquotes
This is a blockquote that showcases Neo-Brutalism borders and background.
Blockquotes can contain multiple paragraphs, as well as bold text and italic text.
Mermaid Flowcharts
Summary
This round of improvements includes:
- ✅ Code line numbers: all code blocks automatically display line numbers
- ✅ Enhanced lists: custom markers, color hierarchy, and better spacing
- ✅ Table styles: bold borders, shadows, hover effects, and responsive design
- ✅ Neo-Brutalism aesthetics: all elements follow the design guidelines
All features are completed and working correctly!
