You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by li...@apache.org on 2020/11/02 02:48:16 UTC

[dubbo-website] branch asf-site updated: try mannually add 404

This is an automated email from the ASF dual-hosted git repository.

liujun pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/dubbo-website.git


The following commit(s) were added to refs/heads/asf-site by this push:
     new 2cf9b32  try mannually add 404
2cf9b32 is described below

commit 2cf9b32cf29ed9867ad3778ca037a998435b776e
Author: ken.lj <ke...@gmail.com>
AuthorDate: Mon Nov 2 10:39:17 2020 +0800

    try mannually add 404
---
 404.html | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)

diff --git a/404.html b/404.html
new file mode 100644
index 0000000..02a8bd0
--- /dev/null
+++ b/404.html
@@ -0,0 +1,56 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+</head>
+<body>
+<!-- 添加Apache校验项开始 -->
+<!-- 只加a标签和img标签,不要有其余的标签出现,同时设置style="display: none" -->
+<a style="display: none" href="http://www.apache.org/events/current-event">Apache Dubbo is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the comple [...]
+<img style="display: none" src="http://dubbo.apache.org/img/apache_logo.png"/>
+<ul style="display: none">
+    <p class="header">ASF</p>
+    <li><a href="http://www.apache.org">Foundation</a></li>
+    <li><a href="http://www.apache.org/licenses/">License</a></li>
+    <li><a href="http://www.apache.org/events/current-event">Events</a></li>
+    <li><a href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li>
+    <li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
+</ul>
+<p style="display: none">Copyright © 2018 The Apache Software Foundation. Apache and the Apache feather logo are trademarks of The Apache Software Foundation.</p>
+<a style="display: none" href="http://www.apache.org/security/">Security</a>
+<!-- 添加Apache校验项结束 -->
+<script src="//cdn.jsdelivr.net/npm/js-cookie@2/src/js.cookie.min.js"></script>
+<script>
+    var originalHref = window.location.href;
+    if (originalHref.indexOf("docs/user/") > -1) {
+        window.location.href = newHref("docs/user/", "docs/2.7/user/");
+    } else if (originalHref.indexOf("docs/dev/") > -1) {
+        window.location.href = newHref("docs/dev/", "docs/2.7/dev/");
+    } else if (originalHref.indexOf("docs/admin/") > -1) {
+        window.location.href = newHref("docs/admin/", "docs/2.7/admin/");
+    } else if (originalHref.indexOf("docs/source_code_guide/") > -1) {
+        window.location.href = newHref("docs/source_code_guide/", "docs/2.7/source_code_guide/");
+    } else if (originalHref.indexOf("docs/developers/") > -1) {
+        window.location.href = newHref("docs/developers/", "developers/");
+    } else if (originalHref.indexOf("blog/index.html") >-1) {
+        window.location.href = newHref("blog/index.html", "blog/dubbo-101/");
+    } else {
+        // window.location.href = "http://dubbo.apache.org/en-us/";
+    }
+
+    function newHref(path, newPath) {
+        var idx = originalHref.indexOf(path);
+        var part1 = originalHref.substring(0, idx);
+        var part2 = "";
+        if (idx + path.length < originalHref.length -1) {
+            part2 = originalHref.substring(idx + path.length);
+        }
+        var newHref = part1 + newPath + part2;
+        if (newHref.endsWith('.html')) {
+            newHref = newHref.substr(0, newHref.length - 5) + "/";
+        }
+        return newHref;
+    }
+</script>
+</body>
+</html>
\ No newline at end of file