Skip to content

Commit 84ee7cc

Browse files
committed
fixes to static rendering
1 parent cb4d5d0 commit 84ee7cc

35 files changed

Lines changed: 58 additions & 140 deletions

‎index.html‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,21 @@
66
<title>Computational Biology at Berkeley</title>
77
<meta name="description" content="A student-driven community exploring the intersection of computer science, biology, and healthcare at UC Berkeley." />
88
<meta name="author" content="Computational Biology at Berkeley" />
9+
10+
<!-- GitHub Pages SPA redirect handler -->
11+
<script>
12+
// Redirect from 404.html with the path encoded in the query
13+
(function(l) {
14+
if (l.search[1] === '/' ) {
15+
var decoded = l.search.slice(1).split('&').map(function(s) {
16+
return s.replace(/~and~/g, '&')
17+
}).join('?');
18+
window.history.replaceState(null, null,
19+
l.pathname.slice(0, -1) + decoded + l.hash
20+
);
21+
}
22+
}(window.location))
23+
</script>
924

1025
<meta property="og:title" content="Computational Biology at Berkeley" />
1126
<meta property="og:description" content="A student-driven community exploring the intersection of computer science, biology, and healthcare at UC Berkeley." />

‎public/404.html‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<title>Computational Biology at Berkeley</title>
6+
<script>
7+
// GitHub Pages SPA redirect hack
8+
// This script takes the current URL and converts the path and query
9+
// string into a hash that the client-side router can read
10+
11+
const pathSegmentsToKeep = 0;
12+
const location = window.location;
13+
14+
location.replace(
15+
location.protocol + '//' + location.host + location.pathname.split('/').slice(0, 1 + pathSegmentsToKeep).join('/') + '/?/' +
16+
location.pathname.slice(1).split('/').slice(pathSegmentsToKeep).join('/').replace(/&/g, '~and~') +
17+
(location.search ? '&' + location.search.slice(1).replace(/&/g, '~and~') : '') +
18+
location.hash
19+
);
20+
</script>
21+
</head>
22+
<body>
23+
</body>
24+
</html>

‎public/fetched/officers/.notion-hash‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

‎public/fetched/officers/fa25/.sheet-hash‎

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)