Skip to content

Commit

Permalink
Documentation updates (CONTIBUTING.md link, redirector, and local b…
Browse files Browse the repository at this point in the history
…uild guidance) (#133)

* update contributing link

* add docs on building locally

* update redirector

* linting
  • Loading branch information
d33bs authored Nov 12, 2024
1 parent 9457215 commit d7ef324
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Contributing

Please see our [contributing](https://WayScience.github.io/coSMicQC/main/contributing) documentation for more details on contributions, development, and testing.
Please see our [contributing](https://github.com/WayScience/coSMicQC/blob/main/docs/src/contributing.md) documentation for more details on contributions, development, and testing.
24 changes: 22 additions & 2 deletions docs/redirector.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,30 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="refresh" content="0; url=https://wayscience.github.io/coSMicQC/main">
<title>Redirecting...</title>
<script>
// Define the primary and fallback URLs
const primaryUrl = "https://wayscience.github.io/coSMicQC/main";
const fallbackUrl = "https://wayscience.github.io/coSMicQC/v0.1.1";

// Attempt to load the primary URL
fetch(primaryUrl, { method: 'HEAD' })
.then(response => {
if (response.ok) {
// Redirect to the primary URL if it exists
window.location.href = primaryUrl;
} else {
// Redirect to the fallback URL if the primary URL is unavailable
window.location.href = fallbackUrl;
}
})
.catch(() => {
// Redirect to the fallback URL if there's a network error or other issue
window.location.href = fallbackUrl;
});
</script>
</head>
<body>
<p>If you are not redirected automatically, follow this <a href="https://wayscience.github.io/coSMicQC/main">link to the main page</a>.</p>
<p>Redirecting... If you are not redirected automatically, try <a href="https://wayscience.github.io/coSMicQC/main">the main page</a> or the <a href="https://wayscience.github.io/coSMicQC/v0.1.1/index.html">backup page</a>.</p>
</body>
</html>
3 changes: 3 additions & 0 deletions docs/src/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,6 @@ poetry run sphinx-build docs/src docs/build
# (used in production)
poetry run sphinx-multiversion docs/src docs/build
```

After the docs build, navigate the `docs/build` folder and open the HTML files with your browser.
Opening the `index.html` file which may be found in the base of `docs/build` or `docs/build/<version>` will simulate the docsite experience through GitHub Pages.

0 comments on commit d7ef324

Please sign in to comment.