-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
doctum.php
50 lines (44 loc) · 1.45 KB
/
doctum.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php
declare(strict_types=1);
/**
* Copyright (c) 2021-2024 guanguans<[email protected]>
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*
* @see https://github.com/guanguans/package-skeleton
*/
use Doctum\Doctum;
use Doctum\Version\GitVersionCollection;
use Symfony\Component\Finder\Finder;
$iterator = Finder::create()
->files()
->name('*.php')
->exclude('tests')
->in($dir = __DIR__.'/src');
$versions = GitVersionCollection::create($dir)
// ->addFromTags('v1.*')
// ->add('1.x', '1.x branch')
->add('main', 'main branch');
return new Doctum(
$iterator,
[
'theme' => 'default',
'versions' => $versions,
'title' => 'API',
// 'favicon' => 'https://www.guanguans.cn/coole/static/favicon.png',
// 'build_dir' => __DIR__.'/docs/api/%version%',
// 'cache_dir' => __DIR__.'/build/doctum/api/%version%',
'build_dir' => __DIR__.'/docs/api/',
'cache_dir' => __DIR__.'/build/doctum/api/',
'default_opened_level' => 2,
'footer_link' => [
'href' => 'https://github.com/guanguans/package-skeleton',
'rel' => 'noreferrer noopener',
'target' => '_blank',
'before_text' => 'You can edit the configuration',
'link_text' => 'on this', // Required if the href key is set
'after_text' => 'repository.',
],
]
);