|
| 1 | +# Element Web for Apache |
| 2 | + |
| 3 | +This repository automatically syncs [Element Web](https://github.com/element-hq/element-web) releases and renames icon paths to avoid conflicts with Apache's `mod_alias` icon directory. |
| 4 | + |
| 5 | +## Problem |
| 6 | + |
| 7 | +Apache's `mod_alias` module typically maps `/icons/` to the server's icon directory (e.g., `/usr/share/apache2/icons/`). This conflicts with Element Web's `/icons/` directory, causing the application to fail loading its UI icons. |
| 8 | + |
| 9 | +## Solution |
| 10 | + |
| 11 | +This repository: |
| 12 | +1. Automatically fetches the latest Element Web releases |
| 13 | +2. Renames the `icons/` directory to `ui-icons/` |
| 14 | +3. Updates all references in CSS and HTML files accordingly |
| 15 | +4. Provides the processed files ready for Apache deployment |
| 16 | + |
| 17 | +## Automated Workflow |
| 18 | + |
| 19 | +The GitHub Actions workflow runs: |
| 20 | +- **Every Monday and Thursday at 03:00 UTC** |
| 21 | +- **Manually via workflow dispatch** |
| 22 | + |
| 23 | +When a new Element Web release is detected: |
| 24 | +1. Downloads the release tarball |
| 25 | +2. Runs the rename script to process icon paths |
| 26 | +3. Commits the processed files to the `processed/` directory |
| 27 | +4. Creates a GitHub issue with the release notes |
| 28 | +5. Tracks the version in `current-release.txt` to avoid duplicate processing |
| 29 | + |
| 30 | +## Deployment |
| 31 | + |
| 32 | +The processed Element Web files are available in the `processed/` directory. Deploy them to your Apache web server as you would normally deploy Element Web. |
| 33 | + |
| 34 | +### Apache Configuration Example |
| 35 | + |
| 36 | +```apache |
| 37 | +<VirtualHost *:443> |
| 38 | + ServerName element.example.com |
| 39 | + |
| 40 | + DocumentRoot /var/www/element-web |
| 41 | + |
| 42 | + <Directory /var/www/element-web> |
| 43 | + Options -Indexes +FollowSymLinks |
| 44 | + AllowOverride None |
| 45 | + Require all granted |
| 46 | + </Directory> |
| 47 | + |
| 48 | + # SSL configuration |
| 49 | + SSLEngine on |
| 50 | + SSLCertificateFile /path/to/cert.pem |
| 51 | + SSLCertificateKeyFile /path/to/key.pem |
| 52 | +</VirtualHost> |
| 53 | +``` |
| 54 | + |
| 55 | +## Manual Processing |
| 56 | + |
| 57 | +To manually process a specific Element Web release: |
| 58 | + |
| 59 | +```bash |
| 60 | +# Download and extract Element Web |
| 61 | +curl -L https://github.com/element-hq/element-web/releases/download/v1.12.0/element-v1.12.0.tar.gz -o element-web.tar.gz |
| 62 | +tar -xzf element-web.tar.gz |
| 63 | + |
| 64 | +# Run the rename script |
| 65 | +./scripts/rename.sh ./element-v1.12.0 ./processed |
| 66 | +``` |
| 67 | + |
| 68 | +## How It Works |
| 69 | + |
| 70 | +The `scripts/rename.sh` script: |
| 71 | +1. Copies the source files to the destination directory |
| 72 | +2. Finds all CSS files and updates icon path references: |
| 73 | + - `/icons/` → `/ui-icons/` |
| 74 | + - `../../icons/` → `../../ui-icons/` |
| 75 | +3. Updates `index.html` icon references |
| 76 | +4. Renames the physical `icons/` directory to `ui-icons/` |
| 77 | + |
| 78 | +## Repository Structure |
| 79 | + |
| 80 | +``` |
| 81 | +. |
| 82 | +├── .github/ |
| 83 | +│ └── workflows/ |
| 84 | +│ └── sync-element-web.yml # Automated sync workflow |
| 85 | +├── processed/ # Processed Element Web files |
| 86 | +├── scripts/ |
| 87 | +│ └── rename.sh # Icon path renaming script |
| 88 | +└── current-release.txt # Tracks the current version |
| 89 | +``` |
| 90 | + |
| 91 | +## License |
| 92 | + |
| 93 | +This repository contains automation scripts and workflows. The Element Web application itself is licensed under the Apache License 2.0. See the [Element Web repository](https://github.com/element-hq/element-web) for details. |
0 commit comments