13 Commits

Author SHA1 Message Date
xfy
28d3ed998a chore: optimize release profile for fullstack and add linux static build target
- Change opt-level from 'z' to 3 for better runtime performance
- Use thin LTO for faster compilation with similar results
- Remove panic=abort and strip=true to preserve server debuggability
- Add --debug-symbols=false to dx build for smaller WASM
- Add build-linux target for static musl binary
2026-06-09 10:30:36 +08:00
xfy
4f368e6fb8 test: add 122 unit tests across 12 modules
Cover utils/text, api/slug, auth/password, auth/session,
models/post, models/user, api/auth validation, api/markdown,
api/image, highlight, api/rate_limit. Add make test target.
2026-06-09 09:25:44 +08:00
xfy
0dbd07198b fix: remove leftover --wasm-split flag from dx serve dev command
Amends the wasm-split rollback by also cleaning up the dev server
flag that was missed in the previous revert commit.
2026-06-04 17:46:44 +08:00
xfy
f81656bb18 revert: disable wasm-split due to fullstack SSR incompatibility
wasm-split is incompatible with Dioxus fullstack SSR/hydration.
The feature causes hydration failures because split WASM chunks
are not available during client-side hydration of server-rendered HTML.

Changes reverted:
- Remove wasm-split feature from dioxus and dioxus-router
- Remove --wasm-split flag from dx build in Makefile
2026-06-04 17:44:33 +08:00
xfy
73fd3c30e2 build: remove obsolete WASM path fix and tracked index.html 2026-06-04 17:34:12 +08:00
xfy
a282d1dd29 feat: enable wasm-split for route-based code splitting
Enable Dioxus 0.7 automatic WASM bundle splitting by route:

- Add wasm-split feature to dioxus and dioxus-router in Cargo.toml
- Add --wasm-split flag to dx build in Makefile
- Router definitions stay as plain #[route] — splitting is automatic

Dioxus 0.7.9 handles splitting automatically when the feature and
CLI flag are enabled. Per-route #[wasm_split] attributes are not
required (and not supported by this version's derive macro).
2026-06-04 17:32:00 +08:00
xfy
cd45ab17de build: simplify tiptap build by setting fixed output filename in vite config 2026-06-04 16:26:25 +08:00
xfy
aebdcd6d99 fix(build): fix WASM 404 in production by creating symlinks in wasm/ directory 2026-06-04 11:34:13 +08:00
xfy
11261836c7 feat: add syntect code highlighting with catppuccin themes
- Add syntect dependency (server feature, fancy-regex backend)
- Create highlight module with LazyLock globals for SyntaxSet + themes
- Intercept CodeBlock events in markdown rendering for syntax highlighting
- Update ammonia whitelist to allow span/pre/code class/style attributes
- Add generate_highlight_css binary for CSS generation
- Add highlight-css Makefile target (runs before tailwindcss)
- Import generated highlight.css in input.css
- Remove hardcoded code block colors, let catppuccin CSS take over
2026-06-03 11:52:58 +08:00
xfy
5d523fbfc7 添加 dev 监听 0.0.0.0 2026-05-26 23:59:31 +08:00
xfy
f6d60520eb 集成 Tiptap Markdown 编辑器到文章撰写页面
- 新增 libs/tiptap-editor/ 打包子项目(Tiptap Core + StarterKit + Markdown)
- 构建产物输出到 public/tiptap/
- 替换原有的 textarea + pulldown_cmark 预览为 WYSIWYG 编辑器
- Makefile 新增 build-editor target
- Dioxus.toml 引入 editor.js 和 editor.css

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 17:46:04 +08:00
xfy
c2d5619855 移除首页,将根路径重定向到登录页,添加注册链接
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 10:22:05 +08:00
xfy
390ab98b86 升级 Tailwind CSS 到 v4 并简化构建流程
- 将 input.css 从 v3 的 @tailwind 指令迁移到 v4 的 @import "tailwindcss"
- 删除 tailwind.config.js(v4 不再需要配置文件)
- 删除 package.json(完全使用本地 tailwindcss CLI)
- 重新构建 public/style.css 为 v4 格式
- 添加 Makefile 提供 dev/build/css/css-watch/clean 命令

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 09:59:42 +08:00