react-github-timeline
Version:
3D visualization of GitHub repository evolution over time using React Three Fiber
34 lines (30 loc) • 1.07 kB
HTML
<html lang="en">
<head>
<meta charset="utf-8">
<title>Repo Timeline Visualizer</title>
<script>
// SPA redirect for GitHub Pages
// This script takes the current URL and redirects to the root with the path as a query parameter
// The root index.html will then handle the routing
// For URL like /github-timeline/owner/repo
// We want to redirect to /github-timeline/?p=/owner/repo
const segments = window.location.pathname.split('/').filter(s => s);
// segments = ['github-timeline', 'owner', 'repo']
// We want to keep 'github-timeline' as base and encode 'owner/repo' as the path
const base = segments[0]; // 'github-timeline'
const pathSegments = segments.slice(1); // ['owner', 'repo']
const encodedPath = pathSegments.join('/'); // 'owner/repo'
const query = window.location.search;
window.location.replace(
window.location.origin +
'/' + base +
'/?p=/' + encodedPath +
query
);
</script>
</head>
<body>
<!-- GitHub Pages SPA redirect -->
</body>
</html>