|
|
@ -144,6 +144,9 @@ $server->setHandler( |
|
|
|
} |
|
|
|
} |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Init reader |
|
|
|
|
|
|
|
$reader = new \Yggverse\Gemini\Dokuwiki\Reader(); |
|
|
|
|
|
|
|
|
|
|
|
// Build home page |
|
|
|
// Build home page |
|
|
|
$lines = [ |
|
|
|
$lines = [ |
|
|
|
PHP_EOL |
|
|
|
PHP_EOL |
|
|
@ -204,11 +207,18 @@ $server->setHandler( |
|
|
|
foreach ($filesystem->getPagePathsByPath($directory) as $file) |
|
|
|
foreach ($filesystem->getPagePathsByPath($directory) as $file) |
|
|
|
{ |
|
|
|
{ |
|
|
|
$pages[] = sprintf( |
|
|
|
$pages[] = sprintf( |
|
|
|
'=> gemini://%s%s/%s', |
|
|
|
'=> gemini://%s%s/%s %s', |
|
|
|
$config->gemini->server->host, |
|
|
|
$config->gemini->server->host, |
|
|
|
$config->gemini->server->port == 1965 ? null : ':' . $config->gemini->server->port, |
|
|
|
$config->gemini->server->port == 1965 ? null : ':' . $config->gemini->server->port, |
|
|
|
$filesystem->getPageUriByPath( |
|
|
|
$filesystem->getPageUriByPath( |
|
|
|
$file |
|
|
|
$file |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
$reader->getH1( |
|
|
|
|
|
|
|
$reader->toGemini( |
|
|
|
|
|
|
|
file_get_contents( |
|
|
|
|
|
|
|
$file |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
) |
|
|
|
) |
|
|
|
) |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|