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) { '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 // Algolia DocSearch credentials

View file

@ -1,7 +1,7 @@
<?php <?php
return [ 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, 'production' => true,
'docsearchApiKey' => '53c5eaf88e819535d98f4a179c1802e1', 'docsearchApiKey' => '53c5eaf88e819535d98f4a179c1802e1',

View file

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

View file

@ -2,7 +2,7 @@
<html lang="en-US"> <html lang="en-US">
<head> <head>
<meta charset="UTF-8"> <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> <title>stancl/tenancy</title>
</head> </head>
</html> </html>