{"id":18779476,"url":"https://github.com/sabertazimi/blog","last_synced_at":"2026-03-06T10:32:16.908Z","repository":{"id":37003019,"uuid":"127406811","full_name":"sabertazimi/blog","owner":"sabertazimi","description":":rocket: An awesome blog system based on Next.js","archived":false,"fork":false,"pushed_at":"2026-02-19T19:45:50.000Z","size":76475,"stargazers_count":47,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-02-19T21:57:09.375Z","etag":null,"topics":["agent","blog","chatgpt","claude","i18n","markdown","mdx","next-blog","next-starter","nextjs","shadcn","tailwind","typescript","vite","vitest"],"latest_commit_sha":null,"homepage":"https://blog.tazimi.dev","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sabertazimi.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2018-03-30T09:03:01.000Z","updated_at":"2026-02-19T19:43:46.000Z","dependencies_parsed_at":"2023-09-24T04:31:09.397Z","dependency_job_id":"364da79c-3523-485c-a571-a35811f9fa60","html_url":"https://github.com/sabertazimi/blog","commit_stats":null,"previous_names":[],"tags_count":43,"template":false,"template_full_name":null,"purl":"pkg:github/sabertazimi/blog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sabertazimi%2Fblog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sabertazimi%2Fblog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sabertazimi%2Fblog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sabertazimi%2Fblog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sabertazimi","download_url":"https://codeload.github.com/sabertazimi/blog/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sabertazimi%2Fblog/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30171869,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T07:56:45.623Z","status":"ssl_error","status_checked_at":"2026-03-06T07:55:55.621Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent","blog","chatgpt","claude","i18n","markdown","mdx","next-blog","next-starter","nextjs","shadcn","tailwind","typescript","vite","vitest"],"created_at":"2024-11-07T20:20:16.999Z","updated_at":"2026-03-06T10:32:16.890Z","avatar_url":"https://github.com/sabertazimi.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Next.js Blog Starter\n\n[![Author](https://img.shields.io/badge/author-sabertaz-lightgrey?style=for-the-badge)](https://github.com/sabertazimi)\n[![LICENSE](https://img.shields.io/github/license/sabertazimi/blog?style=for-the-badge)](https://github.com/sabertazimi/blog/blob/main/LICENSE)\n[![Top Language](https://img.shields.io/github/languages/top/sabertazimi/blog?logo=typescript\u0026style=for-the-badge)](https://github.com/sabertazimi/blog/search?l=typescript)\n\n[![CI](https://img.shields.io/github/actions/workflow/status/sabertazimi/blog/ci.yml?branch=main\u0026style=for-the-badge\u0026logo=github)](https://github.com/sabertazimi/blog/actions/workflows/ci.yml)\n[![CodeQL](https://img.shields.io/github/actions/workflow/status/sabertazimi/blog/codeql-analysis.yml?branch=main\u0026label=CodeQL\u0026logo=github\u0026style=for-the-badge)](https://github.com/sabertazimi/blog/actions/workflows/codeql-analysis.yml)\n[![Vitest Coverage](https://img.shields.io/codecov/c/github/sabertazimi/blog?logo=codecov\u0026style=for-the-badge)](https://codecov.io/gh/sabertazimi/blog)\n\nAn awesome [blog](https://blog.tazimi.dev) system based on Next.js.\n\n|                  Default                  |                             Custom                             |\n| :---------------------------------------: | :------------------------------------------------------------: |\n| ![Home](./.github/images/home.gif 'Home') | ![Home Custom](./.github/images/home-custom.gif 'Home Custom') |\n|  ![MDX](./.github/images/mdx.png 'MDX')   |  ![MDX Custom](./.github/images/mdx-custom.png 'MDX Custom')   |\n| ![Code](./.github/images/code.png 'Code') | ![Code Custom](./.github/images/code-custom.png 'Code Custom') |\n\n## :sparkles: Features\n\n### LLM-Ready\n\n- **AI Agent Actions** - One-click \"Read with Claude\" or \"Read with ChatGPT\"\n  to open articles in AI assistants with context\n- **llms.txt API** - Auto-generated structured feed for LLM consumption at `/llms.txt`\n\n### User Experience\n\n- **Rich MDX Support** - GFM, KaTeX math, admonitions, emoji shortcodes,\n  Shiki-based syntax highlighting, live code editor with Sandpack\n- **Modern UI/UX** - Dark mode, smooth animations, command menu (⌘K),\n  responsive design, progress indicators\n- **Advanced Navigation** - Auto-generated TOC with active tracking,\n  previous/next posts, tag filtering, search\n- **Social \u0026 Interactive** - Giscus comments, share buttons, GitHub integration\n- **RSS Feed** - Auto-generated RSS feeds at `/{locale}/feed.xml` for content subscription\n- **Bilingual (i18n)** - Full English/Chinese support with locale-specific routing\n\n### Developer Experience\n\n- **Modern Stack** - Next.js App Router + Turbopack, React Compiler,\n  TypeScript strict mode\n- **Comprehensive Testing** - Vitest (unit), Playwright (E2E), Testing Library\n- **Code Quality** - ESLint, Stylelint, Prettier, CI/CD with GitHub Actions\n- **Performance** - Automatic code splitting, image optimization, Rust-based builds\n- **SEO Ready** - Meta tags, sitemap, robots.txt, Open Graph, Twitter Cards\n\n## :bookmark_tabs: Post Template\n\n`.yaml` front matter + `.mdx` body:\n\n```markdown\n---\nlayout: post\ntitle: 'Your Post Title'\ndescription: 'Your post description'\nauthor: 'Your Name'\ndate: 2026-01-01\nthumbnail: '/thumbnails/your-thumbnail.jpg'\ntags:\n  - Your Tag 1\n  - Your Tag 2\n  - Your Tag 3\n---\n\n# Your Post Title\n\n## Introduction\n\nYour content here...\n\n## Math Support\n\nInline math: $E = mc^2$\n\nBlock math:\n\n$$\n\\int_0^\\infty e^{-x^2} dx = \\frac{\\sqrt{\\pi}}{2}\n$$\n\n## Admonitions\n\n:::note\nThis is a note admonition.\n:::\n\n:::tip\nThis is a tip admonition.\n:::\n\n:::warning\nThis is a warning admonition.\n:::\n```\n\n## :rocket: Quick Start\n\n### Prerequisites\n\n- Node.js 18.17 or later\n- pnpm 10 or later\n\n### Installation\n\n```bash\ngit clone https://github.com/sabertazimi/blog\ncd blog\npnpm install\n```\n\n### Development\n\n```bash\npnpm dev\n```\n\n**Open the source code and start editing!**\n\nYour site is now running at `http://localhost:3000`!\n\n### Build\n\n```bash\n# Build for production\npnpm build\n\n# Start production server\npnpm serve\n```\n\n## :stars: Deployment\n\n[![Deploy to Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fsabertazimi%2Fblog\u0026project-name=blog\u0026repo-name=blog\u0026demo-title=Sabertaz%20Blog\u0026demo-url=https%3A%2F%2Fblog.tazimi.dev)\n\nBuild for production:\n\n```bash\npnpm build\n```\n\nThe optimized production build will be in the `.next` folder.\n\n## :wrench: Configuration\n\n### Site Configuration\n\nEdit `src/lib/site.ts` to customize your blog:\n\n```typescript\nexport const site = {\n  author: 'Your Name',\n  url: 'https://yourblog.com',\n  // ... more settings\n}\n```\n\n### i18n Configuration\n\nConfigure supported locales in `src/i18n/routing.ts`:\n\n```typescript\nexport const routing = defineRouting({\n  locales: ['en-US', 'zh-CN'],\n  defaultLocale: 'en-US',\n  localePrefix: 'always',\n})\n```\n\nAdd translations in `messages/[locale].json`:\n\n```json\n{\n  \"site\": {\n    \"title\": \"Your Blog Title\",\n    \"description\": \"Your blog description\"\n  },\n  \"common\": {\n    \"loading\": \"Loading...\",\n    \"backToTop\": \"Back to top\"\n  }\n}\n```\n\nOrganize MDX posts by locale in `content/[locale]/`:\n\n```bash\ncontent/\n├── en-US/\n│   ├── my-first-post.mdx\n│   └── ...\n└── zh-CN/\n    ├── my-first-post.mdx\n    └── ...\n```\n\n### Theme Customization\n\nThe blog uses Tailwind CSS with custom CSS variables.\nEdit `src/app/globals.css` to customize colors:\n\n```css\n:root {\n  --background: oklch(100% 0 0deg);\n  --foreground: oklch(14.5% 0 0deg);\n  --primary: oklch(20.5% 0 0deg);\n  /* ... more colors */\n}\n\n.dark {\n  --background: oklch(14.5% 0 0deg);\n  --foreground: oklch(98.5% 0 0deg);\n  /* ... more colors */\n}\n```\n\n[Nature](https://www.shadcn.io/theme/nature) theme:\n\n```bash\npnpm dlx shadcn@latest add https://tweakcn.com/r/themes/nature.json\n```\n\nClaude theme:\n\n```bash\npnpm dlx shadcn@latest add https://tweakcn.com/r/themes/claude.json\n```\n\n### Shadcn UI Registries\n\nThe project includes multiple component registries in `components.json`:\n\n- **@animate-ui**: \u003chttps://animate-ui.com\u003e - Animated UI components\n- **@magicui**: \u003chttps://magicui.design\u003e - Magic UI components\n- **@shadcn-studio**: \u003chttps://shadcnstudio.com\u003e - Shadcn Studio components, blocks, and themes\n\nYou can add components from these registries:\n\n```bash\npnpm dlx shadcn@latest add @magicui/morphing-text\npnpm dlx shadcn@latest add @animate-ui/gravity-stars\n```\n\n### MDX Components\n\nCustomize MDX components in `src/components/post-content.tsx`:\n\n```typescript\nconst mdxComponents = {\n  aside: MDXAdmonition,\n  img: MDXImage,\n  pre: MDXCode,\n  Button,\n  Editor: MDXEditor,\n  // Add your custom components here\n}\n```\n\n## :open_file_folder: Project Structure\n\n```bash\n.\n├── node_modules/\n├── src/\n│   ├── app/                       # Next.js App Router pages\n│   │   ├── [locale]/              # Locale-based routing\n│   │   │   ├── about/             # About page\n│   │   │   ├── post/[slug]/       # Dynamic post pages\n│   │   │   ├── posts/             # All posts page\n│   │   │   ├── tag/[tagName]/     # Tag filter pages\n│   │   │   ├── feed.xml/          # RSS feed generation\n│   │   │   ├── layout.tsx         # Locale layout\n│   │   │   ├── page.tsx           # Home page\n│   │   │   └── not-found.tsx      # 404 page\n│   │   ├── globals.css            # Global styles\n│   │   ├── providers.tsx          # Context providers\n│   │   ├── robots.ts              # robots.txt generation\n│   │   └── sitemap.ts             # Sitemap generation\n│   ├── components/                # React components\n│   │   ├── ui/                    # Shadcn UI components\n│   │   │   ├── button.tsx\n│   │   │   ├── card.tsx\n│   │   │   ├── dialog.tsx\n│   │   │   ├── skeleton.tsx\n│   │   │   └── ...\n│   │   ├── language-switcher.tsx  # Language switcher\n│   │   ├── mdx-code.tsx           # Code block with Shiki\n│   │   ├── mdx-editor.tsx         # Live code editor with Sandpack\n│   │   ├── mdx-image.tsx          # Optimized image component\n│   │   ├── post-card.tsx          # Post card component\n│   │   ├── post-content.tsx       # MDX content renderer\n│   │   └── ...\n│   ├── i18n/                      # Internationalization\n│   │   ├── routing.ts             # i18n routing config\n│   │   ├── request.ts             # Request config\n│   │   ├── navigation.ts          # Navigation helpers\n│   │   └── utils.ts               # i18n utilities\n│   ├── layouts/                   # Layout components\n│   │   └── default-layout.tsx\n│   ├── lib/                       # Utility functions\n│   │   ├── get-posts-data.ts      # MDX processing\n│   │   ├── utils.ts               # Helper functions\n│   │   ├── get-routes.ts          # Route generation\n│   │   ├── seo.ts                 # SEO utilities\n│   │   └── ...\n│   ├── types/                     # TypeScript type definitions\n│   │   ├── index.d.ts\n│   │   └── i18n.ts\n│   └── proxy.ts                   # next-intl middleware\n├── content/                       # Blog posts (.mdx files)\n│   ├── en-US/                     # English posts\n│   │   ├── post1.mdx\n│   │   └── ...\n│   └── zh-CN/                     # Chinese posts\n│       ├── post1.mdx\n│       └── ...\n├── messages/                      # i18n translation files\n│   ├── en-US.json\n│   └── zh-CN.json\n├── public/                        # Static assets\n│   ├── fonts/\n│   ├── images/\n│   ├── thumbnails/\n│   └── ...\n├── e2e/                           # Playwright E2E tests\n│   ├── home.spec.ts\n│   ├── i18n.spec.ts\n│   └── ...\n├── .github/                       # GitHub workflows\n│   └── workflows/\n│       ├── ci.yml\n│       └── codeql-analysis.yml\n├── .gitignore\n├── .prettierrc.json\n├── components.json                # Shadcn UI config\n├── eslint.config.mjs              # ESLint Flat Config\n├── next.config.ts                 # Next.js configuration\n├── package.json\n├── playwright.config.ts           # Playwright configuration\n├── postcss.config.mjs             # PostCSS configuration\n├── tsconfig.json                  # TypeScript configuration\n├── vitest.config.mts              # Vitest configuration\n├── LICENSE\n└── README.md\n```\n\n### Key Directories\n\n1. **`src/app/[locale]/`**: Locale-based Next.js App Router pages with i18n support\n2. **`src/components/`**: Reusable React components\n3. **`src/components/ui/`**: Shadcn UI base components\n4. **`src/i18n/`**: Internationalization configuration and utilities\n5. **`src/lib/`**: Utility functions and data fetching logic\n6. **`src/types/`**: TypeScript type definitions\n7. **`content/`**: Blog posts in MDX format (organized by locale)\n8. **`messages/`**: i18n translation JSON files\n9. **`public/`**: Static assets (images, fonts, etc.)\n10. **`e2e/`**: End-to-end tests with Playwright\n\n## :package: Tech Stack\n\n### Core Package\n\n- [Next.js](https://nextjs.org/) - React framework\n- [React](https://react.dev/) - UI library\n- [TypeScript](https://www.typescriptlang.org/) - Type safety\n\n### Styling Toolkit\n\n- [Tailwind CSS](https://tailwindcss.com/) - Utility-first CSS framework\n- [Shadcn UI](https://ui.shadcn.com/) - Component library\n- [Motion](https://motion.dev/) - Animation library\n- [Lucide React](https://lucide.dev/) - Icon library\n- [Simple Icons](https://simpleicons.org/) - Brand icons\n\n### Content Helper\n\n- [next-mdx-remote](https://github.com/hashicorp/next-mdx-remote) - MDX support\n- [next-intl](https://next-intl.dev/) - Internationalization\n- [Shiki](https://shiki.style/) - Syntax highlighting\n- [Sandpack](https://sandpack.codesandbox.io/) - Live code editor\n- [KaTeX](https://katex.org/) - Math rendering\n- [remark](https://github.com/remarkjs/remark) - Markdown processing\n- [rehype](https://github.com/rehypejs/rehype) - HTML processing\n\n### Testing Library\n\n- [Vitest](https://vitest.dev/) - Unit testing\n- [Playwright](https://playwright.dev/) - E2E testing\n- [Testing Library](https://testing-library.com/) - React testing\n\n### Development Tool\n\n- [ESLint](https://eslint.org/) - Linting\n- [Stylelint](https://stylelint.io/) - CSS linting\n- [Prettier](https://prettier.io/) - Code formatting\n- [pnpm](https://pnpm.io/) - Package manager\n\n## :construction: Caveats\n\n- `import` and `export` statements cannot be used **inside** MDX files due to `next-mdx-remote` limitations.\n- If you need custom components in MDX, add them to `src/components/post-content.tsx`.\n- See [explanation](https://github.com/hashicorp/next-mdx-remote/issues/143#issuecomment-1043067293) for details.\n\n## :bookmark: Contact\n\n[![GitHub](https://img.shields.io/badge/-GitHub-181717?style=for-the-badge\u0026logo=github\u0026logoColor=white)](https://github.com/sabertazimi)\n[![Email](https://img.shields.io/badge/-Gmail-ea4335?style=for-the-badge\u0026logo=gmail\u0026logoColor=white)](mailto:sabertazimi@gmail.com)\n[![X](https://img.shields.io/badge/-X.com-000000?style=for-the-badge\u0026logo=x\u0026logoColor=white)](https://x.com/sabertazimi)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsabertazimi%2Fblog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsabertazimi%2Fblog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsabertazimi%2Fblog/lists"}