ramon / avocado
A modern, feature-rich Flarum theme with advanced search, real-time messaging, and comprehensive multi-language support. Built on the Avocado foundation with significant enhancements.
Package info
Language:Less
Type:flarum-extension
pkg:composer/ramon/avocado
Fund package maintenance!
Requires
- flarum/core: ^2.0.0
Requires (Dev)
- flarum/tags: ^2.0.0
- v2.0.23
- v2.0.22
- v2.0.21
- v2.0.20
- v2.0.19
- 2.0.18
- 2.0.17
- 2.0.16
- 2.0.15
- 2.0.14
- 2.0.13
- 2.0.12
- 2.0.11
- 2.0.10
- 2.0.9
- 2.0.8
- 2.0.7
- 2.0.5
- 2.0.4
- 2.0.3
- 2.0.2
- 2.0.1
- dev-master / 0.1.x-dev
- dev-BC
- dev-correcao
- dev-dependencias
- dev-documentacao
- dev-manutencao
- dev-melhoria
- dev-performance
- dev-refatoracao
- dev-traducao
- dev-dependabot/github_actions/actions/checkout-6.0.2
- dev-dependabot/github_actions/actions/attest-build-provenance-4.1.0
- dev-dependabot/github_actions/actions/dependency-review-action-5.0.0
- dev-dependabot/github_actions/actions/upload-artifact-7.0.1
- dev-dependabot/github_actions/actions/setup-node-6.4.0
This package is auto-updated.
Last update: 2026-05-16 01:14:57 UTC
README
Avocado
A modern, feature-rich Flarum theme featuring advanced search capabilities, real-time messaging integration, comprehensive multi-language support, hero banners, tag colors, social sharing, and more. Originally forked from Asirem by Afrux, now significantly enhanced with new features and improvements.
Features
- Hero Banner — Upload and position a custom banner image at the top of your forum (auto-scaled to 1400px, converted to WebP)
- Tag Colors — Discussion list items styled with tag colors and unread indicators
- Share Button — Native Web Share API on mobile; clipboard fallback on desktop
- Action Icons — Optional Font Awesome icons on Like and Reply buttons
- Tags Page — Custom tile and cloud view for the tags page
- V1 Search Bar — Toggle between the classic dropdown search and the default modal
Requirements
- Flarum
^2.0.0
Installation
composer require ramon/avocado
Updating
composer update ramon/avocado --with-dependencies php flarum cache:clear
Configuration
All settings are available in the admin panel under the Avocado extension:
| Setting | Description | Default |
|---|---|---|
| Hero Image | Upload a banner image for the forum header | — |
| Hero Image Position | CSS background-position value |
center top |
| V1 Search Bar | Use classic dropdown search instead of modal | true |
| Show Share Button | Display share button on posts | true |
| Show Action Icons | Show icons on Like and Reply buttons | true |
| Fixed Avatar Effect | Keep comment avatars sticky while reading posts on desktop | true |
API Endpoints
| Method | Endpoint | Description |
|---|---|---|
POST |
/api/avocado/banner |
Upload hero banner image |
DELETE |
/api/avocado/banner |
Remove hero banner image |
Performance — recomendações para o operador do host
O Avocado já entrega vários ganhos do lado do tema (lazy-load por rota com
webpackPrefetch, CSS crítico inline, async-CSS, Vary + nosniff via
middleware). Esses ganhos só rendem 100% quando o operador do forum
configura o servidor HTTP corretamente. O Lighthouse típico reporta
~1 MB de "Sem compressão de texto" quando estes ajustes faltam.
nginx
Cole dentro do server { … } que serve seu forum (/etc/nginx/sites-available/forum.conf):
# 1. Compressão de texto — ganho típico ~1 MB no transfer size. gzip on; gzip_vary on; gzip_comp_level 6; gzip_min_length 1024; gzip_types application/javascript application/json application/xml text/css text/plain text/xml image/svg+xml font/ttf font/otf application/manifest+json; # brotli (se o módulo nginx-brotli estiver compilado — recomendado em 2026): # brotli on; # brotli_comp_level 5; # brotli_types # application/javascript application/json application/xml # text/css text/plain text/xml image/svg+xml font/ttf font/otf # application/manifest+json; # 2. Cache longo para assets versionados — o webpack injeta hash no nome # (forum-<hash>.js), então max-age=1 ano + immutable é seguro. location ~* ^/assets/(.+)-[0-9a-f]{8,}\.(?:js|css|svg|woff2?|ttf|otf|png|jpg|jpeg|webp|avif)$ { expires 1y; add_header Cache-Control "public, immutable, max-age=31536000"; access_log off; } # 3. Cache moderado para o resto da pasta /assets/ (favicon, manifests). location /assets/ { expires 7d; add_header Cache-Control "public, max-age=604800"; } # 4. HTTP/2 — já ativo se você usa Let's Encrypt + certbot recente. # listen 443 ssl http2;
Reload:
sudo nginx -t && sudo systemctl reload nginx
Apache (.htaccess na raiz do forum)
# 1. Compressão gzip via mod_deflate <IfModule mod_deflate.c> AddOutputFilterByType DEFLATE application/javascript application/json application/xml AddOutputFilterByType DEFLATE text/css text/plain text/xml image/svg+xml AddOutputFilterByType DEFLATE font/ttf font/otf application/manifest+json </IfModule> # 2. brotli (se mod_brotli disponível) <IfModule mod_brotli.c> AddOutputFilterByType BROTLI_COMPRESS application/javascript application/json AddOutputFilterByType BROTLI_COMPRESS text/css text/plain image/svg+xml </IfModule> # 3. Cache longo para assets versionados <IfModule mod_headers.c> <FilesMatch "-[0-9a-f]{8,}\.(?:js|css|svg|woff2?|ttf|otf|png|jpg|jpeg|webp|avif)$"> Header set Cache-Control "public, immutable, max-age=31536000" </FilesMatch> </IfModule> <IfModule mod_expires.c> ExpiresActive On ExpiresByType application/javascript "access plus 1 year" ExpiresByType text/css "access plus 1 year" ExpiresByType image/svg+xml "access plus 30 days" ExpiresByType image/webp "access plus 30 days" ExpiresByType font/woff2 "access plus 1 year" </IfModule>
Verificando que funcionou
# Compressão ativa? curl -sI -H "Accept-Encoding: gzip, br" https://seu-forum.example/assets/forum.js \ | grep -iE "content-encoding|content-length" # Esperado: content-encoding: br (ou gzip) # Cache headers nos assets? curl -sI https://seu-forum.example/assets/forum-abc12345.js \ | grep -iE "cache-control|expires" # Esperado: cache-control: public, immutable, max-age=31536000
Outras dicas (host)
- opcache do PHP em produção:
opcache.enable=1,opcache.validate_timestamps=0(revalida a cada deploy viaphp flarum cache:clear). - HTTP/2 na origin (já é default em nginx 1.25+ com SSL).
- CDN para
/assets/se o forum atende internacional — qualquer CDN respeita os headersCache-Control: immutableacima e descarrega o origin server.
Links
Authors
- Ramon Guilherme
- Sami Mazouz — original Asirem theme