Skip to content

Instantly share code, notes, and snippets.

@iAmBipinPaul
Last active July 13, 2018 02:40
Show Gist options
  • Save iAmBipinPaul/1e4336e8dd6238fd8f5ba4fee795da68 to your computer and use it in GitHub Desktop.
Save iAmBipinPaul/1e4336e8dd6238fd8f5ba4fee795da68 to your computer and use it in GitHub Desktop.
Hosting Balzor applicaion on Github
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Single Page Apps for GitHub Pages</title>
<script type="text/javascript">
var segmentCount = 0;
var l = window.location;
l.replace(
l.protocol + '//' + l.hostname + (l.port ? ':' + l.port : '') +
l.pathname.split('/').slice(0, 1 + segmentCount).join('/') + '/?p=/' +
l.pathname.slice(1).split('/').slice(segmentCount).join('/').replace(/&/g, '~and~') +
(l.search ? '&q=' + l.search.slice(1).replace(/&/g, '~and~') : '') +
l.hash
);
</script>
</head>
<body>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment