Fix demo site auto-enhancement and content persistence

- Restructure demo directory from test-sites/ to demos/ with flattened layout
- Add auto-enhancement on server startup for all sites with auto_enhance: true
- Fix inconsistent content ID generation that prevented dan-eden-portfolio content persistence
- Update server configuration to enhance from source to separate output directories
- Remove manual enhancement from justfile in favor of automatic server enhancement
- Clean up legacy test files and unused restore command
- Update build system to use CDN endpoint instead of file copying
This commit is contained in:
2025-09-17 00:07:40 +02:00
parent 1fa607c47c
commit 71561316da
73 changed files with 190 additions and 4827 deletions

View File

@@ -39,8 +39,8 @@ const commands = {
// Check files exist
const requiredFiles = [
'test-sites/demo-site/index.html',
'test-sites/demo-site/about.html',
'demos/demo-site/index.html',
'demos/demo-site/about.html',
'lib/dist/insertr.js',
'lib/dist/insertr.min.js',
'cmd/serve.go',
@@ -77,8 +77,8 @@ const commands = {
console.log('\n📊 Project stats:');
// Count editable elements
const indexContent = fs.readFileSync('test-sites/demo-site/index.html', 'utf8');
const aboutContent = fs.readFileSync('test-sites/demo-site/about.html', 'utf8');
const indexContent = fs.readFileSync('demos/demo-site/index.html', 'utf8');
const aboutContent = fs.readFileSync('demos/demo-site/about.html', 'utf8');
const insertrMatches = (indexContent + aboutContent).match(/class="insertr"/g) || [];
console.log(` 📝 Editable elements: ${insertrMatches.length}`);