Features:
- Tag system with multi-language support (Chinese/English)
- Auto-create tags when associating with articles
- Tag filtering on homepage with visual indicators
- Full-text search across title, summary, and content
- Tag cloud sidebar showing article counts
- Search page with results display
Technical Implementation:
- Database models: Tag, ArticleTag (many-to-many)
- Tag count caching for performance
- Automatic tag slug generation
- Responsive design with mobile support
- I18n support for all new UI elements
Bug Fix:
- Fixed SQL column ambiguity error in tag filtering
- Added table prefix to ORDER BY clause in publishedArticleOrder
Routes:
- GET /search - Search results page
- GET /?tag=<slug> - Filter articles by tag
- GET /api/articles?tag=<slug> - API with tag filter support
Templates:
- Added tag input field to article create/edit form
- Added search box to homepage header
- Added tag cloud sidebar on homepage and search page
- Created new search results page template
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Add custom publish time field to article create/edit forms
- Support datetime-local input for manual time setting
- Auto-set on first publish if left blank
- Works for both admin and user article forms
- Display last updated time on article detail page
- Show both published time and last updated time
- Auto-maintained by GORM on each update
- Format: YYYY-MM-DD HH:MM
- Add i18n support for new fields
- article_published_at: Published Time / 发布时间
- article_published_at_hint: Leave blank to auto-set on publish / 留空则在发布时自动设置
- article_last_updated: Last Updated / 最后更新
- Update handlers and templates
- handlers/article.go: Add parsePublishedAt/formatPublishedAt functions
- handlers/home.go: Add formatUpdateTime function
- handlers/my_articles.go: Support custom publish time in user articles
- templates: Add datetime-local inputs and time display
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Add single-column layout for homepage articles
- Implement smart image positioning based on aspect ratio:
* Landscape images (ratio > 1.2) displayed on top
* Portrait/square images (ratio ≤ 1.2) displayed on left side
- Add infinite scroll with lazy loading
- Create new API endpoint /api/articles for pagination
- Add loading indicator and 'no more articles' message
- Optimize performance with image lazy loading and scroll throttling
- Add responsive layout for mobile devices
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Comment model with nested replies (ParentID), dual authorship
(logged-in UserID / anonymous GuestToken cookie), email hash for
Gravatar, private flag, and moderation status
- CommentConfig singleton (enabled / allow guest / guest-require-approval
/ use Gravatar) cached like the other platform config
- Markdown comments with built-in emoji picker, preview, and markdown
help; rendered client-side via marked + DOMPurify, with server-side
HTML/dangerous-scheme stripping as a first XSS defense
- Private comments visible only to admin and the author; pending
comments visible only to admin and the author
- Admin moderation list (pending/approved/rejected/all tabs) with
approve/reject/delete and a pending-count badge
- Comment settings page with the four toggles
- One-time session flash notice (auto-dismissed after 4s) so the
"comment posted" banner no longer persists across refreshes
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Gin + GORM + Tailwind CSS blog engine
- OS-aware config (Linux /etc/blog_go/, Windows ./win/etc/blog_go/)
- SQLite by default, MySQL support via config
- Auto-migrate database + seed admin user on first run
- Session-based auth (login/logout)
- i18n: Chinese/English with auto-detect + manual switch
- Avatar dropdown nav with click-to-toggle menu
- Profile page: avatar upload, edit info, change password
- Role system: admin (full access) and author (profile only)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>