Skip to content

fix(core): Fixed the GH Pages hack to redirect to the 'right' root #93

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion styleguide/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
<head>
<meta charset="utf-8">
<title>Acpaas UI | Angular Modules</title>
<link rel="icon" type="image/x-icon" href="favicon.ico">
<script>
// Store the URL the user was trying to access when receiving the 404.
sessionStorage.redirect = location.href;
</script>

<!-- Immediately redirect to the base URL so we can use the SPA routing. -->
<meta http-equiv="refresh" content="0;URL='/'"></meta>
<meta http-equiv="refresh" content="0;URL='/acpaas-ui_angular'"></meta>
</head>
<body>
<!-- IE required at least 512 bytes of data to show non-default 404. -->
Expand Down
2 changes: 1 addition & 1 deletion styleguide/app/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { NotFoundPageComponent } from './pages/not-found/not-found.page';

export const ROUTES: Routes = [
{
path: '', redirectTo: '/modules/avatar', pathMatch: 'full',
path: '', redirectTo: '/modules/analytics', pathMatch: 'full',
},
{
path: 'not-found', component: NotFoundPageComponent,
Expand Down
1 change: 1 addition & 0 deletions styleguide/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

<guide-root></guide-root>

<!-- In order to make the GitHub Pages hack work (see above), make sure it loads before all other scripts -->
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.10.0/highlight.min.js"></script>
<script src="https://cdn.ckeditor.com/4.6.2/standard/ckeditor.js"></script>
</body>
Expand Down