diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..06f3b2bb --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "docs"] + path = docs + url = https://github.com/danog/MadelineProtoDocs diff --git a/build_docs.php b/build_docs.php index 89a46c2d..a2a8e236 100755 --- a/build_docs.php +++ b/build_docs.php @@ -17,7 +17,7 @@ set_error_handler(['\danog\MadelineProto\Exception', 'ExceptionErrorHandler']); \danog\MadelineProto\Logger::log('Copying readme...', \danog\MadelineProto\Logger::NOTICE); -file_put_contents('docs/index.md', '--- +file_put_contents('docs/docs/index.md', '--- title: MadelineProto documentation description: PHP implementation of telegram\'s MTProto protocol --- @@ -28,7 +28,7 @@ $docs = [ 'tl_schema' => ['td' => __DIR__.'/src/danog/MadelineProto/TL_td.tl'], 'title' => 'MadelineProto API documentation (td-lib)', 'description' => 'MadelineProto API documentation (td-lib)', - 'output_dir' => __DIR__.'/docs/TD_docs', + 'output_dir' => __DIR__.'/docs/docs/TD_docs', 'readme' => false, 'td' => true, ], @@ -36,14 +36,14 @@ $docs = [ 'tl_schema' => ['mtproto' => __DIR__.'/src/danog/MadelineProto/TL_mtproto_v1.json'], 'title' => 'MadelineProto API documentation (mtproto)', 'description' => 'MadelineProto API documentation (mtproto)', - 'output_dir' => __DIR__.'/docs/MTProto_docs', + 'output_dir' => __DIR__.'/docs/docs/MTProto_docs', 'readme' => false, ], [ 'tl_schema' => ['telegram' => __DIR__.'/src/danog/MadelineProto/TL_telegram_v75.tl', 'calls' => __DIR__.'/src/danog/MadelineProto/TL_calls.tl', 'secret' => __DIR__.'/src/danog/MadelineProto/TL_secret.tl', 'td' => __DIR__.'/src/danog/MadelineProto/TL_td.tl'], 'title' => 'MadelineProto API documentation (layer 75)', 'description' => 'MadelineProto API documentation (layer 75)', - 'output_dir' => __DIR__.'/docs/API_docs', + 'output_dir' => __DIR__.'/docs/docs/API_docs', 'readme' => false, ], ]; @@ -55,14 +55,14 @@ foreach (array_slice(glob(__DIR__.'/src/danog/MadelineProto/TL_telegram_*'), 0, 'tl_schema' => ['telegram' => $file], 'title' => 'MadelineProto API documentation (layer '.$layer.')', 'description' => 'MadelineProto API documentation (layer '.$layer.')', - 'output_dir' => __DIR__.'/old_docs/API_docs_'.$layer, + 'output_dir' => __DIR__.'/docs/old_docs/API_docs_'.$layer, 'readme' => true, ]; $layer_list = '[Layer '.$layer.'](API_docs_'.$layer.'/) '; } -file_put_contents('old_docs/README.md', '--- +file_put_contents('docs/old_docs/README.md', '--- title: Documentations of old mtproto layers description: Documentation of old mtproto layers --- diff --git a/build_docs_index.php b/build_docs_index.php index 69f24ae9..6f2ef9c6 100644 --- a/build_docs_index.php +++ b/build_docs_index.php @@ -1,7 +1,7 @@