mirror of
https://github.com/stancl/tenancy-docs.git
synced 2025-12-12 02:04:03 +00:00
add landing page
This commit is contained in:
parent
38593e61a2
commit
ad38cd3982
113 changed files with 55463 additions and 13952 deletions
46
docs/config.php
Normal file
46
docs/config.php
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'baseUrl' => '',
|
||||
'production' => false,
|
||||
'siteName' => 'stancl/tenancy documentation',
|
||||
'siteDescription' => 'A Laravel multi-database tenancy package that respects your code.',
|
||||
|
||||
// key => display name
|
||||
'versions' => [
|
||||
'1.x' => '1.x',
|
||||
'2.x' => '2.x (beta)',
|
||||
],
|
||||
'defaultVersion' => '1.x',
|
||||
'prettyUrls' => true,
|
||||
|
||||
'version' => function ($page) {
|
||||
return explode('/', $page->getPath())[1];
|
||||
},
|
||||
|
||||
'link' => function ($page, $path) {
|
||||
return $page->baseUrl . '/' . $page->version() . '/' . $path . ($page->prettyUrls ? '' : '.html');
|
||||
},
|
||||
|
||||
// Algolia DocSearch credentials
|
||||
'docsearchApiKey' => '',
|
||||
'docsearchIndexName' => '',
|
||||
|
||||
// navigation menu
|
||||
'navigation' => require_once('navigation.php'),
|
||||
|
||||
// helpers
|
||||
'isActive' => function ($page, $path) {
|
||||
return ends_with(trimPath($page->getPath()), trimPath($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 starts_with($path, 'http') ? $path : '/'.trimPath($path);
|
||||
},
|
||||
];
|
||||
Loading…
Add table
Add a link
Reference in a new issue