mirror of
https://github.com/ascii-boxes/boxes.git
synced 2025-03-01 07:42:22 +01:00
Improved GitHub to Cutom Domain redirect
This commit is contained in:
parent
ab02a16bee
commit
f63ecdf254
@ -13,12 +13,20 @@
|
|||||||
<meta name="robots" content="index,follow" />
|
<meta name="robots" content="index,follow" />
|
||||||
{% if page.sedesc %}
|
{% if page.sedesc %}
|
||||||
<meta name="description" content="{{ page.sedesc }}" />
|
<meta name="description" content="{{ page.sedesc }}" />
|
||||||
<meta name="keywords" content="ascii, ascii art, filter, command line, box, boxes, box drawing" />
|
<meta name="keywords" content="software, ascii, ascii art, filter, command line, box, boxes, box drawing" />
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
if (window.location.hostname == "ascii-boxes.github.io") {
|
if (window.location.hostname == "ascii-boxes.github.io") {
|
||||||
|
var prjNamePrefix = "/{{ site.name }}";
|
||||||
|
var targetPath = window.location.pathname;
|
||||||
|
if (targetPath == prjNamePrefix) {
|
||||||
|
targetPath = "/";
|
||||||
|
}
|
||||||
|
else if (targetPath.indexOf(prjNamePrefix + "/") == 0) {
|
||||||
|
targetPath = targetPath.substring(prjNamePrefix.length);
|
||||||
|
}
|
||||||
window.location = window.location.protocol + "//boxes.thomasjensen.com"
|
window.location = window.location.protocol + "//boxes.thomasjensen.com"
|
||||||
+ window.location.pathname + window.location.hash;
|
+ targetPath + window.location.hash;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<script src="{{ site.baseurl }}/js/jquery.min.js"></script>
|
<script src="{{ site.baseurl }}/js/jquery.min.js"></script>
|
||||||
|
Loading…
Reference in New Issue
Block a user