This commit is contained in:
Samuel Štancl 2019-09-18 08:53:39 +02:00
parent 773d66956f
commit bb4f140cca
6 changed files with 33 additions and 32 deletions

View file

@ -7,13 +7,14 @@ return [
'siteDescription' => 'A Laravel multi-database tenancy package that respects your code.',
'defaultVersion' => '2.x',
'prettyUrls' => true,
'version' => function ($page) {
return explode('/', $page->getPath())[1];
},
'link' => function ($page, $path) {
return $page->baseUrl . '/' . $page->version() . '/' . $path;
return $page->baseUrl . '/' . $page->version() . '/' . $path . ($page->prettyUrls ? '' : '.html');
},
// Algolia DocSearch credentials

View file

@ -2,51 +2,51 @@
return [
'Getting Started' => [
'url' => 'docs/getting-started',
'url' => 'getting-started',
'children' => [
'Installation' => 'docs/installation',
'Storage Drivers' => 'docs/storage-drivers',
'This Package vs Others' => 'docs/difference-between-this-package-and-others',
'Configuration' => 'docs/configuration',
'Installation' => 'installation',
'Storage Drivers' => 'storage-drivers',
'This Package vs Others' => 'difference-between-this-package-and-others',
'Configuration' => 'configuration',
],
],
'Usage' => [
'url' => 'docs/usage',
'url' => 'usage',
'children' => [
'Creating Tenants' => 'docs/creating-tenants',
'Tenant Routes' => 'docs/tenant-routes',
'Tenant Storage' => 'docs/tenant-storage',
'Tenant Manager' => 'docs/tenant-manager',
'Console Commands' => 'docs/console-commands',
'Creating Tenants' => 'creating-tenants',
'Tenant Routes' => 'tenant-routes',
'Tenant Storage' => 'tenant-storage',
'Tenant Manager' => 'tenant-manager',
'Console Commands' => 'console-commands',
],
],
'Digging Deeper' => [
'url' => 'docs/digging-deeper',
'url' => 'digging-deeper',
'children' => [
'Middleware Configuration' => 'docs/middleware-configuration',
'Custom Database Names' => 'docs/custom-database-names',
'Filesystem Tenancy' => 'docs/filesystem-tenancy',
'Jobs & Queues' => 'docs/jobs-queues',
'Event System' => 'docs/event-system',
'Tenancy Initialization' => 'docs/tenancy-initialization',
'Application Testing' => 'docs/application-testing',
'Writing Storage Drivers' => 'docs/writing-storage-drivers',
'Development' => 'docs/development',
'Middleware Configuration' => 'middleware-configuration',
'Custom Database Names' => 'custom-database-names',
'Filesystem Tenancy' => 'filesystem-tenancy',
'Jobs & Queues' => 'jobs-queues',
'Event System' => 'event-system',
'Tenancy Initialization' => 'tenancy-initialization',
'Application Testing' => 'application-testing',
'Writing Storage Drivers' => 'writing-storage-drivers',
'Development' => 'development',
],
],
'Integrations' => [
'url' => 'docs/integrations',
'url' => 'integrations',
'children' => [
'Telescope' => 'docs/telescope',
'Horizon' => 'docs/horizon',
'Telescope' => 'telescope',
'Horizon' => 'horizon',
],
],
'Tips' => [
'children' => [
'HTTPS Certificates' => 'docs/https-certificates',
'Misc' => 'docs/misc-tips',
'HTTPS Certificates' => 'https-certificates',
'Misc' => 'misc-tips',
],
],
'Stay Updated' => 'docs/stay-updated',
'Stay Updated' => 'stay-updated',
'GitHub' => 'https://github.com/stancl/tenancy',
];

View file

@ -2,7 +2,7 @@
<html lang="en-US">
<head>
<meta charset="UTF-8">
<meta http-equiv="refresh" content="0; url=/docs/getting-started">
<meta http-equiv="refresh" content="0; url=getting-started/index.html">
<title>stancl/tenancy</title>
</head>
</html>

View file

@ -2,7 +2,7 @@
<html lang="en-US">
<head>
<meta charset="UTF-8">
<meta http-equiv="refresh" content="0; url=/docs/getting-started">
<meta http-equiv="refresh" content="0; url=getting-started/index.html">
<title>stancl/tenancy</title>
</head>
</html>

View file

@ -1,7 +1,7 @@
<li class="list-reset pl-4">
@if ($url = is_string($item) ? $item : $item->url)
{{-- Menu item with URL--}}
<a href="{{ $page->url($url) }}"
<a href="{{ $page->link($url) }}"
class="{{ 'lvl' . $level }} {{ $page->isActiveParent($item) ? 'lvl' . $level . '-active' : '' }} {{ $page->isActive($url) ? 'active font-semibold text-blue' : '' }} nav-menu__item hover:text-blue"
>
{{ $label }}

View file

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