**Newsletter Modal Implementation**: - Added modal subscription forms to blog pages - Improved UX with dedicated modal instead of anchor links - Location: public/blog.html, public/blog-post.html **Blog JavaScript Enhancements**: - Enhanced blog.js and blog-post.js with modal handling - Newsletter form submission logic - Location: public/js/blog.js, public/js/blog-post.js **Deployment Script Improvements**: - Added pre-deployment checks (server running, version parameters) - Enhanced visual feedback with status indicators (✓/✗/⚠) - Version parameter staleness detection - Location: scripts/deploy-full-project-SAFE.sh **Demo Page Cleanup**: - Minor refinements to demo pages - Location: public/demos/*.html **Routes Enhancement**: - Newsletter route additions - Location: src/routes/index.js 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
38 lines
1.1 KiB
JavaScript
38 lines
1.1 KiB
JavaScript
#!/usr/bin/env node
|
|
require('dotenv').config();
|
|
const { getDb } = require('../src/utils/db.util');
|
|
|
|
(async () => {
|
|
const db = await getDb();
|
|
const collection = db.collection('documents');
|
|
|
|
// Get all archived, confidential, and internal documents
|
|
const docs = await collection.find({
|
|
visibility: { $in: ['archived', 'confidential', 'internal'] }
|
|
}).project({ slug: 1, title: 1, visibility: 1 }).sort({ visibility: 1, slug: 1 }).toArray();
|
|
|
|
console.log('\n📋 Documents with visibility: archived, confidential, internal\n');
|
|
|
|
const byVisibility = {
|
|
archived: [],
|
|
confidential: [],
|
|
internal: []
|
|
};
|
|
|
|
docs.forEach(doc => {
|
|
byVisibility[doc.visibility] = byVisibility[doc.visibility] || [];
|
|
byVisibility[doc.visibility].push(doc);
|
|
});
|
|
|
|
Object.entries(byVisibility).forEach(([visibility, documents]) => {
|
|
if (documents.length > 0) {
|
|
console.log(`\n${visibility.toUpperCase()} (${documents.length}):`);
|
|
documents.forEach(doc => {
|
|
console.log(` - ${doc.slug}`);
|
|
});
|
|
}
|
|
});
|
|
|
|
console.log(`\n\nTotal: ${docs.length} documents\n`);
|
|
process.exit(0);
|
|
})();
|