]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
video-embed: inject custom CSS
authorkontrollanten <6680299+kontrollanten@users.noreply.github.com>
Tue, 8 Dec 2020 13:51:51 +0000 (14:51 +0100)
committerChocobozzz <chocobozzz@cpy.re>
Mon, 14 Dec 2020 14:25:51 +0000 (15:25 +0100)
closes #3420

client/src/standalone/videos/embed.html
client/webpack/webpack.video-embed.js
server/lib/client-html.ts

index 908aad940ba3d1fc604b2432bc2842d096fc0b4a..17029ec415ace607e2849044bec6ea634e9db980 100644 (file)
@@ -8,6 +8,7 @@
     <meta name="robots" content="noindex">
     <meta property="og:platform" content="PeerTube" />
 
+    <!-- custom css tag -->
     <link rel="icon" type="image/png" href="/client/assets/images/favicon.png" />
   </head>
 
index 70141527c18190efa8866e9c64e8ac86fb1571b2..d578443fe925174bfe7e7b4bd6e1c914d66f61e6 100644 (file)
@@ -122,7 +122,15 @@ module.exports = function () {
         title: 'PeerTube',
         chunksSortMode: 'auto',
         inject: 'body',
-        chunks: ['video-embed']
+        chunks: ['video-embed'],
+        minify: {
+          collapseWhitespace: true,
+          removeComments: false,
+          removeRedundantAttributes: true,
+          removeScriptTypeAttributes: true,
+          removeStyleLinkTypeAttributes: true,
+          useShortDoctype: true
+        }
       }),
 
       new HtmlWebpackPlugin({
index 43585c591f336f3f7513d2ec8f0691fd12d725a4..6a457a711c98dcdad02cd3f669cc9909542b5c01 100644 (file)
@@ -210,6 +210,7 @@ class ClientHtml {
 
     let html = buffer.toString()
     html = await ClientHtml.addAsyncPluginCSS(html)
+    html = ClientHtml.addCustomCSS(html)
 
     ClientHtml.htmlCache[path] = html