create-next-mdx-blog-app 2.2.4 → 2.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -9
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -43,7 +43,7 @@ Scaffold the blog into an empty directory:
|
|
|
43
43
|
npx create-next-mdx-blog-app .
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
The installer ([`create-next-mdx-blog-app`](https://www.npmjs.com/package/create-next-mdx-blog-app/), v2.2.
|
|
46
|
+
The installer ([`create-next-mdx-blog-app`](https://www.npmjs.com/package/create-next-mdx-blog-app/), v2.2.6, MIT) clones the app, installs dependencies, and prints the environment setup steps.
|
|
47
47
|
|
|
48
48
|
### Option 2 — Manual clone
|
|
49
49
|
|
|
@@ -130,7 +130,7 @@ This starter kit is **SSG-first**: Static Site Generation is preferred everywher
|
|
|
130
130
|
| Image storage | AWS S3 (via Next `<Image>`) |
|
|
131
131
|
| Styling / UI | Tailwind CSS, shadcn/ui, `lucide-react`, `class-variance-authority` |
|
|
132
132
|
| AI | Vercel AI SDK (`ai`, `@ai-sdk/anthropic`, `@ai-sdk/react`), `zod` |
|
|
133
|
-
| Code sandbox | `@codesandbox/sandpack-react` |
|
|
133
|
+
| Code sandbox | `@codesandbox/sandpack-react` (JS/TS/HTML), Pyodide (Python), sql.js (SQL) |
|
|
134
134
|
| Syntax highlighting | `react-syntax-highlighter` |
|
|
135
135
|
| Email | Resend (`resend`) |
|
|
136
136
|
| Notifications | `sonner` toasts |
|
|
@@ -209,6 +209,7 @@ Wraps the Next.js `<Image>` component with `<figure>`/`<figcaption>` for seamles
|
|
|
209
209
|
| **Copy link** | `src/components/CopyLinkButton.tsx` | Article-header button; copies the page URL with a brief icon-swap confirmation |
|
|
210
210
|
| **Social share** | `src/components/SocialShareButtons.tsx` | Pre-filled share dialogs for X (Twitter), LinkedIn, and Reddit using the article title and URL |
|
|
211
211
|
| **View counter** | `src/components/ViewCounter.tsx` | Live per-article view count in a Supabase `view_counts` table, incremented atomically via the `increment_view_count` RPC. Dynamic pages increment server-side; static pages call the `/api/views/[slug]` route after hydration |
|
|
212
|
+
| **Related articles** | `src/components/RelatedArticles.tsx` | Shown at the bottom of every dynamic article; surfaces up to 5 other articles ranked by shared tags (then publish date) via `fetchRelatedArticles()` |
|
|
212
213
|
|
|
213
214
|
## 🤖 AI Features
|
|
214
215
|
|
|
@@ -239,15 +240,16 @@ A **Generate TL;DR** button above every dynamic article streams a short summary
|
|
|
239
240
|
|
|
240
241
|
## 🖥️ Code Sandbox
|
|
241
242
|
|
|
242
|
-
An interactive in-browser code execution environment
|
|
243
|
+
An interactive in-browser code execution environment at `/code-sandbox` spanning five languages — **JavaScript, TypeScript, HTML/CSS, Python, and SQL** — all executing **entirely client-side**; no code reaches the server.
|
|
243
244
|
|
|
244
|
-
- **JavaScript & TypeScript
|
|
245
|
-
- **
|
|
246
|
-
- **
|
|
247
|
-
- **
|
|
248
|
-
- **
|
|
245
|
+
- **JavaScript & TypeScript** — powered by **Sandpack** (`@codesandbox/sandpack-react`); switch with one click and the editor reloads with a language-appropriate default snippet. Full editor with line numbers, inline TypeScript errors, and a live console panel side-by-side with the code.
|
|
246
|
+
- **HTML/CSS** — also powered by Sandpack, using its `static` template for multi-file editing (`index.html` + `styles.css`) with tabbed files and a **live rendered preview** in place of the console.
|
|
247
|
+
- **Python** — powered by **Pyodide** (CPython compiled to WebAssembly), loaded on demand from a version-pinned CDN and executed inside a dedicated **Web Worker** so the UI never blocks. `print()` output streams into a console panel line by line.
|
|
248
|
+
- **SQL** — powered by **sql.js** (SQLite compiled to WebAssembly), also loaded from CDN and run inside its own Web Worker against a fresh in-memory database on every run. `SELECT` results render as a scrollable table; other statements (`CREATE`, `INSERT`, `UPDATE`) confirm with a row-count message.
|
|
249
|
+
- **Quick Examples** — pre-loaded snippets per language (Fibonacci, Async/Await, Data Structures for JS; Types & Interfaces, Generics, Classes & OOP for TS; Responsive Card, Flexbox Layout, CSS Animation for HTML/CSS; Fibonacci, Data Structures, Classes & OOP for Python; Joins, Aggregation, Filtering & Sorting for SQL) defined in `src/utils/constants/SandboxExamples.ts`
|
|
250
|
+
- **Consistent toolbar** across every language — Run, Copy, Download, and Reset — with a shared matrix-green theme and `JetBrains Mono` font
|
|
249
251
|
|
|
250
|
-
Components: `src/components/SandpackEditor.tsx` (provider, editor, toolbar, console) and `CodeSandboxFeaturesSection.tsx` (feature highlights grid).
|
|
252
|
+
Components: `src/components/SandpackEditor.tsx` (JS/TS/HTML — provider, editor, toolbar, console/preview), `PyodideSandbox.tsx` (Python), `SqlSandbox.tsx` (SQL), and `CodeSandboxFeaturesSection.tsx` (feature highlights grid). The Python and SQL runtimes ship as static Web Worker scripts in `public/workers/` (`pyodide-worker.js`, `sql-worker.js`) — kept outside the Next.js bundler since Pyodide's and sql.js's browser builds aren't reliably bundle-safe.
|
|
251
253
|
|
|
252
254
|
## 👥 Author Profile Pages
|
|
253
255
|
|
|
@@ -430,6 +432,8 @@ The project also remains compatible with **Vercel** and pure **static hosting**
|
|
|
430
432
|
- [Docker Documentation](https://docs.docker.com/)
|
|
431
433
|
- [React Syntax Highlighter](https://github.com/react-syntax-highlighter/react-syntax-highlighter)
|
|
432
434
|
- [Sandpack Documentation](https://sandpack.codesandbox.io/docs)
|
|
435
|
+
- [Pyodide Documentation](https://pyodide.org/en/stable/)
|
|
436
|
+
- [sql.js Documentation](https://sql.js.org/documentation/)
|
|
433
437
|
- [Vercel AI SDK Documentation](https://sdk.vercel.ai/docs)
|
|
434
438
|
- [Anthropic AI SDK Provider](https://sdk.vercel.ai/providers/ai-sdk-providers/anthropic)
|
|
435
439
|
- [Resend Documentation](https://resend.com/docs)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-next-mdx-blog-app",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.6",
|
|
4
4
|
"description": "A production-ready technical blog starter kit built with Next.js, MDX, Supabase, and TypeScript.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Abdullah Muhammad",
|
|
@@ -62,6 +62,7 @@
|
|
|
62
62
|
"@types/react": "^19",
|
|
63
63
|
"@types/react-dom": "^19",
|
|
64
64
|
"@types/react-syntax-highlighter": "^15.5.13",
|
|
65
|
+
"@types/sql.js": "^1.4.9",
|
|
65
66
|
"@vercel/analytics": "^2.0.1",
|
|
66
67
|
"ai": "^6.0.190",
|
|
67
68
|
"class-variance-authority": "^0.7.1",
|