feat(admin): add ephemeral staging DB, read-only posts overview, and dynamic search

- Implement ephemeral staging mode (APP_ENV=staging) to isolate test/dev DB writes in /tmp
- Add read-only posts management dashboard under /guanli/posts with live links and comment counters
- Add hot re-indexing endpoint (/guanli/reindex) to refresh Markdown without restarting server
- Replace static recommended search config with dynamic frequency-based trending searches
- Remove early scaffold mockup file (dropbox/zh.md) and clean legacy mock test queries
- Add native Makefile with dev, dev-persistent, test, lint, and docker targets
- Update test suite and documentation for development workflows
This commit is contained in:
2026-09-16 23:09:14 -07:00
parent f52b3fe9e4
commit 95a7dcb93b
12 changed files with 510 additions and 83 deletions
+13 -7
View File
@@ -21,19 +21,25 @@
</form>
<!-- Sleek Discovery & Recommended Searches -->
<div class="search-discovery-pills" style="margin-top: 1.25rem;">
<div class="search-discovery-pills" style="margin-top: 1.5rem;">
<% if (recommended.customPills && recommended.customPills.length > 0) { %>
<div style="font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-text-muted); margin-bottom: 0.6rem; font-weight: 600;">🔥 Trending Searches</div>
<div class="search-pills-grid" style="margin-bottom: 1.25rem;">
<% recommended.customPills.forEach(pill => { %>
<button type="button" class="pill search-pill-btn" data-query="<%= pill.query %>">
<%= pill.label %>
</button>
<% }) %>
</div>
<% } %>
<div style="font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-text-muted); margin-bottom: 0.6rem; font-weight: 600;">🏷️ Browse Topics</div>
<div class="search-pills-grid">
<% (recommended.dynamicPills || []).forEach(pill => { %>
<button type="button" class="pill search-pill-btn" data-query="<%= pill.query %>">
<%= pill.label %>
</button>
<% }) %>
<% (recommended.customPills || []).forEach(pill => { %>
<button type="button" class="pill search-pill-btn" data-query="<%= pill.query %>">
<%= pill.label %>
</button>
<% }) %>
</div>
</div>
</div>