Update docs

This commit is contained in:
Daniil Gentili 2018-04-01 13:33:36 +02:00
parent 0aa67fef98
commit 8de5c52244
4 changed files with 11 additions and 7 deletions

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "docs"]
path = docs
url = https://github.com/danog/MadelineProtoDocs

View File

@ -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
---

View File

@ -1,7 +1,7 @@
<?php
$index = '';
$files = glob('docs/docs/*md');
$files = glob('docs/docs/docs/*md');
foreach ($files as $file) {
$base = basename($file, '.md');
if ($base === 'CREATING_A_CLIENT') {

1
docs Submodule

@ -0,0 +1 @@
Subproject commit 4ccf9530af06f0af8f448c47c4e73096bbd36c83