From 5b4698d6587908e7cd38a0d47bac998666c6ca85 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Sun, 5 Sep 2021 20:51:29 +0200 Subject: [PATCH] Update docs --- README.md | 44 ++++++++++++++++++++++---------------------- docs | 2 +- tools/build_docs.php | 8 +++++++- 3 files changed, 30 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 77fe1543f..4d9bf6ec1 100644 --- a/README.md +++ b/README.md @@ -91,29 +91,29 @@ You can find examples for nearly every MadelineProto function in * [Noop (default)](https://docs.madelineproto.xyz/docs/UPDATES.html#noop) * [Fetch all updates from the beginning](https://docs.madelineproto.xyz/docs/UPDATES.html#fetch-all-updates-from-the-beginning) * [Database](https://docs.madelineproto.xyz/docs/DATABASE.html) - * [\danog\MadelineProto\Settings\Database\Memory: Memory backend settings.](/PHP/danog/MadelineProto/Settings/Database/Memory.md) - * [\danog\MadelineProto\Settings\Database\Mysql: MySQL backend settings.](/PHP/danog/MadelineProto/Settings/Database/Mysql.md) - * [\danog\MadelineProto\Settings\Database\Postgres: Postgres backend settings.](/PHP/danog/MadelineProto/Settings/Database/Postgres.md) - * [\danog\MadelineProto\Settings\Database\Redis: Redis backend settings.](/PHP/danog/MadelineProto/Settings/Database/Redis.md) + * [\danog\MadelineProto\Settings\Database\Memory: Memory backend settings.](https://docs.madelineproto.xyz/PHP/danog/MadelineProto/Settings/Database/Memory.html) + * [\danog\MadelineProto\Settings\Database\Mysql: MySQL backend settings.](https://docs.madelineproto.xyz/PHP/danog/MadelineProto/Settings/Database/Mysql.html) + * [\danog\MadelineProto\Settings\Database\Postgres: Postgres backend settings.](https://docs.madelineproto.xyz/PHP/danog/MadelineProto/Settings/Database/Postgres.html) + * [\danog\MadelineProto\Settings\Database\Redis: Redis backend settings.](https://docs.madelineproto.xyz/PHP/danog/MadelineProto/Settings/Database/Redis.html) * [Settings](https://docs.madelineproto.xyz/docs/SETTINGS.html) - * [\danog\MadelineProto\Settings\AppInfo: App information.](/PHP/danog/MadelineProto/Settings/AppInfo.md) - * [\danog\MadelineProto\Settings\Auth: Cryptography settings.](/PHP/danog/MadelineProto/Settings/Auth.md) - * [\danog\MadelineProto\Settings\Connection: Connection settings.](/PHP/danog/MadelineProto/Settings/Connection.md) - * [\danog\MadelineProto\Settings\Files: File management settings.](/PHP/danog/MadelineProto/Settings/Files.md) - * [\danog\MadelineProto\Settings\Ipc: IPC server settings.](/PHP/danog/MadelineProto/Settings/Ipc.md) - * [\danog\MadelineProto\Settings\Logger: Logger settings.](/PHP/danog/MadelineProto/Settings/Logger.md) - * [\danog\MadelineProto\Settings\Peer: Peer database settings.](/PHP/danog/MadelineProto/Settings/Peer.md) - * [\danog\MadelineProto\Settings\Pwr: PWRTelegram settings.](/PHP/danog/MadelineProto/Settings/Pwr.md) - * [\danog\MadelineProto\Settings\RPC: RPC settings.](/PHP/danog/MadelineProto/Settings/RPC.md) - * [\danog\MadelineProto\Settings\SecretChats: Secret chat settings.](/PHP/danog/MadelineProto/Settings/SecretChats.md) - * [\danog\MadelineProto\Settings\Serialization: Serialization settings.](/PHP/danog/MadelineProto/Settings/Serialization.md) - * [\danog\MadelineProto\Settings\TLSchema: TL schema settings.](/PHP/danog/MadelineProto/Settings/TLSchema.md) - * [\danog\MadelineProto\Settings\Templates: Web and CLI template settings for login.](/PHP/danog/MadelineProto/Settings/Templates.md) - * [\danog\MadelineProto\Settings\VoIP: VoIP settings.](/PHP/danog/MadelineProto/Settings/VoIP.md) - * [\danog\MadelineProto\Settings\Database\Memory: Memory backend settings.](/PHP/danog/MadelineProto/Settings/Database/Memory.md) - * [\danog\MadelineProto\Settings\Database\Mysql: MySQL backend settings.](/PHP/danog/MadelineProto/Settings/Database/Mysql.md) - * [\danog\MadelineProto\Settings\Database\Postgres: Postgres backend settings.](/PHP/danog/MadelineProto/Settings/Database/Postgres.md) - * [\danog\MadelineProto\Settings\Database\Redis: Redis backend settings.](/PHP/danog/MadelineProto/Settings/Database/Redis.md) + * [\danog\MadelineProto\Settings\AppInfo: App information.](https://docs.madelineproto.xyz/PHP/danog/MadelineProto/Settings/AppInfo.html) + * [\danog\MadelineProto\Settings\Auth: Cryptography settings.](https://docs.madelineproto.xyz/PHP/danog/MadelineProto/Settings/Auth.html) + * [\danog\MadelineProto\Settings\Connection: Connection settings.](https://docs.madelineproto.xyz/PHP/danog/MadelineProto/Settings/Connection.html) + * [\danog\MadelineProto\Settings\Files: File management settings.](https://docs.madelineproto.xyz/PHP/danog/MadelineProto/Settings/Files.html) + * [\danog\MadelineProto\Settings\Ipc: IPC server settings.](https://docs.madelineproto.xyz/PHP/danog/MadelineProto/Settings/Ipc.html) + * [\danog\MadelineProto\Settings\Logger: Logger settings.](https://docs.madelineproto.xyz/PHP/danog/MadelineProto/Settings/Logger.html) + * [\danog\MadelineProto\Settings\Peer: Peer database settings.](https://docs.madelineproto.xyz/PHP/danog/MadelineProto/Settings/Peer.html) + * [\danog\MadelineProto\Settings\Pwr: PWRTelegram settings.](https://docs.madelineproto.xyz/PHP/danog/MadelineProto/Settings/Pwr.html) + * [\danog\MadelineProto\Settings\RPC: RPC settings.](https://docs.madelineproto.xyz/PHP/danog/MadelineProto/Settings/RPC.html) + * [\danog\MadelineProto\Settings\SecretChats: Secret chat settings.](https://docs.madelineproto.xyz/PHP/danog/MadelineProto/Settings/SecretChats.html) + * [\danog\MadelineProto\Settings\Serialization: Serialization settings.](https://docs.madelineproto.xyz/PHP/danog/MadelineProto/Settings/Serialization.html) + * [\danog\MadelineProto\Settings\TLSchema: TL schema settings.](https://docs.madelineproto.xyz/PHP/danog/MadelineProto/Settings/TLSchema.html) + * [\danog\MadelineProto\Settings\Templates: Web and CLI template settings for login.](https://docs.madelineproto.xyz/PHP/danog/MadelineProto/Settings/Templates.html) + * [\danog\MadelineProto\Settings\VoIP: VoIP settings.](https://docs.madelineproto.xyz/PHP/danog/MadelineProto/Settings/VoIP.html) + * [\danog\MadelineProto\Settings\Database\Memory: Memory backend settings.](https://docs.madelineproto.xyz/PHP/danog/MadelineProto/Settings/Database/Memory.html) + * [\danog\MadelineProto\Settings\Database\Mysql: MySQL backend settings.](https://docs.madelineproto.xyz/PHP/danog/MadelineProto/Settings/Database/Mysql.html) + * [\danog\MadelineProto\Settings\Database\Postgres: Postgres backend settings.](https://docs.madelineproto.xyz/PHP/danog/MadelineProto/Settings/Database/Postgres.html) + * [\danog\MadelineProto\Settings\Database\Redis: Redis backend settings.](https://docs.madelineproto.xyz/PHP/danog/MadelineProto/Settings/Database/Redis.html) * [Getting info about the current user](https://docs.madelineproto.xyz/docs/SELF.html) * [Exceptions](https://docs.madelineproto.xyz/docs/EXCEPTIONS.html) * [List of exception types](https://docs.madelineproto.xyz/docs/EXCEPTIONS.html#list-of-exception-types) diff --git a/docs b/docs index c64cf9210..fd3e91de1 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit c64cf921092dd496fc3a62efeb88d6359f651862 +Subproject commit fd3e91de1309ff9e836d0a4bc000a0473e2576b6 diff --git a/tools/build_docs.php b/tools/build_docs.php index d819c2749..de77b0ff8 100755 --- a/tools/build_docs.php +++ b/tools/build_docs.php @@ -181,7 +181,13 @@ foreach ($orderedfiles as $key => $filename) { foreach ($matches[1] as $key => $match) { $spaces = " $match"; $name = $matches[2][$key]; - $url = $matches[3][$key][0] === '#' ? $file.$matches[3][$key] : $matches[3][$key]; + if ($matches[3][$key][0] === '#') { + $url = $file.$matches[3][$key]; + } elseif (\substr($matches[3][$key], 0, 3) === '../') { + $url = 'https://docs.madelineproto.xyz/'.\str_replace('.md', '.html', \substr($matches[3][$key], 3)); + } else { + $url = $matches[3][$key]; + } $index .= "$spaces* [$name]($url)\n"; if ($name === 'FULL API Documentation with descriptions') { $spaces .= ' ';