From ec8bb675b4d85c53f3e8f258ea0c1a975caa4af6 Mon Sep 17 00:00:00 2001 From: Vojta Jina Date: Wed, 12 Oct 2011 18:26:18 -0700 Subject: fix(docs): set proper base href when hashbang url requested --- docs/src/templates/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/src') diff --git a/docs/src/templates/index.html b/docs/src/templates/index.html index 87c27ac0..083fe2ab 100644 --- a/docs/src/templates/index.html +++ b/docs/src/templates/index.html @@ -12,8 +12,8 @@ // we can't add css/js the usual way, because some browsers (FF) eagerly prefetch resources // before the base attribute is added, causing 404 and terribly slow loading of the docs app. (function() { - var indexFile = (location.pathname.match(/\/(index[^\.]*\.html)/) || ['', 'index.html'])[1], - rUrl = /(api|guide|misc|tutorial|cookbook|index[^\.]*\.html).*$/, + var indexFile = (location.pathname.match(/\/(index[^\.]*\.html)/) || ['', ''])[1], + rUrl = /(#!\/|api|guide|misc|tutorial|cookbook|index[^\.]*\.html).*$/, baseUrl = location.href.replace(rUrl, indexFile), jQuery = /index-jq[^\.]*\.html$/.test(baseUrl), debug = /index[^\.]*-debug\.html$/.test(baseUrl), -- cgit v1.2.3