# Silex - Visual Website Editor Silex is a streamlined visual website editor that allows you to create and edit HTML pages with a drag-and-drop interface. ## Overview This Changemaker setup uses the minimal `silexlabs/silex` image, which provides a focused, single-site editing experience. It's particularly useful for editing the `home.html` and `main.html` templates in your MkDocs overrides. ## Access - **Default Port**: 6805 - **URL**: `http://localhost:6805` - **Container**: `silex-changemaker` ## Configuration ### Environment Variables - `SILEX_PORT`: External port mapping (default: 6805) - `SILEX_HOST`: Hostname for Silex (default: `silex.${DOMAIN}`) ### Volume Mounts Silex uses the following directories for persistence: - **Storage**: `./silex/storage` - Site data and configurations - **Hosting**: `./silex/hosting` - Published files - **HTML Files**: `./mkdocs/docs/overrides` - Direct access to edit `home.html` and `main.html` ## Usage ### Getting Started 1. Access Silex at `http://localhost:6805` 2. Create a new site or open an existing project 3. Use the visual editor to design your pages 4. Save your work to the mounted directories ### Editing MkDocs Templates Silex is configured to have access to your MkDocs override templates: - `home.html` - Custom home page template - `main.html` - Main template overrides You can edit these files directly through Silex's visual interface. ### Features - **Drag-and-Drop Interface**: Visual page building - **Filesystem Storage**: Simple file-based persistence - **Single Site Focus**: Streamlined for focused editing - **Responsive Design**: Mobile-friendly editing ## File Structure ``` silex/ ├── storage/ # Site configurations and data ├── hosting/ # Published website files └── html/ # Direct access to MkDocs overrides ├── home.html └── main.html ``` ## Tips 1. **Backup Important Files**: Always backup your templates before making changes 2. **Test Changes**: Preview your changes in MkDocs before publishing 3. **Use Version Control**: Commit your changes to git regularly 4. **Responsive Design**: Test your designs on different screen sizes ## Troubleshooting ### Port Conflicts If port 6805 is already in use, you can change it in your `.env` file: ```bash SILEX_PORT=8080 ``` ### File Permissions If you encounter permission issues, ensure the mounted directories have the correct ownership: ```bash sudo chown -R 1000:1000 ./silex/ ``` ### Container Issues To restart the Silex container: ```bash docker-compose restart silex ``` ## Integration with MkDocs Silex is particularly useful for editing MkDocs template overrides. After making changes in Silex: 1. Check your changes in the MkDocs live preview (`http://localhost:4000`) 2. Build the static site if everything looks good 3. Commit your changes to version control ## Resources - [Silex Official Website](https://www.silex.me/) - [Silex Documentation](https://docs.silex.me/) - [Silex GitHub Repository (minimal version)](https://github.com/silexlabs/silex-lib) - [Docker Hub - Silex Minimal](https://hub.docker.com/r/silexlabs/silex)