Skip to content

Commit

Permalink
Append baseurl to necessary links
Browse files Browse the repository at this point in the history
  • Loading branch information
felixmulder committed Oct 6, 2016
1 parent 8c54c8f commit 5e90bca
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
30 changes: 15 additions & 15 deletions docs/_includes/toc.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,34 @@
{% include scala-logo.html %}
</div>
<ul id="categories">
<li><ul><li><a href="/blog">Blog</a></li></ul></li>
<li><ul><li><a href="/">Dotty Docs</a></li></ul></li>
<li><ul><li><a href="{{ site.baseurl }}/blog">Blog</a></li></ul></li>
<li><ul><li><a href="{{ site.baseurl }}/">Dotty Docs</a></li></ul></li>
<li>
Usage
<ul>
<li><a href="/usage/migrating.html">Migrating from Scala 2</a></li>
<li><a href="/usage/sbt-projects.html">Using Dotty with sbt</a></li>
<li><a href="{{ site.baseurl }}/usage/migrating.html">Migrating from Scala 2</a></li>
<li><a href="{{ site.baseurl }}/usage/sbt-projects.html">Using Dotty with sbt</a></li>
</ul>
</li>
<li>
Contributing
<ul>
<li><a href="/contributing/getting-started.html">Getting Started</a></li>
<li><a href="/contributing/workflow.html">Workflow</a></li>
<li><a href="/contributing/eclipse.html">Eclipse</a></li>
<li><a href="/contributing/intellij-idea.html">Intellij-IDEA</a></li>
<li><a href="{{ site.baseurl }}/contributing/getting-started.html">Getting Started</a></li>
<li><a href="{{ site.baseurl }}/contributing/workflow.html">Workflow</a></li>
<li><a href="{{ site.baseurl }}/contributing/eclipse.html">Eclipse</a></li>
<li><a href="{{ site.baseurl }}/contributing/intellij-idea.html">Intellij-IDEA</a></li>
</ul>
</li>
<li>
Internals
<ul>
<li><a href="/internals/backend.html">Backend</a></li>
<li><a href="/internals/contexts.html">Contexts</a></li>
<li><a href="/internals/higher-kinded-v2.html">Higher Kinded Type Scheme</a></li>
<li><a href="/internals/overall-structure.html">Project Structure</a></li>
<li><a href="/internals/periods.html">Periods</a></li>
<li><a href="/internals/type-system.html">Type System</a></li>
<li><a href="/internals/dotc-scalac.html">Dotty vs Scala2</a></li>
<li><a href="{{ site.baseurl }}/internals/backend.html">Backend</a></li>
<li><a href="{{ site.baseurl }}/internals/contexts.html">Contexts</a></li>
<li><a href="{{ site.baseurl }}/internals/higher-kinded-v2.html">Higher Kinded Type Scheme</a></li>
<li><a href="{{ site.baseurl }}/internals/overall-structure.html">Project Structure</a></li>
<li><a href="{{ site.baseurl }}/internals/periods.html">Periods</a></li>
<li><a href="{{ site.baseurl }}/internals/type-system.html">Type System</a></li>
<li><a href="{{ site.baseurl }}/internals/dotc-scalac.html">Dotty vs Scala2</a></li>
</ul>
</li>
</ul>
Expand Down
8 changes: 4 additions & 4 deletions docs/_layouts/default.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<html>
<head>
<title>Dotty - {{ page.title }}</title>
<link rel="shortcut icon" type="image/png" href="/images/favicon.png"/>
<link rel="shortcut icon" type="image/png" href="{{ site.baseurl}}/images/favicon.png"/>
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.7.0/styles/github.min.css">
<link rel="stylesheet" href="/css/main.css">
<link rel="stylesheet" href="{{ site.baseurl }}/css/main.css">
</head>
<body>
<div id="container">
Expand All @@ -18,13 +18,13 @@
</div>
</div>
</body>
<script src="/js/highlight.pack.js"></script>
<script src="{{ site.baseurl }}/js/highlight.pack.js"></script>
<script language="javascript">
hljs.initHighlightingOnLoad();
var x = document.links.length;
for (i = 0; i < x; i++) {
var thisHREF = document.links[i].href;
if (thisHREF.indexOf(window.location.hostname) > -1) thisHREF = thisHREF.replace(".md","/").replace("/index/","/");
if (thisHREF.indexOf(window.location.hostname) > -1) thisHREF = thisHREF.replace(".md",".html")
document.links[i].setAttribute('href', thisHREF);
}
</script>
Expand Down

0 comments on commit 5e90bca

Please sign in to comment.