We can get some template from any web(theme) designer, which normally contains a set of html files with also js, css files inside it
node convert.js --from /data/tyolab/themes/boilerplates/vex --to /data/tyolab/mynewweb/client --dry-run true index.htmlnode convert.js --from /data/tyolab/themes/boilerplates/vex --to /data/tyolab/mynewweb/client --dry-run true --engine nextjs --strip_layout false index.html# Replace All Strings
"\{(.*)\}" -> {$1}
UnoWeb includes a built-in content editor for managing text variables and content files extracted from templates. The editor provides a web interface to edit both JSON configuration files and Markdown content files.
- Project Management: Switch between different projects/pages
- File Browser: View and select JSON files (menu.json, footer.json, settings.json) and Markdown files (section0.md, section1.md, etc.)
- Live Editing: Edit content directly in the browser with syntax highlighting
- Auto-save: Save changes with error handling and validation
- Content Types:
- JSON files: Structured data like menu items, footer links, site settings
- Markdown files: Long text content with HTML/Markdown formatting
# Use default client directory
node content-editor.js
# Or specify a custom project path
node content-editor.js /path/to/your/projectThe server will start on http://localhost:3001 by default.
- Open the editor: Visit
http://localhost:3001in your browser - Select a project: Click on a project button (e.g., "home", "posts")
- Choose a file: Select from the sidebar:
- JSON files (marked with "JSON" badge): menu, footer, settings
- Markdown files (marked with "MD" badge): section content
- Edit content: Make changes in the text editor
- Save: Click "Save Changes" to persist your edits
The editor works with the following directory structure:
project/
├── content/
│ ├── menu.json # Navigation menu configuration
│ ├── footer.json # Footer links and settings
│ ├── settings.json # Site-wide settings
│ ├── home/ # Page-specific content
│ │ ├── section0.md # Text content sections
│ │ ├── section1.md
│ │ └── ...
│ └── posts/ # Another page
│ └── ...
The content editor provides REST API endpoints:
GET /api/projects- List available projectsGET /api/content/:page- Get markdown content for a pagePOST /api/content/:page/:section- Update markdown contentGET /api/json/:page- Get all JSON files for a pageGET /api/json/:page/:file- Get specific JSON file contentPOST /api/json/:page/:file- Update JSON file content
The content editor requires Express.js:
npm install express