瀏覽代碼

Add suffix to docs titles

DarthSim 3 年之前
父節點
當前提交
6af01afb44
共有 1 個文件被更改,包括 7 次插入0 次删除
  1. 7 0
      docs/index.html

+ 7 - 0
docs/index.html

@@ -50,6 +50,8 @@
       document.getElementsByTagName("head")[0].appendChild(clink)
       document.getElementsByTagName("head")[0].appendChild(clink)
     }
     }
 
 
+    var documentTitleBase = document.title;
+
     window.$docsify = {
     window.$docsify = {
       logo: '/assets/logo.svg',
       logo: '/assets/logo.svg',
       name: 'imgproxy',
       name: 'imgproxy',
@@ -72,6 +74,11 @@
               clink.href = "https://docs.imgproxy.net" + vm.route.path
               clink.href = "https://docs.imgproxy.net" + vm.route.path
             }
             }
           });
           });
+        },
+        function (hook, vm) {
+          hook.doneEach((content) => {
+            document.title += " | " + documentTitleBase;
+          });
         }
         }
       ]
       ]
     }
     }