mirror of
https://github.com/stancl/tenancy-docs.git
synced 2025-12-12 02:04:03 +00:00
3.x redesign
This commit is contained in:
parent
857122540f
commit
f8f354c323
229 changed files with 201175 additions and 22440 deletions
54
config.php
Normal file
54
config.php
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
return [
|
||||
'baseUrl' => 'http://localhost:3000',
|
||||
'production' => false,
|
||||
'siteName' => 'Tenancy for Laravel',
|
||||
'siteDescription' => 'Automatically turn any Laravel application multi-tenant — no code changes needed. stancl/tenancy automatically switches database connections and all other things in the background, letting you leverage standard Laravel code into a full SaaS application. Most features out of all multi-tenancy packages. Single & multi-database tenancy.',
|
||||
|
||||
'githubUrl' => 'https://github.com/stancl/tenancy',
|
||||
|
||||
// key => display name
|
||||
'versions' => [
|
||||
'v1' => '1.x',
|
||||
'v2' => '2.x',
|
||||
'v3' => '3.x',
|
||||
],
|
||||
'defaultVersion' => 'v3',
|
||||
'prettyUrls' => true,
|
||||
|
||||
'version' => function ($page) {
|
||||
return explode('/', $page->getPath())[2];
|
||||
},
|
||||
|
||||
'link' => function ($page, $path) {
|
||||
return $page->baseUrl . '/docs/' . $page->version() . '/' . $path . ($page->prettyUrls ? '' : '.html');
|
||||
},
|
||||
|
||||
// Algolia DocSearch credentials
|
||||
'docsearchApiKey' => '53c5eaf88e819535d98f4a179c1802e1',
|
||||
'docsearchIndexName' => 'stancl-tenancy',
|
||||
|
||||
// navigation menu
|
||||
'navigation' => require_once('navigation.php'),
|
||||
|
||||
// helpers
|
||||
'isActive' => function ($page, $path) {
|
||||
return Str::endsWith(trimPath($page->getPath()), trimPath($page->version() . '/' . $path));
|
||||
},
|
||||
'isActiveParent' => function ($page, $menuItem) {
|
||||
if (is_object($menuItem) && $menuItem->children) {
|
||||
return $menuItem->children->contains(function ($child) use ($page) {
|
||||
return trimPath($page->getPath()) == trimPath($child);
|
||||
});
|
||||
}
|
||||
},
|
||||
'url' => function ($page, $path) {
|
||||
return (Str::startsWith($path, 'http://') || Str::startsWith($path, 'https://')) ? $path : '/'.trimPath($path);
|
||||
},
|
||||
'isUrl' => function ($page, $path) {
|
||||
return Str::startsWith($path, 'http://') || Str::startsWith($path, 'https://');
|
||||
},
|
||||
];
|
||||
Loading…
Add table
Add a link
Reference in a new issue