Skip to content

Commit

Permalink
#451
Browse files Browse the repository at this point in the history
  • Loading branch information
btopro committed Oct 12, 2019
1 parent 4abcf37 commit 6babb87
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion system/boilerplate/site/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
// https://username.github.io/repo-name/one/two?a=b&c=d#qwe becomes
// https://username.github.io/repo-name/?p=/one/two&q=a=b~and~c=d#qwe
// Otherwise, leave segmentCount as 0.
var segmentCount = {{ segmentCount }};
var segmentCount = {{ ghPagesURLParamCount }};

var l = window.location;
l.replace(
Expand Down
2 changes: 1 addition & 1 deletion system/lib/HAXCMSSite.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ public function rebuildManagedFiles() {
'description' => $this->manifest->description,
'forceUpgrade' => $this->getForceUpgrade(),
'swhash' => array(),
'segmentCount' => 2,
'ghPagesURLParamCount' => 0,
'licenseLink' => $licenseLink,
'licenseName' => $licenseName,
'serviceWorkerScript' => $this->getServiceWorkerScript($this->basePath . $this->manifest->metadata->site->name . '/'),
Expand Down
4 changes: 2 additions & 2 deletions system/lib/Operations.php
Original file line number Diff line number Diff line change
Expand Up @@ -1417,7 +1417,7 @@ public function publishSite() {
'description' => $site->manifest->description,
'forceUpgrade' => $site->getForceUpgrade(),
'swhash' => array(),
'segmentCount' => 1,
'ghPagesURLParamCount' => 1,
'licenseLink' => $licenseLink,
'licenseName' => $licenseName,
'serviceWorkerScript' => $site->getServiceWorkerScript('/' . $site->manifest->metadata->site->name . '/', TRUE),
Expand Down Expand Up @@ -1456,7 +1456,7 @@ public function publishSite() {
$templateVars['basePath'] = $parts['base'];
}
if ($templateVars['basePath'] == '/') {
$templateVars['segmentCount'] = 0;
$templateVars['ghPagesURLParamCount'] = 0;
}
// now we need to update the SW to match
$templateVars['serviceWorkerScript'] = $site->getServiceWorkerScript($templateVars['basePath'], TRUE);
Expand Down

0 comments on commit 6babb87

Please sign in to comment.