From caf2aaf4f9d38ad441a5562c3b8720f8779d6f78 Mon Sep 17 00:00:00 2001 From: Kim <1877318+kimsible@users.noreply.github.com> Date: Fri, 10 Jul 2020 10:20:11 +0200 Subject: Add ability to override client assets : logo - favicon - PWA icons - PWA manifest name and description (#2897) * Add client-overrides storage to config * Add static-serve for client overrides * Move backgroun-image logo from bundle to css tag for runtime content hash * Add dynamic JSON manifest * Add content hash for manifest, favicon and logo Co-authored-by: kimsible --- config/default.yaml | 5 +++++ config/production.yaml.example | 5 +++++ config/test-1.yaml | 1 + config/test-2.yaml | 1 + config/test-3.yaml | 1 + config/test-4.yaml | 1 + config/test-5.yaml | 1 + config/test-6.yaml | 1 + 8 files changed, 16 insertions(+) (limited to 'config') diff --git a/config/default.yaml b/config/default.yaml index a3df1bd45..d6f7f7afe 100644 --- a/config/default.yaml +++ b/config/default.yaml @@ -85,6 +85,11 @@ storage: captions: 'storage/captions/' cache: 'storage/cache/' plugins: 'storage/plugins/' + # Overridable client files : logo.svg, favicon.png and icons/*.png (PWA) in client/dist/assets/images + # Could contain for example assets/images/favicon.png + # If the file exists, peertube will serve it + # If not, peertube will fallback to the default fil + client_overrides: 'storage/client-overrides/' log: level: 'info' # debug/info/warning/error diff --git a/config/production.yaml.example b/config/production.yaml.example index a494bdb03..f57861eca 100644 --- a/config/production.yaml.example +++ b/config/production.yaml.example @@ -86,6 +86,11 @@ storage: captions: '/var/www/peertube/storage/captions/' cache: '/var/www/peertube/storage/cache/' plugins: '/var/www/peertube/storage/plugins/' + # Overridable client files : logo.svg, favicon.png and icons/*.png (PWA) in client/dist/assets/images + # Could contain for example assets/images/favicon.png + # If the file exists, peertube will serve it + # If not, peertube will fallback to the default fil + client_overrides: '/var/www/peertube/storage/client-overrides/' log: level: 'info' # debug/info/warning/error diff --git a/config/test-1.yaml b/config/test-1.yaml index 7b25f5cf3..2ef9e6c7c 100644 --- a/config/test-1.yaml +++ b/config/test-1.yaml @@ -22,6 +22,7 @@ storage: captions: 'test1/captions/' cache: 'test1/cache/' plugins: 'test1/plugins/' + client_overrides: 'test1/client-overrides/' admin: email: 'admin1@example.com' diff --git a/config/test-2.yaml b/config/test-2.yaml index 82d4aa35f..b559769c3 100644 --- a/config/test-2.yaml +++ b/config/test-2.yaml @@ -22,6 +22,7 @@ storage: captions: 'test2/captions/' cache: 'test2/cache/' plugins: 'test2/plugins/' + client_overrides: 'test2/client-overrides/' admin: email: 'admin2@example.com' diff --git a/config/test-3.yaml b/config/test-3.yaml index d2734f469..9a7a944e9 100644 --- a/config/test-3.yaml +++ b/config/test-3.yaml @@ -22,6 +22,7 @@ storage: captions: 'test3/captions/' cache: 'test3/cache/' plugins: 'test3/plugins/' + client_overrides: 'test3/client-overrides/' admin: email: 'admin3@example.com' diff --git a/config/test-4.yaml b/config/test-4.yaml index 9ec45b024..1e4bee974 100644 --- a/config/test-4.yaml +++ b/config/test-4.yaml @@ -22,6 +22,7 @@ storage: captions: 'test4/captions/' cache: 'test4/cache/' plugins: 'test4/plugins/' + client_overrides: 'test4/client-overrides/' admin: email: 'admin4@example.com' diff --git a/config/test-5.yaml b/config/test-5.yaml index 92cc113b9..9725e84f4 100644 --- a/config/test-5.yaml +++ b/config/test-5.yaml @@ -22,6 +22,7 @@ storage: captions: 'test5/captions/' cache: 'test5/cache/' plugins: 'test5/plugins/' + client_overrides: 'test5/client-overrides/' admin: email: 'admin5@example.com' diff --git a/config/test-6.yaml b/config/test-6.yaml index 205d99797..a04c8a6a9 100644 --- a/config/test-6.yaml +++ b/config/test-6.yaml @@ -22,6 +22,7 @@ storage: captions: 'test6/captions/' cache: 'test6/cache/' plugins: 'test6/plugins/' + client_overrides: 'test6/client-overrides/' admin: email: 'admin6@example.com' -- cgit v1.2.3