Skip to content

Commit

Permalink
Trying to make links work on github pages [docs]
Browse files Browse the repository at this point in the history
  • Loading branch information
bboonstra committed Oct 21, 2024
1 parent dde8a48 commit b6e5a88
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ <h2>Who Can Benefit from Effortless?</h2>
<h2>Getting Started</h2>
<p>Getting started with Effortless is simple. While it's primarily a Python library, its concepts can be understood by anyone interested in data management. For those ready to dive in, Effortless can be installed and set up in just a few minutes.</p>
<div class="button-container">
<a href="Effortless/docs/quickstart.html" class="tab-button tab-button-forward">Quickstart</a>
<a href="docs/quickstart.html" class="tab-button tab-button-forward">Quickstart</a>
</div>
</div>
<div class="section" id="section6">
Expand Down
25 changes: 13 additions & 12 deletions docs/templating.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ document.addEventListener("DOMContentLoaded", function () {
<button id="sidebarToggle">☰</button>
<ul>
<li><a href="Effortless/">Home</a></li>
<li><a href="Effortless/docs/">Docs</a></li>
<li><a href="/docs/">Docs</a></li>
<li><a href="https://pypi.org/project/Effortless/">PyPI</a></li>
<li><a href="https://github.com/bboonstra/Effortless">GitHub</a></li>
</ul>
Expand All @@ -64,15 +64,15 @@ document.addEventListener("DOMContentLoaded", function () {
<li>
<span class="dropdown-toggle">Getting Started</span>
<ul class="dropdown">
<li><a href="Effortless/docs/quickstart.html">Quickstart</a></li>
<li><a href="/docs/quickstart.html">Quickstart</a></li>
</ul>
</li>
<li>
<span class="dropdown-toggle">Usage</span>
<ul class="dropdown">
<li><a href="Effortless/docs/effortless-usage.html">Effortless</a></li>
<li><a href="Effortless/docs/basic-usage.html" target="_blank">Basic</a></li>
<li><a href="Effortless/docs/advanced-usage.html" target="_blank">Advanced</a></li>
<li><a href="/docs/effortless-usage.html">Effortless</a></li>
<li><a href="/docs/basic-usage.html">Basic</a></li>
<li><a href="/docs/advanced-usage.html">Advanced</a></li>
</ul>
</li>
</ul>
Expand Down Expand Up @@ -165,16 +165,17 @@ document.addEventListener("DOMContentLoaded", function () {
}, 100);
});

const isLocalhost =
window.location.hostname === "localhost" ||
window.location.hostname === "127.0.0.1";

function adjustLinks() {
if (!isLocalhost) return;

var links = document.querySelectorAll("a");
const isLocalhost =
window.location.hostname === "localhost" ||
window.location.hostname === "127.0.0.1";
links.forEach((link) => {
var href = link.getAttribute("href");
if (isLocalhost) {
href = href.replace("Effortless", "");
link.setAttribute("href", href);
}
href = href.replace("Effortless", "");
link.setAttribute("href", href);
});
}

0 comments on commit b6e5a88

Please sign in to comment.