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
40
demos/README.md
Normal file
@@ -0,0 +1,40 @@
|
||||
# Test Sites Collection
|
||||
|
||||
This directory contains a collection of real-world websites for testing insertr CMS functionality across different site types, CSS frameworks, and complexity levels.
|
||||
|
||||
## Directory Structure
|
||||
|
||||
- **`simple/`** - Simple sites with vanilla CSS and minimal layouts
|
||||
- **`framework-based/`** - Sites using CSS frameworks (Bootstrap, Tailwind, etc.)
|
||||
- **`complex/`** - Complex layouts with advanced interactions
|
||||
- **`templates/`** - Template files for new test sites
|
||||
- **`scripts/`** - Automation utilities for downloading and enhancing sites
|
||||
- **`results/`** - Testing results, reports, and documentation
|
||||
|
||||
## Site Categories
|
||||
|
||||
### Simple Sites
|
||||
- **dan-eden-portfolio** - Clean personal portfolio with minimal styling
|
||||
- **github-pages-simple** - Basic GitHub Pages site with standard layout
|
||||
|
||||
### Framework-Based Sites
|
||||
- **bootstrap-docs** - Bootstrap documentation sections
|
||||
- **tailwind-landing** - Tailwind CSS marketing pages
|
||||
|
||||
### Complex Sites
|
||||
- **stripe-product** - Enterprise product pages with rich content
|
||||
- **linear-features** - Modern SaaS feature pages
|
||||
|
||||
## Testing Process
|
||||
|
||||
1. **Download** - Use scripts to fetch HTML and assets
|
||||
2. **Enhance** - Add insertr classes to content sections
|
||||
3. **Test** - Verify functionality across different layouts
|
||||
4. **Document** - Record results and compatibility notes
|
||||
|
||||
## Each Site Includes
|
||||
|
||||
- Original HTML files
|
||||
- `assets/` directory with CSS, JS, and images
|
||||
- `README.md` with site-specific testing notes
|
||||
- `insertr-config.json` with enhancement configuration
|
||||
140
demos/TESTING-REPORT.md
Normal file
@@ -0,0 +1,140 @@
|
||||
# Insertr Testing Infrastructure Report
|
||||
|
||||
## Overview
|
||||
|
||||
Successfully established a comprehensive testing infrastructure for insertr CMS across real-world websites, moving beyond the single demo site to demonstrate insertr's versatility across different site types and frameworks.
|
||||
|
||||
## Infrastructure Components
|
||||
|
||||
### ✅ Directory Structure
|
||||
```
|
||||
demos/
|
||||
├── simple/ # Simple vanilla CSS sites
|
||||
│ └── dan-eden-portfolio/ # ✅ COMPLETE
|
||||
├── framework-based/ # CSS framework sites
|
||||
├── complex/ # Complex layouts
|
||||
├── templates/ # Template files
|
||||
├── scripts/ # Automation utilities
|
||||
└── results/ # Testing documentation
|
||||
```
|
||||
|
||||
### ✅ Automation Scripts
|
||||
- **`download-site.js`** - wget-based site downloader with assets
|
||||
- **`enhance-dan-eden.py`** - Site-specific insertr class injection
|
||||
- **Server Integration** - Sites registered in insertr.yaml
|
||||
|
||||
## Test Site: Dan Eden Portfolio
|
||||
|
||||
### Site Characteristics
|
||||
- **URL**: https://daneden.me
|
||||
- **Framework**: Next.js with CSS Modules
|
||||
- **Complexity**: Simple - ideal for baseline testing
|
||||
- **Content**: Personal portfolio, project descriptions, bio
|
||||
|
||||
### Enhancement Results
|
||||
✅ **7 elements** successfully enhanced with insertr classes:
|
||||
1. App descriptions (Ora, Solstice)
|
||||
2. Action buttons ("Learn more →", "Read the post →")
|
||||
3. Talk title ("Where We Can Go")
|
||||
4. Content spans with auto-generated IDs
|
||||
|
||||
### Technical Validation
|
||||
- ✅ **Content ID Generation**: `index-span-4ba35c`, `index-span-7-3dcb19`
|
||||
- ✅ **Content Type Detection**: All elements correctly identified as "markdown"
|
||||
- ✅ **Asset Preservation**: Next.js bundles, CSS, images intact
|
||||
- ✅ **Server Registration**: Site registered as "dan-eden-test"
|
||||
- ✅ **Enhancement Pipeline**: `./insertr enhance` worked seamlessly
|
||||
|
||||
## Key Findings
|
||||
|
||||
### ✅ Zero Configuration Success
|
||||
- No configuration files needed - just `class="insertr"`
|
||||
- Insertr automatically detected content types and generated IDs
|
||||
- Works seamlessly with CSS Modules and Next.js
|
||||
|
||||
### ✅ Framework Compatibility
|
||||
- CSS Modules don't interfere with insertr classes
|
||||
- Complex asset paths preserved correctly
|
||||
- Next.js client-side hydration unaffected
|
||||
|
||||
### ✅ Developer Experience
|
||||
- Simple enhancement workflow: download → add classes → enhance → serve
|
||||
|
||||
- Clear feedback on enhancement results
|
||||
|
||||
## Comparison with Demo Site
|
||||
|
||||
| Feature | Demo Site | Dan Eden Portfolio |
|
||||
|---------|-----------|-------------------|
|
||||
| Framework | Vanilla HTML/CSS | Next.js + CSS Modules |
|
||||
| Complexity | Designed for insertr | Real-world site |
|
||||
| Content Types | All types tested | Primarily text/markdown |
|
||||
| Asset Handling | Simple | Complex (fonts, images, JS bundles) |
|
||||
| Enhancement | Pre-configured | Added insertr classes manually |
|
||||
|
||||
## Next Steps for Expansion
|
||||
|
||||
### Immediate (Simple Sites)
|
||||
- [ ] Download GitHub Pages portfolio sites
|
||||
- [ ] Test Bootstrap documentation pages
|
||||
- [ ] Test Jekyll blog sites
|
||||
|
||||
### Framework-Based Sites
|
||||
- [ ] Tailwind CSS marketing pages
|
||||
- [ ] Vue.js documentation
|
||||
- [ ] React component library sites
|
||||
|
||||
### Complex Sites
|
||||
- [ ] Stripe product pages (advanced layouts)
|
||||
- [ ] Corporate sites with multiple sections
|
||||
- [ ] E-commerce product pages
|
||||
|
||||
## Technical Insights
|
||||
|
||||
### What Works Well
|
||||
1. **CSS Framework Agnostic** - Insertr classes don't conflict with existing CSS
|
||||
2. **Asset Preservation** - Complex build assets maintained perfectly
|
||||
3. **Content Type Detection** - Smart defaults for different HTML elements
|
||||
4. **ID Generation** - Deterministic, content-based IDs
|
||||
|
||||
### Areas for Future Testing
|
||||
1. **JavaScript Interactions** - Test sites with heavy client-side JS
|
||||
2. **Dynamic Content** - Sites with client-side routing
|
||||
3. **Complex Forms** - Contact forms, search interfaces
|
||||
4. **Media Rich Content** - Image galleries, video embeds
|
||||
|
||||
## Success Metrics
|
||||
|
||||
- ✅ **Infrastructure**: Complete test site collection structure
|
||||
- ✅ **Automation**: Working download and enhancement scripts
|
||||
- ✅ **Real-world validation**: Successfully enhanced professional portfolio
|
||||
- ✅ **Framework compatibility**: Next.js + CSS Modules working
|
||||
- ✅ **Zero-config philosophy**: No configuration files needed
|
||||
- ✅ **Demo system**: Easy-to-use demo commands for testing
|
||||
|
||||
## Demo Commands
|
||||
|
||||
### **Quick Demo Access**
|
||||
```bash
|
||||
# Start default insertr demo
|
||||
just demo
|
||||
|
||||
# Start Dan Eden portfolio demo
|
||||
just demo dan-eden
|
||||
|
||||
# List all available demos
|
||||
just list-demos
|
||||
|
||||
# Test demo infrastructure
|
||||
node demos/scripts/test-demo.js
|
||||
```
|
||||
|
||||
### **Demo Sites Available**
|
||||
1. **Default Demo** (`just demo`) - Built-in insertr showcase
|
||||
2. **Dan Eden Portfolio** (`just demo dan-eden`) - Real-world Next.js site
|
||||
|
||||
## Conclusion
|
||||
|
||||
The testing infrastructure is successfully established and validated. Dan Eden's portfolio demonstrates that insertr works seamlessly with real-world sites using modern frameworks. The zero-configuration approach proves effective - developers only need to add `class="insertr"` to make content editable.
|
||||
|
||||
Ready to expand testing to additional site types and complexity levels.
|
||||
46
demos/dan-eden-portfolio/README.md
Normal file
@@ -0,0 +1,46 @@
|
||||
# Dan Eden Portfolio
|
||||
|
||||
## Original URL
|
||||
https://daneden.me
|
||||
|
||||
## Downloaded
|
||||
2025-09-11T15:48:33.014Z
|
||||
|
||||
## Site Characteristics
|
||||
- **Framework**: Next.js with CSS Modules
|
||||
- **Styling**: Clean, minimal design with CSS-in-JS
|
||||
- **Content**: Personal portfolio with bio, projects, and talks
|
||||
- **Complexity**: Simple - good for basic insertr testing
|
||||
|
||||
## Insertr Enhancement Status
|
||||
- [x] Content sections identified
|
||||
- [x] Insertr classes added to key elements
|
||||
- [x] Enhanced version created
|
||||
- [x] Insertr functionality tested
|
||||
- [x] Results documented
|
||||
|
||||
## Test Results
|
||||
✅ **Enhancement Success**: 7 elements successfully enhanced with insertr
|
||||
✅ **Server Integration**: Site registered as "dan-eden-test" in insertr.yaml
|
||||
✅ **Content ID Generation**: Auto-generated IDs like "index-span-4ba35c"
|
||||
✅ **Content Type Detection**: All elements correctly identified as "markdown" type
|
||||
✅ **Asset Preservation**: All original Next.js assets and styling preserved
|
||||
|
||||
## Enhanced Elements
|
||||
1. **Main bio paragraph** (`<p class="home_xxl__iX0Z1 insertr">`) - Product designer introduction
|
||||
2. **Company name** (`<span class="insertr">Meta Reality Labs</span>`) - Current employer
|
||||
3. **App descriptions** - Ora and Solstice project descriptions
|
||||
4. **Talk content** - "Where We Can Go" title and description
|
||||
5. **Action buttons** - "Learn more" and "Read the post" links
|
||||
|
||||
## Testing Notes
|
||||
- Clean HTML structure ideal for insertr compatibility
|
||||
- CSS Modules shouldn't interfere with insertr classes
|
||||
- Good test case for semantic content editing
|
||||
- Minimal JavaScript complexity
|
||||
|
||||
## Files
|
||||
- `index.html.original` - Original downloaded version
|
||||
- `index.html` - Enhanced version with insertr classes
|
||||
- `insertr-config.json` - Configuration for testing
|
||||
- `_next/` - Next.js assets and styles
|
||||
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 33 KiB |
|
After Width: | Height: | Size: 33 KiB |
|
After Width: | Height: | Size: 33 KiB |
|
After Width: | Height: | Size: 33 KiB |
|
After Width: | Height: | Size: 33 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 33 KiB |
|
After Width: | Height: | Size: 33 KiB |
@@ -0,0 +1 @@
|
||||
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5076],{226:(e,A,t)=>{"use strict";t.r(A),t.d(A,{default:()=>r});let r={src:"/_next/static/media/iPadPro11M4.93b0325f.png",height:1880,width:2640,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAGCAMAAADJ2y/JAAAAD1BMVEUGBgZMaXELCQsAAAAKCQqRNR3zAAAABXRSTlNFACsEWomyBWcAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAjSURBVHicY2BhAAMWBiZGMGBiYGJkZmZmhjAYGSEMqBRMMQAHdABFMwT0jgAAAABJRU5ErkJggg==",blurWidth:8,blurHeight:6}},1965:e=>{e.exports={root:"styles_root__rUjFN",children:"styles_children__D9Nsi",bezel:"styles_bezel___vGQl"}},4769:(e,A,t)=>{"use strict";t.r(A),t.d(A,{default:()=>r});let r={src:"/_next/static/media/wwcg.c58b0775.png",height:707,width:698,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAABlBMVEUAAAAAAAClZ7nPAAAAAnRSTlMRA7xDv5IAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAmSURBVHicRcsBCgAwAEFR7/6XXmw1iZ8SRBokUZc2T6+G4/v4LzgE0AAifxUgZgAAAABJRU5ErkJggg==",blurWidth:8,blurHeight:8}},5337:e=>{e.exports={root:"home_root__o7QEV",intro:"home_intro__8dWW4",xxl:"home_xxl__iX0Z1"}},5715:(e,A,t)=>{"use strict";t.d(A,{default:()=>i});var r=t(5155),s=t(2115),o=t(9588);function i(e){let{autoPlay:A=!1,caption:t,controls:i=!0,id:l,loop:n=!1,preload:a=!0,playsInline:h=!1,poster:_,muted:c=!1,width:g,height:d,className:u}=e,E=(0,s.useRef)(null),b=void 0==_?void 0:"https://image.mux.com/".concat(l,"/thumbnail.webp?time=").concat(_),m="https://stream.mux.com/".concat(l,".m3u8");(0,s.useEffect)(()=>{let e;return o.Ay.isSupported()&&function t(){null!=e&&e.destroy();let r=new o.Ay({enableWorker:!1});null!=E.current&&r.attachMedia(E.current),r.on(o.Ay.Events.MEDIA_ATTACHED,()=>{r.loadSource(m),r.on(o.Ay.Events.MANIFEST_PARSED,()=>{if(A){var e;null==E||null==(e=E.current)||e.play().catch(()=>{console.log("Unable to autoplay prior to user interaction with the DOM")})}})}),r.on(o.Ay.Events.ERROR,function(e,A){if(A.fatal)switch(A.type){case o.Ay.ErrorTypes.NETWORK_ERROR:r.startLoad();break;case o.Ay.ErrorTypes.MEDIA_ERROR:r.recoverMediaError();break;default:t()}}),e=r}(),()=>{null!=e&&e.destroy()}},[A,E,m]);let R={autoPlay:A,className:u,playsInline:h,loop:n,controls:i,width:g,height:d,poster:b,muted:c,preload:a?"auto":"none",suppressHydrationWarning:!0},p=o.Ay.isSupported()?(0,r.jsx)("video",{ref:E,...R}):(0,r.jsx)("video",{ref:E,src:m,...R});return(0,r.jsxs)("figure",{children:[p,t&&(0,r.jsx)("figcaption",{children:t})]})}},6432:(e,A,t)=>{Promise.resolve().then(t.bind(t,226)),Promise.resolve().then(t.bind(t,6511)),Promise.resolve().then(t.t.bind(t,1965,23)),Promise.resolve().then(t.t.bind(t,9075,23)),Promise.resolve().then(t.t.bind(t,5337,23)),Promise.resolve().then(t.bind(t,5715)),Promise.resolve().then(t.bind(t,4769)),Promise.resolve().then(t.t.bind(t,7187,23)),Promise.resolve().then(t.t.bind(t,8310,23)),Promise.resolve().then(t.t.bind(t,6874,23)),Promise.resolve().then(t.t.bind(t,3063,23))},6511:(e,A,t)=>{"use strict";t.r(A),t.d(A,{default:()=>r});let r={src:"/_next/static/media/iPhone14Pro.2e2e287c.png",height:2716,width:1339,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAICAMAAADp7a43AAAADFBMVEUgHh0iIB9MaXEPDw/kr3MeAAAABHRSTlMpNgBRUiN+bgAAAAlwSFlzAAAhOAAAITgBRZYxYAAAAB1JREFUeJxjYGRmZmRgYGJiYGAEEWAWGsHIwMAIAANWACQGp/BhAAAAAElFTkSuQmCC",blurWidth:4,blurHeight:8}},7187:e=>{e.exports={root:"styles_root__loSke"}},8310:e=>{e.exports={root:"styles_root__ezqfE",card:"styles_card__Zgiwg",wwcgImage:"styles_wwcgImage__6T0vh",highlight:"styles_highlight__PDTTu",stretcher:"styles_stretcher__vQB9_",button:"styles_button__OAX5k"}},9075:e=>{e.exports={root:"styles_root__bf3zB",left:"styles_left__647Tl",right:"styles_right__Ibe_m"}}},e=>{var A=A=>e(e.s=A);e.O(0,[1005,9910,6874,3063,8441,1684,7358],()=>A(6432)),_N_E=e.O()}]);
|
||||
@@ -0,0 +1 @@
|
||||
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7358],{9288:(e,s,n)=>{Promise.resolve().then(n.t.bind(n,894,23)),Promise.resolve().then(n.t.bind(n,4970,23)),Promise.resolve().then(n.t.bind(n,6614,23)),Promise.resolve().then(n.t.bind(n,6975,23)),Promise.resolve().then(n.t.bind(n,7555,23)),Promise.resolve().then(n.t.bind(n,4911,23)),Promise.resolve().then(n.t.bind(n,9665,23)),Promise.resolve().then(n.t.bind(n,1295,23))},9393:()=>{}},e=>{var s=s=>e(e.s=s);e.O(0,[8441,1684],()=>(s(5415),s(9288))),_N_E=e.O()}]);
|
||||
@@ -0,0 +1,2 @@
|
||||
(()=>{"use strict";var e={},t={};function r(o){var n=t[o];if(void 0!==n)return n.exports;var a=t[o]={exports:{}},i=!0;try{e[o](a,a.exports,r),i=!1}finally{i&&delete t[o]}return a.exports}r.m=e,(()=>{var e=[];r.O=(t,o,n,a)=>{if(o){a=a||0;for(var i=e.length;i>0&&e[i-1][2]>a;i--)e[i]=e[i-1];e[i]=[o,n,a];return}for(var u=1/0,i=0;i<e.length;i++){for(var[o,n,a]=e[i],l=!0,c=0;c<o.length;c++)(!1&a||u>=a)&&Object.keys(r.O).every(e=>r.O[e](o[c]))?o.splice(c--,1):(l=!1,a<u&&(u=a));if(l){e.splice(i--,1);var d=n();void 0!==d&&(t=d)}}return t}})(),r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;r.t=function(o,n){if(1&n&&(o=this(o)),8&n||"object"==typeof o&&o&&(4&n&&o.__esModule||16&n&&"function"==typeof o.then))return o;var a=Object.create(null);r.r(a);var i={};e=e||[null,t({}),t([]),t(t)];for(var u=2&n&&o;"object"==typeof u&&!~e.indexOf(u);u=t(u))Object.getOwnPropertyNames(u).forEach(e=>i[e]=()=>o[e]);return i.default=()=>o,r.d(a,i),a}})(),r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((t,o)=>(r.f[o](e,t),t),[])),r.u=e=>{},r.miniCssF=e=>{},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={},t="_N_E:";r.l=(o,n,a,i)=>{if(e[o])return void e[o].push(n);if(void 0!==a)for(var u,l,c=document.getElementsByTagName("script"),d=0;d<c.length;d++){var f=c[d];if(f.getAttribute("src")==o||f.getAttribute("data-webpack")==t+a){u=f;break}}u||(l=!0,(u=document.createElement("script")).charset="utf-8",u.timeout=120,r.nc&&u.setAttribute("nonce",r.nc),u.setAttribute("data-webpack",t+a),u.src=r.tu(o)),e[o]=[n];var s=(t,r)=>{u.onerror=u.onload=null,clearTimeout(p);var n=e[o];if(delete e[o],u.parentNode&&u.parentNode.removeChild(u),n&&n.forEach(e=>e(r)),t)return t(r)},p=setTimeout(s.bind(null,void 0,{type:"timeout",target:u}),12e4);u.onerror=s.bind(null,u.onerror),u.onload=s.bind(null,u.onload),l&&document.head.appendChild(u)}})(),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;r.tt=()=>(void 0===e&&(e={createScriptURL:e=>e},"undefined"!=typeof trustedTypes&&trustedTypes.createPolicy&&(e=trustedTypes.createPolicy("nextjs#bundler",e))),e)})(),r.tu=e=>r.tt().createScriptURL(e),r.p="/_next/",(()=>{var e={8068:0,9127:0,1005:0,1483:0,5110:0,6890:0};r.f.j=(t,o)=>{var n=r.o(e,t)?e[t]:void 0;if(0!==n)if(n)o.push(n[2]);else if(/^(1005|1483|5110|6890|8068|9127)$/.test(t))e[t]=0;else{var a=new Promise((r,o)=>n=e[t]=[r,o]);o.push(n[2]=a);var i=r.p+r.u(t),u=Error();r.l(i,o=>{if(r.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var a=o&&("load"===o.type?"missing":o.type),i=o&&o.target&&o.target.src;u.message="Loading chunk "+t+" failed.\n("+a+": "+i+")",u.name="ChunkLoadError",u.type=a,u.request=i,n[1](u)}},"chunk-"+t,t)}},r.O.j=t=>0===e[t];var t=(t,o)=>{var n,a,[i,u,l]=o,c=0;if(i.some(t=>0!==e[t])){for(n in u)r.o(u,n)&&(r.m[n]=u[n]);if(l)var d=l(r)}for(t&&t(o);c<i.length;c++)a=i[c],r.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return r.O(d)},o=self.webpackChunk_N_E=self.webpackChunk_N_E||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})()})();
|
||||
;(function(){if(typeof document==="undefined"||!/(?:^|;\s)__vercel_toolbar=1(?:;|$)/.test(document.cookie))return;var s=document.createElement('script');s.src='https://vercel.live/_next-live/feedback/feedback.js';s.setAttribute("data-explicit-opt-in","true");s.setAttribute("data-cookie-opt-in","true");s.setAttribute("data-deployment-id","dpl_4tmoGZS37rLepoJ6Qs6iJ48L6AxP");((document.head||document.documentElement).appendChild(s))})();
|
||||
BIN
demos/dan-eden-portfolio/icon.jpeg?a235122132d5a650
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
1
demos/dan-eden-portfolio/index.html
Normal file
22
demos/dan-eden-portfolio/insertr-config.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"site_name": "Dan Eden Portfolio",
|
||||
"description": "Personal portfolio site with clean design and minimal styling",
|
||||
"base_url": "https://daneden.me",
|
||||
"content_sections": [
|
||||
{
|
||||
"selector": ".home_xxl__iX0Z1",
|
||||
"type": "markdown",
|
||||
"editable": true,
|
||||
"description": "Main bio paragraph - Product Designer intro"
|
||||
},
|
||||
{
|
||||
"selector": "span.insertr",
|
||||
"type": "text",
|
||||
"editable": true,
|
||||
"description": "Various text content elements (company, descriptions, titles)"
|
||||
}
|
||||
],
|
||||
"css_frameworks": ["Next.js CSS Modules"],
|
||||
"complexity": "simple",
|
||||
"testing_notes": "Clean Next.js site with CSS modules. Good test for CSS-in-JS compatibility and semantic HTML structure."
|
||||
}
|
||||
27
demos/dan-eden-portfolio/insertr.yaml
Normal file
@@ -0,0 +1,27 @@
|
||||
# Insertr Configuration for Dan Eden Portfolio Demo Site
|
||||
# Specific configuration for the Dan Eden portfolio demo
|
||||
|
||||
# Global settings
|
||||
dev_mode: true # Development mode for demos
|
||||
|
||||
# Database configuration
|
||||
database:
|
||||
path: "./insertr.db" # Shared database with main config
|
||||
|
||||
# Demo-specific configuration
|
||||
demo:
|
||||
site_id: "dan-eden-portfolio" # Unique site ID for Dan Eden demo
|
||||
inject_demo_gate: true # Auto-inject demo gate if no gates exist
|
||||
mock_auth: true # Use mock authentication for demos
|
||||
api_endpoint: "http://localhost:8080/api/content"
|
||||
demo_port: 3000 # Port for live-server
|
||||
|
||||
# CLI enhancement configuration
|
||||
cli:
|
||||
site_id: "dan-eden-portfolio" # Site ID for this demo
|
||||
output: "./demos/dan-eden-portfolio_enhanced" # Output directory for enhanced files
|
||||
inject_demo_gate: true # Inject demo gate in development mode
|
||||
|
||||
# Authentication configuration (for demo)
|
||||
auth:
|
||||
provider: "mock" # Mock auth for demos
|
||||
115
demos/default/README.md
Normal file
@@ -0,0 +1,115 @@
|
||||
# Insertr Demo Site
|
||||
|
||||
This is a prototype demonstration of the Insertr edit-in-place CMS system.
|
||||
|
||||
## What is Insertr?
|
||||
|
||||
Insertr allows developers to make any website content editable by simply adding a CSS class. Clients can then log in and edit content directly on their website without needing to learn a complex admin interface.
|
||||
|
||||
## Three User Types
|
||||
|
||||
### 1. The Customer (End User)
|
||||
- Sees a clean, professional website
|
||||
- No editing interface visible
|
||||
- Fast loading with minimal overhead
|
||||
|
||||
### 2. The Client (Content Manager)
|
||||
- Logs in to see the same website with subtle edit buttons
|
||||
- Clicks edit buttons to modify content inline
|
||||
- Can edit both simple text and rich markdown content
|
||||
- Changes are saved immediately
|
||||
|
||||
### 3. The Developer (You)
|
||||
- Simple integration: just add `class="insertr"` and `data-content-id="unique-id"`
|
||||
- No complex setup or framework dependencies
|
||||
- Works with any existing website
|
||||
|
||||
## Demo Instructions
|
||||
|
||||
1. **Open `index.html` in your browser** - You'll see the customer view
|
||||
2. **Click "Login as Client"** - This simulates authentication
|
||||
3. **Click "Edit Mode: Off" to turn on editing** - Now you'll see edit buttons (✏️) appear
|
||||
4. **Click any edit button** to modify content
|
||||
5. **Try both simple text and rich content** (marked with 📝)
|
||||
6. **Navigate to `about.html`** to see how it works across pages
|
||||
|
||||
## Technical Details
|
||||
|
||||
### For Developers
|
||||
|
||||
To make content editable, just add the insertr class and data attribute:
|
||||
|
||||
```html
|
||||
<!-- Simple text content -->
|
||||
<div class="insertr" data-content-id="hero-title">
|
||||
<h1>Your Website Title</h1>
|
||||
</div>
|
||||
|
||||
<!-- Rich content with markdown -->
|
||||
<div class="insertr" data-content-id="about-text" data-content-type="rich">
|
||||
<h2>About Us</h2>
|
||||
<p>We help businesses succeed...</p>
|
||||
</div>
|
||||
```
|
||||
|
||||
### Integration
|
||||
|
||||
Include the Insertr library in your HTML:
|
||||
|
||||
```html
|
||||
<link rel="stylesheet" href="insertr/insertr.css">
|
||||
<script src="insertr/insertr.js"></script>
|
||||
```
|
||||
|
||||
That's it! The library will automatically scan for editable elements and set up the editing interface.
|
||||
|
||||
## Current Features
|
||||
|
||||
- ✅ Edit-in-place for simple text content
|
||||
- ✅ Markdown editing for rich content
|
||||
- ✅ Mock authentication (login/logout)
|
||||
- ✅ Edit mode toggle
|
||||
- ✅ Local storage persistence
|
||||
- ✅ Visual feedback for saving
|
||||
- ✅ Multi-page support
|
||||
- ✅ Responsive design
|
||||
|
||||
## Planned Features
|
||||
|
||||
- [ ] Real backend API integration
|
||||
- [ ] Authentik OAuth integration
|
||||
- [ ] File upload and image management
|
||||
- [ ] Content versioning and rollback
|
||||
- [ ] Multi-user permissions
|
||||
- [ ] Admin dashboard
|
||||
- [ ] Git-based deployment
|
||||
|
||||
## Architecture
|
||||
|
||||
This prototype demonstrates the frontend experience. The full system will include:
|
||||
|
||||
- **Go backend** with REST API
|
||||
- **File-based content storage** with Git versioning
|
||||
- **Authentik OAuth** for secure authentication
|
||||
- **Multi-tenant support** for hosting multiple client sites
|
||||
- **Developer tools** for easy integration
|
||||
|
||||
## Files Structure
|
||||
|
||||
```
|
||||
demo-site/
|
||||
├── index.html # Homepage demo
|
||||
├── about.html # Additional page demo
|
||||
├── assets/
|
||||
│ └── style.css # Demo site styling
|
||||
├── insertr/
|
||||
│ ├── insertr.js # Core library
|
||||
│ ├── insertr.css # Edit interface styling
|
||||
│ └── components/ # Future: edit components
|
||||
└── mock-api/
|
||||
└── content.json # Mock backend data structure
|
||||
```
|
||||
|
||||
## Try It Now!
|
||||
|
||||
Open `index.html` in your browser and experience the three different user views by using the authentication controls in the top right corner.
|
||||
137
demos/default/about.html
Normal file
@@ -0,0 +1,137 @@
|
||||
<!DOCTYPE html><html lang="en"><head>
|
||||
<meta charset="UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<title>About - Acme Consulting Services</title>
|
||||
<link rel="stylesheet" href="assets/style.css"/>
|
||||
|
||||
<script src="http://localhost:8080/insertr.js" data-insertr-injected="true" data-site-id="demo" data-api-endpoint="http://localhost:8080/api/content" data-mock-auth="true" data-debug="true"></script></head>
|
||||
<body>
|
||||
<!-- Navigation -->
|
||||
<nav class="navbar">
|
||||
<div class="container">
|
||||
<h1 class="logo insertr" data-content-id="about-logo-bf9558" data-content-type="text">Acme Consulting</h1>
|
||||
<ul class="nav-links">
|
||||
<li class="insertr" data-content-id="about-li-0babbf" data-content-type="text"><a href="index.html">Home</a></li>
|
||||
<li class="insertr" data-content-id="about-li-2-0babbf" data-content-type="text"><a href="about.html">About</a></li>
|
||||
<li class="insertr" data-content-id="about-li-3-0babbf" data-content-type="text"><a href="contact.html">Contact</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<!-- Hero Section -->
|
||||
<section class="hero">
|
||||
<div class="container">
|
||||
<h1 class="insertr" data-content-id="about-h1-b0851a" data-content-type="text">About Acme Consulting</h1>
|
||||
<p class="lead insertr" data-content-id="about-lead-ccc316" data-content-type="markdown">We're a team of experienced consultants dedicated to helping small businesses thrive in today's competitive marketplace.</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Story Section -->
|
||||
<section class="services">
|
||||
<div class="container">
|
||||
<h2 class="insertr" data-content-id="about-h2-246854" data-content-type="text">Our Story</h2>
|
||||
<div class="insertr-group">
|
||||
<p class="insertr" data-content-id="about-p-b2f44a" data-content-type="markdown">Founded in 2020, Acme Consulting emerged from a simple observation: small businesses needed access to the same high-quality strategic advice that large corporations receive, but in a format that was accessible, affordable, and actionable.</p>
|
||||
|
||||
<p class="insertr" data-content-id="about-p-2-b2f44a" data-content-type="markdown">Our founders, with combined experience of over 30 years in business strategy, operations, and technology, recognized that the traditional consulting model wasn't serving the needs of growing businesses. We set out to change that.</p>
|
||||
|
||||
<p class="insertr" data-content-id="about-p-3-b2f44a" data-content-type="markdown">Today, we've helped over **200 businesses** streamline their operations, clarify their strategy, and achieve sustainable growth. Our approach combines proven methodologies with a deep understanding of the unique challenges facing small to medium-sized businesses.</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Team Section -->
|
||||
<section class="cta">
|
||||
<div class="container">
|
||||
<h2 class="insertr" data-content-id="about-h2-2-f16ab1" data-content-type="text">Our Team</h2>
|
||||
<p class="insertr" data-content-id="about-p-0e26bc" data-content-type="markdown">We're a diverse group of strategists, operators, and technology experts united by our passion for helping businesses succeed.</p>
|
||||
|
||||
<div class="services-grid" style="margin-top: 3rem;">
|
||||
<div class="service-card">
|
||||
<div class="insertr" data-content-id="about-div-dac2cd" data-content-type="markdown">
|
||||
<h3>Sarah Chen</h3>
|
||||
<p><strong>Founder & CEO</strong></p>
|
||||
<p>Former <strong>McKinsey consultant</strong> with 15 years of experience in strategy and operations. MBA from Stanford.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="service-card">
|
||||
<div class="insertr" data-content-id="about-div-2-dac2cd" data-content-type="markdown">
|
||||
<h3>Michael Rodriguez</h3>
|
||||
<p><strong>Head of Operations</strong></p>
|
||||
<p>20 years in manufacturing and supply chain optimization. Expert in <strong>lean methodologies</strong> and process improvement.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="service-card">
|
||||
<div class="insertr" data-content-id="about-div-3-dac2cd" data-content-type="markdown">
|
||||
<h3>Emma Thompson</h3>
|
||||
<p><strong>Digital Strategy Lead</strong></p>
|
||||
<p>Former tech startup founder turned consultant. Specializes in <em>digital transformation</em> and technology adoption.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Values Section -->
|
||||
<section class="testimonial">
|
||||
<div class="container">
|
||||
<h2 class="insertr" style="margin-bottom: 2rem;" data-content-id="about-h2-3-893efa" data-content-type="text">Our Values</h2>
|
||||
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; text-align: left;">
|
||||
<div>
|
||||
<h3 class="insertr" data-content-id="about-h3-4-07ce1b" data-content-type="text">Client-First</h3>
|
||||
<p class="insertr" data-content-id="about-p-2-9f60dd" data-content-type="markdown">Every recommendation we make is designed with your specific business context and goals in mind.</p>
|
||||
</div>
|
||||
<div>
|
||||
<h3 class="insertr" data-content-id="about-h3-5-07ce1b" data-content-type="text">Practical Solutions</h3>
|
||||
<p class="insertr" data-content-id="about-p-3-9f60dd" data-content-type="markdown">We believe in strategies that you can actually implement with your current resources and capabilities.</p>
|
||||
</div>
|
||||
<div>
|
||||
<h3 class="insertr" data-content-id="about-h3-6-07ce1b" data-content-type="text">Long-term Partnership</h3>
|
||||
<p class="insertr" data-content-id="about-p-4-9f60dd" data-content-type="markdown">We're not just consultants; we're partners in your business success for the long haul.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Test Section for Insertr Features -->
|
||||
<section class="testimonial">
|
||||
<div class="container">
|
||||
<h2 class="insertr" data-content-id="about-h2-4-893efa" data-content-type="text">Feature Tests</h2>
|
||||
|
||||
<!-- Test 1: .insertr container expansion (should make each p individually editable) -->
|
||||
<div style="margin-bottom: 2rem;">
|
||||
<h3 class="insertr" data-content-id="about-h3-ea6b29" data-content-type="text">Test 1: Container Expansion (.insertr)</h3>
|
||||
<div class="insertr" style="border: 2px dashed #ccc; padding: 1rem;" data-content-id="about-div-4-e2aa93" data-content-type="markdown">
|
||||
<p>This paragraph should be individually editable with a textarea.</p>
|
||||
<p>This second paragraph should also be individually editable.</p>
|
||||
<p>Each paragraph should get its own modal when clicked.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Test 2: .insertr-group collective editing (should edit all together) -->
|
||||
<div>
|
||||
<h3 class="insertr" data-content-id="about-h3-2-ea6b29" data-content-type="text">Test 2: Group Editing (.insertr-group)</h3>
|
||||
<div class="insertr-group" style="border: 2px solid #007cba; padding: 1rem;">
|
||||
<p class="insertr" data-content-id="about-p-4-dcfaf1" data-content-type="markdown">This paragraph is part of a <strong>group</strong>.</p>
|
||||
<p class="insertr" data-content-id="about-p-5-dcfaf1" data-content-type="markdown">Clicking anywhere should open one markdown editor with <em>rich formatting</em>.</p>
|
||||
<p class="insertr" data-content-id="about-p-6-dcfaf1" data-content-type="markdown">All content should be <strong>editable together</strong> as markdown with proper <em>HTML conversion</em>.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Footer -->
|
||||
<footer class="footer">
|
||||
<div class="container">
|
||||
<p class="insertr" data-content-id="about-p-8-c093f3" data-content-type="markdown">© 2024 Acme Consulting Services. All rights reserved.</p>
|
||||
<p class="insertr" data-content-id="about-p-9-c093f3" data-content-type="markdown">📧 info@acmeconsulting.com | 📞 (555) 123-4567 | <button class="insertr-gate" style="background: none; border: 1px solid #ccc; padding: 4px 8px; margin-left: 10px; border-radius: 3px; font-size: 11px;">🔧 Edit</button></p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<!-- Insertr JavaScript Library -->
|
||||
<script type="text/javascript" src="insertr.js"></script>
|
||||
|
||||
|
||||
|
||||
</body></html>
|
||||
254
demos/default/assets/style.css
Normal file
@@ -0,0 +1,254 @@
|
||||
/* Reset and Base Styles */
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
||||
line-height: 1.6;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.container {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
/* Navigation */
|
||||
.navbar {
|
||||
background: #fff;
|
||||
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
|
||||
position: fixed;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.navbar .container {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 1rem 20px;
|
||||
}
|
||||
|
||||
.logo {
|
||||
color: #2563eb;
|
||||
font-size: 1.5rem;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.nav-links {
|
||||
display: flex;
|
||||
list-style: none;
|
||||
gap: 2rem;
|
||||
}
|
||||
|
||||
.nav-links a {
|
||||
text-decoration: none;
|
||||
color: #333;
|
||||
font-weight: 500;
|
||||
transition: color 0.3s;
|
||||
}
|
||||
|
||||
.nav-links a:hover {
|
||||
color: #2563eb;
|
||||
}
|
||||
|
||||
.auth-controls {
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
/* Buttons */
|
||||
.btn-primary, .btn-secondary {
|
||||
padding: 0.75rem 1.5rem;
|
||||
border: none;
|
||||
border-radius: 6px;
|
||||
font-weight: 500;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s;
|
||||
display: inline-block;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background: #2563eb;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.btn-primary:hover {
|
||||
background: #1d4ed8;
|
||||
}
|
||||
|
||||
.btn-secondary {
|
||||
background: #f3f4f6;
|
||||
color: #374151;
|
||||
border: 1px solid #d1d5db;
|
||||
}
|
||||
|
||||
.btn-secondary:hover {
|
||||
background: #e5e7eb;
|
||||
}
|
||||
|
||||
/* Hero Section */
|
||||
.hero {
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
color: white;
|
||||
padding: 8rem 0 4rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.hero h1 {
|
||||
font-size: 3rem;
|
||||
margin-bottom: 1rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.hero .lead {
|
||||
font-size: 1.25rem;
|
||||
margin-bottom: 2rem;
|
||||
opacity: 0.9;
|
||||
max-width: 600px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
/* Services Section */
|
||||
.services {
|
||||
padding: 4rem 0;
|
||||
background: #f9fafb;
|
||||
}
|
||||
|
||||
.services h2 {
|
||||
text-align: center;
|
||||
font-size: 2.5rem;
|
||||
margin-bottom: 1rem;
|
||||
color: #1f2937;
|
||||
}
|
||||
|
||||
.section-subtitle {
|
||||
text-align: center;
|
||||
font-size: 1.125rem;
|
||||
color: #6b7280;
|
||||
margin-bottom: 3rem;
|
||||
}
|
||||
|
||||
.services-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
||||
gap: 2rem;
|
||||
margin-top: 3rem;
|
||||
}
|
||||
|
||||
.service-card {
|
||||
background: white;
|
||||
padding: 2rem;
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 4px 6px rgba(0,0,0,0.05);
|
||||
transition: transform 0.3s, box-shadow 0.3s;
|
||||
}
|
||||
|
||||
.service-card:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 8px 25px rgba(0,0,0,0.1);
|
||||
}
|
||||
|
||||
.service-card h3 {
|
||||
color: #2563eb;
|
||||
margin-bottom: 1rem;
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
/* Testimonial Section */
|
||||
.testimonial {
|
||||
padding: 4rem 0;
|
||||
background: #2563eb;
|
||||
color: white;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.testimonial blockquote {
|
||||
max-width: 800px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.testimonial p {
|
||||
font-size: 1.5rem;
|
||||
font-style: italic;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.testimonial cite {
|
||||
font-size: 1rem;
|
||||
opacity: 0.8;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
/* CTA Section */
|
||||
.cta {
|
||||
padding: 4rem 0;
|
||||
text-align: center;
|
||||
background: white;
|
||||
}
|
||||
|
||||
.cta h2 {
|
||||
font-size: 2.5rem;
|
||||
margin-bottom: 1rem;
|
||||
color: #1f2937;
|
||||
}
|
||||
|
||||
.cta p {
|
||||
font-size: 1.125rem;
|
||||
color: #6b7280;
|
||||
margin-bottom: 2rem;
|
||||
max-width: 600px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
/* Footer */
|
||||
.footer {
|
||||
background: #1f2937;
|
||||
color: white;
|
||||
padding: 2rem 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.footer p {
|
||||
margin-bottom: 0.5rem;
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
/* Responsive Design */
|
||||
@media (max-width: 768px) {
|
||||
.navbar .container {
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.nav-links {
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.auth-controls {
|
||||
flex-direction: column;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.hero h1 {
|
||||
font-size: 2rem;
|
||||
}
|
||||
|
||||
.hero .lead {
|
||||
font-size: 1.125rem;
|
||||
}
|
||||
|
||||
.services-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
83
demos/default/index.html
Normal file
@@ -0,0 +1,83 @@
|
||||
<!DOCTYPE html><html lang="en"><head>
|
||||
<meta charset="UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<title>Acme Consulting Services - Live Reload Test</title>
|
||||
<link rel="stylesheet" href="assets/style.css"/>
|
||||
|
||||
<body>
|
||||
<!-- Navigation -->
|
||||
<nav class="navbar">
|
||||
<div class="container">
|
||||
<h1 class="logo insertr" data-content-id="index-logo-c176ba" data-content-type="text">Acme Consulting</h1>
|
||||
<ul class="nav-links">
|
||||
<li class="insertr" data-content-id="index-li-bf7136" data-content-type="text"><a href="index.html">Home</a></li>
|
||||
<li class="insertr" data-content-id="index-li-2-bf7136" data-content-type="text"><a href="about.html">About</a></li>
|
||||
<li class="insertr" data-content-id="index-li-3-bf7136" data-content-type="text"><a href="contact.html">Contact</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<!-- Hero Section -->
|
||||
<section class="hero">
|
||||
<div class="container">
|
||||
<h1 class="insertr" data-content-id="index-h1-1b83cf" data-content-type="text">Transform Your Business with Expert Consulting</h1>
|
||||
<p class="lead insertr" data-content-id="index-lead-c7070a" data-content-type="markdown"><strong>We help small</strong> businesses grow through strategic planning, process optimization, and digital transformation. Our team brings 15+ years of experience to drive your success.</p>
|
||||
<a href="contact.html" class="btn-primary insertr" data-content-id="index-btn-primary-088a84" data-content-type="link">Get Started Today</a>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Services Section -->
|
||||
<section class="services">
|
||||
<div class="container">
|
||||
<h2 class="insertr" data-content-id="index-h2-7e9e73" data-content-type="text">Our Services</h2>
|
||||
<p class="section-subtitle insertr" data-content-id="index-section-subtitle-bf0683" data-content-type="markdown">Comprehensive solutions tailored to your business needs. We are flexible as willow sticks</p>
|
||||
|
||||
<div class="services-grid">
|
||||
<div class="service-card">
|
||||
<h3 class="insertr" data-content-id="index-h3-2c6736" data-content-type="text">Strategic Planning</h3>
|
||||
<p class="insertr" data-content-id="index-p-a935d2" data-content-type="markdown">Develop clear roadmaps and actionable strategies that align with your business goals and drive sustainable growth.</p>
|
||||
</div>
|
||||
<div class="service-card">
|
||||
<h3 class="insertr" data-content-id="index-h3-2-2c6736" data-content-type="text">Operations Optimization</h3>
|
||||
<p class="insertr" data-content-id="index-p-2-a935d2" data-content-type="markdown">Streamline processes, reduce costs, and improve efficiency through proven methodologies and best practices.</p>
|
||||
</div>
|
||||
<div class="service-card">
|
||||
<h3 class="insertr" data-content-id="index-h3-3-2c6736" data-content-type="text">Digital Transformation</h3>
|
||||
<p class="insertr" data-content-id="index-p-3-a935d2" data-content-type="markdown">Modernize your technology stack and digital presence to compete effectively in today's marketplace.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Testimonial Section -->
|
||||
<section class="testimonial">
|
||||
<div class="container">
|
||||
<blockquote>
|
||||
<p class="insertr" data-content-id="index-p-4-0a9466" data-content-type="markdown">"Acme Consulting transformed our operations completely. We saw a 40% increase in efficiency within 6 months of implementing their recommendations."</p>
|
||||
<cite class="insertr" data-content-id="index-cite-24152c" data-content-type="text">Sarah Johnson, CEO of TechStart Inc.</cite>
|
||||
</blockquote>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Call to Action -->
|
||||
<section class="cta">
|
||||
<div class="container">
|
||||
<h2 class="insertr" data-content-id="index-h2-2-9b9baa" data-content-type="text">Ready to Transform Your Business?</h2>
|
||||
<p class="insertr" data-content-id="index-p-5-e960fe" data-content-type="markdown">Contact us today for a free consultation and discover how we can help you achieve your goals.</p>
|
||||
<a href="contact.html" class="btn-primary insertr" data-content-id="index-btn-primary-2-a33c64" data-content-type="link">Schedule Consultation</a>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Footer -->
|
||||
<footer class="footer">
|
||||
<div class="container">
|
||||
<p class="insertr" data-content-id="index-p-6-9b47e7" data-content-type="markdown">© 2024 Acme Consulting Services. All rights reserved.</p>
|
||||
<p class="insertr" data-content-id="index-p-7-9b47e7" data-content-type="markdown">📧 info@acmeconsulting.com | 📞 (555) 123-4567 | Located in downtown Springfield | <button class="insertr-gate" style="background: none; border: 1px solid #ccc; padding: 4px 8px; margin-left: 10px; border-radius: 3px; font-size: 11px;">🔧 Edit</button></p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
|
||||
|
||||
</body></html>
|
||||
27
demos/default/insertr.yaml
Normal file
@@ -0,0 +1,27 @@
|
||||
# Insertr Configuration for Default Demo Site
|
||||
# Main configuration for the default demo site
|
||||
|
||||
# Global settings
|
||||
dev_mode: true # Development mode for demos
|
||||
|
||||
# Database configuration
|
||||
database:
|
||||
path: "./insertr.db" # Shared database with main config
|
||||
|
||||
# Demo-specific configuration
|
||||
demo:
|
||||
site_id: "default" # Unique site ID for default demo
|
||||
inject_demo_gate: true # Auto-inject demo gate if no gates exist
|
||||
mock_auth: true # Use mock authentication for demos
|
||||
api_endpoint: "http://localhost:8080/api/content"
|
||||
demo_port: 3000 # Port for live-server
|
||||
|
||||
# CLI enhancement configuration
|
||||
cli:
|
||||
site_id: "default" # Site ID for this demo
|
||||
output: "./demos/default_enhanced" # Output directory for enhanced files
|
||||
inject_demo_gate: true # Inject demo gate in development mode
|
||||
|
||||
# Authentication configuration (for demo)
|
||||
auth:
|
||||
provider: "mock" # Mock auth for demos
|
||||
71
demos/scripts/download-site.js
Executable file
@@ -0,0 +1,71 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
/**
|
||||
* Script to download a website with its assets for insertr testing
|
||||
* Usage: node download-site.js <url> <output-directory>
|
||||
*/
|
||||
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import { execSync } from 'child_process';
|
||||
|
||||
async function downloadSite(url, outputDir) {
|
||||
console.log(`Downloading ${url} to ${outputDir}`);
|
||||
|
||||
// Create output directory
|
||||
if (!fs.existsSync(outputDir)) {
|
||||
fs.mkdirSync(outputDir, { recursive: true });
|
||||
}
|
||||
|
||||
try {
|
||||
// Use wget to download the site with assets
|
||||
// --page-requisites: download all files needed to display page
|
||||
// --convert-links: convert links to work locally
|
||||
// --adjust-extension: add proper extensions
|
||||
// --no-parent: don't ascend to parent directory
|
||||
// --no-host-directories: don't create host directories
|
||||
// --cut-dirs=1: cut directory levels
|
||||
const wgetCmd = `wget --page-requisites --convert-links --adjust-extension --no-parent --no-host-directories --directory-prefix="${outputDir}" --user-agent="Mozilla/5.0 (compatible; insertr-test-bot)" "${url}"`;
|
||||
|
||||
execSync(wgetCmd, { stdio: 'inherit' });
|
||||
|
||||
console.log('✅ Download completed successfully');
|
||||
|
||||
// Create README for the site
|
||||
const readmeContent = `# ${path.basename(outputDir)}
|
||||
|
||||
## Original URL
|
||||
${url}
|
||||
|
||||
## Downloaded
|
||||
${new Date().toISOString()}
|
||||
|
||||
## Testing Notes
|
||||
- Site downloaded with assets for insertr testing
|
||||
- Check HTML structure for suitable content sections
|
||||
- Add insertr classes to editable sections
|
||||
|
||||
## Insertr Enhancement Status
|
||||
- [ ] Content sections identified
|
||||
- [ ] Insertr classes added
|
||||
- [ ] Enhanced version tested
|
||||
- [ ] Results documented
|
||||
`;
|
||||
|
||||
fs.writeFileSync(path.join(outputDir, 'README.md'), readmeContent);
|
||||
|
||||
} catch (error) {
|
||||
console.error('❌ Download failed:', error.message);
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
// Parse command line arguments
|
||||
const args = process.argv.slice(2);
|
||||
if (args.length < 2) {
|
||||
console.log('Usage: node download-site.js <url> <output-directory>');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const [url, outputDir] = args;
|
||||
downloadSite(url, outputDir);
|
||||
43
demos/scripts/test-demo.js
Executable file
@@ -0,0 +1,43 @@
|
||||
#!/usr/bin/env node
|
||||
/**
|
||||
* Test script to verify demo sites are working correctly
|
||||
*/
|
||||
|
||||
import { execSync } from 'child_process';
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
|
||||
console.log('🧪 Testing Insertr Demo Infrastructure');
|
||||
console.log('=====================================\n');
|
||||
|
||||
// Test 1: Check if enhanced sites exist
|
||||
console.log('📁 Checking enhanced test sites...');
|
||||
|
||||
const danEdenPath = './demos/simple/dan-eden-portfolio-enhanced';
|
||||
if (fs.existsSync(danEdenPath)) {
|
||||
console.log('✅ Dan Eden enhanced site exists');
|
||||
|
||||
// Check if it has insertr elements
|
||||
const indexPath = path.join(danEdenPath, 'index.html');
|
||||
if (fs.existsSync(indexPath)) {
|
||||
const content = fs.readFileSync(indexPath, 'utf8');
|
||||
const insertrElements = content.match(/data-content-id="[^"]+"/g);
|
||||
if (insertrElements && insertrElements.length > 0) {
|
||||
console.log(`✅ Found ${insertrElements.length} insertr-enhanced elements`);
|
||||
} else {
|
||||
console.log('❌ No insertr elements found in enhanced site');
|
||||
}
|
||||
} else {
|
||||
console.log('❌ index.html not found in enhanced site');
|
||||
}
|
||||
} else {
|
||||
console.log('❌ Dan Eden enhanced site not found');
|
||||
console.log(' Run: just enhance-demos');
|
||||
}
|
||||
|
||||
console.log('\n🎯 Demo Commands Available:');
|
||||
console.log(' just demo - Default demo');
|
||||
console.log(' just demo dan-eden - Dan Eden portfolio demo');
|
||||
console.log(' just list-demos - List all available demos');
|
||||
|
||||
console.log('\n🚀 Testing complete!');
|
||||
19
demos/simple/index.html
Normal file
@@ -0,0 +1,19 @@
|
||||
<!DOCTYPE html><html><head>
|
||||
<title>Simple Test</title>
|
||||
<script src="http://localhost:8080/insertr.js" data-insertr-injected="true" data-site-id="simple" data-api-endpoint="http://localhost:8080/api/content" data-mock-auth="true" data-debug="true"></script></head>
|
||||
<body>
|
||||
<h1 class="insertr" data-content-id="index-h1-e0f926" data-content-type="text">Welcome, you!!</h1>
|
||||
<p class="insertr" data-content-id="index-p-b376ed" data-content-type="markdown">This is a <strong>test</strong> paragraph with <a href="/">a link</a>.</p>
|
||||
<div>
|
||||
<h2 class="insertr" data-content-id="index-h2-d8622b" data-content-type="text">Section Title</h2>
|
||||
<p class="insertr" data-content-id="index-p-2-daa8f5" data-content-type="markdown">Another paragraph here.</p>
|
||||
<button class="insertr" data-content-id="index-button-41ef19" data-content-type="link">Click Me</button>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="insertr-demo-gate" style="position: fixed; top: 20px; right: 20px; z-index: 9999; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;">
|
||||
<button class="insertr-gate insertr-demo-gate-btn insertr" style="background: #4f46e5; color: white; border: none; padding: 10px 16px; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3); transition: all 0.2s ease; display: flex; align-items: center; gap: 8px; user-select: none;" onmouseover="this.style.background='#4338ca'; this.style.transform='translateY(-2px)'; this.style.boxShadow='0 6px 16px rgba(79, 70, 229, 0.4)'" onmouseout="this.style.background='#4f46e5'; this.style.transform='translateY(0)'; this.style.boxShadow='0 4px 12px rgba(79, 70, 229, 0.3)'" data-content-id="index-insertr-gate-61c9aa" data-content-type="link">
|
||||
<span style="font-size: 16px;">✏️</span>
|
||||
<span>Edit Site</span>
|
||||
</button>
|
||||
</div></body></html>
|
||||
27
demos/simple/insertr.yaml
Normal file
@@ -0,0 +1,27 @@
|
||||
# Insertr Configuration for Simple Demo Site
|
||||
# Specific configuration for the simple test site demo
|
||||
|
||||
# Global settings
|
||||
dev_mode: true # Development mode for demos
|
||||
|
||||
# Database configuration
|
||||
database:
|
||||
path: "./insertr.db" # Shared database with main config
|
||||
|
||||
# Demo-specific configuration
|
||||
demo:
|
||||
site_id: "simple" # Unique site ID for simple demo
|
||||
inject_demo_gate: true # Auto-inject demo gate if no gates exist
|
||||
mock_auth: true # Use mock authentication for demos
|
||||
api_endpoint: "http://localhost:8080/api/content"
|
||||
demo_port: 3000 # Port for live-server
|
||||
|
||||
# CLI enhancement configuration
|
||||
cli:
|
||||
site_id: "simple" # Site ID for this demo
|
||||
output: "./demos/simple_enhanced" # Output directory for enhanced files
|
||||
inject_demo_gate: true # Inject demo gate in development mode
|
||||
|
||||
# Authentication configuration (for demo)
|
||||
auth:
|
||||
provider: "mock" # Mock auth for demos
|
||||
28
demos/templates/insertr-config.template.json
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"site_name": "{{SITE_NAME}}",
|
||||
"description": "{{SITE_DESCRIPTION}}",
|
||||
"base_url": "{{BASE_URL}}",
|
||||
"content_sections": [
|
||||
{
|
||||
"selector": ".hero-content",
|
||||
"type": "markdown",
|
||||
"editable": true,
|
||||
"description": "Hero section content"
|
||||
},
|
||||
{
|
||||
"selector": ".feature-block",
|
||||
"type": "markdown",
|
||||
"editable": true,
|
||||
"description": "Feature description blocks"
|
||||
},
|
||||
{
|
||||
"selector": ".about-content",
|
||||
"type": "markdown",
|
||||
"editable": true,
|
||||
"description": "About section content"
|
||||
}
|
||||
],
|
||||
"css_frameworks": ["{{CSS_FRAMEWORK}}"],
|
||||
"complexity": "{{COMPLEXITY}}",
|
||||
"testing_notes": "{{TESTING_NOTES}}"
|
||||
}
|
||||