Skip to content

Commit

Permalink
Fix version - /5.0/ url were not working
Browse files Browse the repository at this point in the history
  • Loading branch information
lcharette committed Dec 11, 2023
1 parent dd986b7 commit 7bf25b9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion config/versions.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
branches:
'latest':
'':
path: ''
label: '5.0'
visible: true
Expand Down
4 changes: 2 additions & 2 deletions setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@

// If no sites is selected, default to latest
if (!$name || !is_dir(ROOT_DIR . "user/sites/{$name}")) {
$name = '5.0';
$name = '';
}

// Prefix all pages with the name of the subsite
$prefix = ($name === '5.0') ? '' : "/{$name}";
$prefix = ($name === '') ? '' : "/{$name}";
$container['pages']->base($prefix);

return [
Expand Down
2 changes: 1 addition & 1 deletion themes/sitetheme/templates/partials/github_link.html.twig
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<a class="github-link" href="{{ config.github.repo.tree ~ ('/'~page.filePathClean)|replace({'/user/sites/':'', '/user/pages/':'hotfix/pages/'}) }}" target="_blank">
<a class="github-link" href="{{ config.github.repo.tree ~ ('/'~page.filePathClean)|replace({'/user/sites/':'', '/user/pages/':'5.0/pages/'}) }}" target="_blank">
<i class="fa fa-github-square"></i> {{ 'THEME_LEARN2_GITHUB_EDIT_THIS_PAGE'|t }}
</a>

0 comments on commit 7bf25b9

Please sign in to comment.