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

View file

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

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=/docs/getting-started"> <meta http-equiv="refresh" content="0; url=getting-started/index.html">
<title>stancl/tenancy</title> <title>stancl/tenancy</title>
</head> </head>
</html> </html>

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=/docs/getting-started"> <meta http-equiv="refresh" content="0; url=getting-started/index.html">
<title>stancl/tenancy</title> <title>stancl/tenancy</title>
</head> </head>
</html> </html>

View file

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

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=docs"> <meta http-equiv="refresh" content="0; url={{ $page->baseUrl . $page->defaultVersion }}/index.html">
<title>stancl/tenancy</title> <title>stancl/tenancy</title>
</head> </head>
</html> </html>