Merged
Conversation
Replace legacy Node.js build (build.js + mdit) with Void framework. Blog markdown files become first-class page routes via @void-x/md. Static assets moved to public/ for Void's static file serving. - Add vite.config.ts with voidPlugin, voidVue, voidMarkdown - Create pages/layout.vue (shared) and pages/blog/layout.vue (blog chrome + Disqus) - Create pages/index.vue homepage with all curated content - Move 111 blog .md files to pages/blog/ - Add middleware/html-compat.ts for .html → clean URL redirects - Copy static assets (css, js, images, ppt, collections, etc.) to public/ - Remove scaffolded artifacts (migrations, routes/api, src/demo.ts) - Update package.json deps, tsconfig.json, deploy.yml branch
- Update layout.vue: diagonal ribbon style replacing fork-me image - Remove original blog/ directory (content moved to pages/blog/ and public/blog/) - Remove root index.html (replaced by pages/index.vue) - Remove shadow HTML files from public/blog/ that have .md page equivalents
- Move legacy root-level directories to legacy.bak/ to reduce deploy size and prevent Vite from bundling them into SSR - Fix CSS causing worker deploy failure by moving @import to <link> tags and using <component is="style"> for custom styles - Fix Disqus comments not loading by using <component is="script"> instead of onMounted (no client hydration in SSR pages) - Change image src to dynamic :src bindings to avoid Vite asset processing - Restore hangjs-family-photo2.jpg resized to 2000px (179KB vs 5.6MB)
Replace absolute https://fengmk2.com:9443/ references with relative paths so slides work on any domain.
Remove middleware/html-compat.ts which unconditionally stripped .html from any request path and issued a 301 without checking that the resource existed. Crawlers hitting garbage concatenated paths like /ppt/.../README.html were getting 301s that search engines then cached. Without the middleware, real .html files in public/ still serve 200 via env.ASSETS, and non-existent paths fall through to 404. Add public/sitemap.xml + public/robots.txt so crawlers can discover the canonical URL set instead of guessing. scripts/generate-sitemap.mjs walks pages/blog/**/*.md and regenerates the sitemap; wired into package.json as prebuild so every vite build refreshes it.
Replace local file: paths with the official npm aliases documented in the void-sdk/void README: - void@npm:@void-sdk/void@^0.5.0 - @void/vue@npm:@void-sdk/vue@^0.4.0 - @void/md@npm:@void-sdk/md@^0.5.0 Rename imports in vite.config.ts from @void-x/* to @void/* and drop the resolve.alias shim that mapped between the two scopes. Switch packageManager to pnpm@10.33.0 per the README's recommended tooling and add pnpm-lock.yaml.
There was a problem hiding this comment.
Code Review
This pull request initializes a project using the Void framework, adding various configuration files, type definitions, and a Cloudflare Workers entry point. Critical issues were identified: .void/entry.ts contains a hardcoded local file path for an import that will break builds in other environments, and .node-version specifies a non-existent Node.js version (24.14.0).
| @@ -0,0 +1 @@ | |||
| 24.14.0 | |||
Add .github/workflows/ci.yml adapted from voidzero-dev/setup.viteplus.dev: - test job on every push to master and every PR (pnpm install + build) - staging-deploy job on PRs only, deploys to VOID_PROJECT=fengmk2-staging and posts/updates a sticky comment with the preview URL Update .github/workflows/deploy.yml to use pnpm instead of npm ci, matching the packageManager switch to pnpm@10.33.0. Production deploy continues to read the projectId from .void/project.json. Both workflows use the latest action versions: actions/checkout@v6, actions/setup-node@v6, actions/github-script@v9, pnpm/action-setup@v5. Installation auths against npm.pkg.github.com via NODE_AUTH_TOKEN so @void-sdk/* packages resolve.
Replace the pnpm/action-setup + actions/setup-node pair with the official setup-vp action, matching the voidzero-dev/setup.viteplus.dev reference. setup-vp handles Node install via 'vp env use', auto-detects pnpm from the lockfile, and caches the pnpm store. Replace 'pnpm build' with 'vp run build' and 'pnpm exec void deploy' with 'vpx void deploy' so the workflow is package-manager-agnostic and relies on Vite+'s own script runner. Install auth against npm.pkg.github.com still flows through NODE_AUTH_TOKEN; setup-vp's default run-install uses that env to pull @void-sdk/* packages. Production and staging projects resolved exactly as before.
Run 'vp migrate --no-interactive' to adopt Vite+ as the unified toolchain (runtime, package manager, dev/build, lint, format). - vite.config.ts now imports from 'vite-plus'; drops the Vite-only shape for Vite+'s defineConfig with 'staged', 'fmt', 'lint' blocks - package.json scripts use 'vp dev / vp build / vp preview'; add 'prepare: vp config' for the pre-commit hook setup - pnpm-workspace.yaml added with catalog routing 'vite' to '@voidzero-dev/vite-plus-core' and 'vitest' to 'vite-plus-test'; peerDependencyRules relax matching so void plugins keep resolving - env.d.ts adds the '*.vue' TypeScript shim - AGENTS.md captures the Vite+ workflow for coding agents - .vite-hooks/pre-commit wires staged-file checks via 'vp staged' Follow-up tweaks on top of the auto-migration: - Legacy content at the repo root (blog.bak, legacy.bak, MOVE, movement.js, max_new_space_size, libuv, scattered *.md/*.js/*.html) is added to 'fmt.ignorePatterns' and 'lint.ignorePatterns' in vite.config.ts so 'vp check' only looks at the active source tree. - Format-only touch-ups on CLAUDE.md, env.d.ts, tsconfig.json, package.json, scripts/generate-sitemap.mjs, pages/*.vue, pnpm-workspace.yaml, vite.config.ts, and .void/entry.ts produced by 'vp fmt --write'. - CI: add 'vp check' as a pipeline gate before 'vp run build'. 'vp build' skips npm lifecycle hooks, so both CI and deploy workflows now run 'vp run sitemap' before 'vpx void deploy' to keep public/sitemap.xml fresh on every deploy. Verification: - vp install: ok - vp check: ok (18 files formatted, 5 files lint/typecheck clean) - vp build: ok (162 modules, ~750ms) - vp test: fails at config resolution because '@cloudflare/vite-plugin' rejects the SSR environment's 'resolve.external' set by voidPlugin() when vitest loads the config. No tests exist, so this is non-blocking; revisit when tests are added (likely needs a vitest-scoped config variant).
Use the commit SHA at the head of PR #52 ("fix: surface vp install
errors outside collapsed log group") so install failures on CI/deploy
show up outside the collapsed setup-vp log group. Revert to @v1 once
the PR merges.
21f6c6e -> 697e70a (new commit pushed to fix/surface-vp-install-errors).
Bump setup-vp pin from e79fc32 to af4ffd9 (new head of PR #54) and drop the repo .npmrc auth-line dance. The updated PR now auto- generates _authToken entries at \$RUNNER_TEMP/.npmrc for every registry declared in the repo .npmrc when NODE_AUTH_TOKEN is set, so the committed .npmrc can stay as just the registry mapping. Also update CLAUDE.md guidance to match the new pattern.
42d342a (PR branch head) -> 4f5aa3e (squash-merge on main). PR #54 is now merged into voidzero-dev/setup-vp main with title "feat: respect project .npmrc and auto-generate _authToken".
|
✅ Staging deployment successful! Preview: https://fengmk2-staging.void.app/ |
Void's default notFound handler renders the index component with status 404, so unknown URLs looked like the homepage. Add a catch-all pages/[...slug] that renders a dedicated Not Found page, and a global middleware that rewrites the response status to 404 because Void's renderedResponse builds a fresh Response without honoring c.status() set inside a loader.
Void only auto-derives a head title from YAML frontmatter (not from the first H1), and Vue pages need an explicit head() export. Add titles for the home page and the 404 page, and inject title: frontmatter into all markdown blog posts that lacked it (derived from each post's first H1). The new scripts/inject-md-titles.mjs is the one-off generator.
Helps spot scanners and broken inbound links from runtime logs. IP prefers cf-connecting-ip on Cloudflare and falls back to forwarded headers in other environments.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.