Finish working on versions

This commit is contained in:
Samuel Štancl 2019-09-18 15:39:50 +02:00
parent 2f392b106f
commit 9f5f98d776
4 changed files with 6 additions and 6 deletions

View file

@ -14,7 +14,7 @@ return [
},
'link' => function ($page, $path) {
return $page->baseUrl . $page->version() . '/' . $path . ($page->prettyUrls ? '' : '.html');
return $page->baseUrl . '/' . $page->version() . '/' . $path . ($page->prettyUrls ? '' : '.html');
},
// Algolia DocSearch credentials

View file

@ -1,7 +1,7 @@
<?php
return [
'baseUrl' => env('JIGSAW_BASE_URL') ?? 'https://tenancy.samuelstancl.me/docs/', // must end with /
'baseUrl' => env('JIGSAW_BASE_URL') ?? 'https://tenancy.samuelstancl.me/docs',
'production' => true,
'docsearchApiKey' => '53c5eaf88e819535d98f4a179c1802e1',

View file

@ -60,9 +60,9 @@
<select id="versionSelect">
@foreach($page->navigation as $version => $_)
<option
value="{{ $page->baseUrl . $version }}"
@if($page->version() === $version) {{-- todo, doesn't work --}}
'checked'
value="/{{ $page->baseUrl . $version }}"
@if($page->version() === $version)
selected
@endif
>
{{ $version }}

View file

@ -2,7 +2,7 @@
<html lang="en-US">
<head>
<meta charset="UTF-8">
<meta http-equiv="refresh" content="0; url={{ $page->baseUrl . $page->defaultVersion }}">
<meta http-equiv="refresh" content="0; url={{ $page->baseUrl . '/' . $page->defaultVersion }}">
<title>stancl/tenancy</title>
</head>
</html>