Browse Source

make menu links relative

main
ghost 11 months ago
parent
commit
891d8106b0
  1. 12
      src/server.php

12
src/server.php

@ -213,9 +213,7 @@ $server->setHandler(
// Register section link // Register section link
$sections[] = sprintf( $sections[] = sprintf(
'=> gemini://%s%s/%s %s', '=> /%s %s',
$config->gemini->server->host,
$config->gemini->server->port == 1965 ? null : ':' . $config->gemini->server->port,
$uri, $uri,
$h1 $h1
); );
@ -254,9 +252,7 @@ $server->setHandler(
foreach ($filesystem->getPagePathsByPath($directory) as $file) foreach ($filesystem->getPagePathsByPath($directory) as $file)
{ {
$pages[] = sprintf( $pages[] = sprintf(
'=> gemini://%s%s/%s %s', '=> /%s %s',
$config->gemini->server->host,
$config->gemini->server->port == 1965 ? null : ':' . $config->gemini->server->port,
$filesystem->getPageUriByPath( $filesystem->getPageUriByPath(
$file $file
), ),
@ -369,9 +365,7 @@ $server->setHandler(
foreach ($filesystem->getPagePathsByPath($directory) as $file) foreach ($filesystem->getPagePathsByPath($directory) as $file)
{ {
$pages[] = sprintf( $pages[] = sprintf(
'=> gemini://%s%s/%s', '=> /%s',
$config->gemini->server->host,
$config->gemini->server->port == 1965 ? null : ':' . $config->gemini->server->port,
$filesystem->getPageUriByPath( $filesystem->getPageUriByPath(
$file $file
) )

Loading…
Cancel
Save