Parent
5997820360
révision
a3ebedb7e3
BIN
daux.phar
Fichier exécutable → Fichier normal
BIN
daux.phar
Fichier exécutable → Fichier normal
Fichier binaire non affiché.
@ -8,4 +8,14 @@ If you want to create a beautiful landing page for your project, create a `_inde
|
||||
}
|
||||
```
|
||||
|
||||
> The image can be a local or remote image. By default, the path is relative to the root of the documentation
|
||||
> The image can be a local or remote image. By default, the path is relative to the root of the documentation.
|
||||
|
||||
To disable the automatic landing page, you can set `auto_landing` to false in the `html` section of your configuration
|
||||
|
||||
```json
|
||||
{
|
||||
"html": {
|
||||
"auto_landing": false
|
||||
}
|
||||
}
|
||||
```
|
||||
|
@ -29,6 +29,7 @@
|
||||
"toggle_code": false,
|
||||
"date_modified": false,
|
||||
"float": false,
|
||||
"auto_landing": true,
|
||||
|
||||
"repo": "",
|
||||
"twitter": [],
|
||||
|
@ -7,18 +7,26 @@ class ContentPage extends \Todaymade\Daux\Format\Base\ContentPage
|
||||
private $language;
|
||||
private $homepage;
|
||||
|
||||
private function isHomepage()
|
||||
{
|
||||
if (array_key_exists('auto_landing', $this->params['html']) && !$this->params['html']['auto_landing']) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($this->file->getParent()->getIndexPage() != $this->file) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($this->params['multilanguage']) {
|
||||
return ($this->file->getParent()->getParent() instanceof Root);
|
||||
}
|
||||
|
||||
return ($this->file->getParent() instanceof Root);
|
||||
}
|
||||
|
||||
private function initialize()
|
||||
{
|
||||
$this->homepage = false;
|
||||
if ($this->file->getParent()->getIndexPage() == $this->file) {
|
||||
if ($this->params['multilanguage']) {
|
||||
if ($this->file->getParent()->getParent() instanceof Root) {
|
||||
$this->homepage = true;
|
||||
}
|
||||
} elseif ($this->file->getParent() instanceof Root) {
|
||||
$this->homepage = true;
|
||||
}
|
||||
}
|
||||
$this->homepage = $this->isHomepage();
|
||||
|
||||
$this->language = '';
|
||||
if ($this->params['multilanguage'] && count($this->file->getParents())) {
|
||||
@ -41,7 +49,7 @@ class ContentPage extends \Todaymade\Daux\Format\Base\ContentPage
|
||||
if (!empty($parents)) {
|
||||
foreach ($parents as $node) {
|
||||
$page = $node->getIndexPage() ?: $node->getFirstPage();
|
||||
$breadcrumb_trail[$node->getTitle()] = $page? $page->getUrl() : '';
|
||||
$breadcrumb_trail[$node->getTitle()] = $page ? $page->getUrl() : '';
|
||||
}
|
||||
}
|
||||
return $breadcrumb_trail;
|
||||
|
Chargement…
Référencer dans un nouveau ticket
Block a user