diff --git a/.gitignore b/.gitignore index 18eba7e60..cdc112c31 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,12 @@ # Generated Files */_build/* -conf.pyc +build/vendor/ +build/server/ +build/composer.lock +developer_manual/api/ + +*.pyc # Meta Data .DS_Store @@ -17,3 +22,4 @@ conf.pyc /nbproject/* *.db *.snag + diff --git a/Makefile b/Makefile index ac102c601..3307dcd72 100644 --- a/Makefile +++ b/Makefile @@ -40,10 +40,10 @@ developer-manual-pdf: @echo "Developer manual build finished; PDF is updated" api-docs: clean-api-docs + cd build && sh get-server-sources.sh master mkdir -p developer_manual/api/ - sh get-server-sources.sh master - composer install - php generateApiDoc.php + cd build && composer install && composer update + cd build && php generateApiDoc.php clean: clean-api-docs rm -r admin_manual/_build developer_manual/_build developer_manual/api user_manual/_build user_manual_de_/_build diff --git a/_shared_assets/themes/nextcloud_com/static/styles.css b/_shared_assets/themes/nextcloud_com/static/styles.css index fda5e4d50..65a2dafb6 100644 --- a/_shared_assets/themes/nextcloud_com/static/styles.css +++ b/_shared_assets/themes/nextcloud_com/static/styles.css @@ -1076,7 +1076,8 @@ img.desaturate { h1:hover a.headerlink, h2:hover a.headerlink, h3:hover a.headerlink, -h4:hover a.headerlink { +h4:hover a.headerlink, +.phpdoctorst dt:hover a.headerlink { display: inline; } a.headerlink { @@ -1212,33 +1213,6 @@ li > dl > dt { /* API doc styles */ -/** Hacky way to display visibility since sphinx-phpdomain currently doesn't seem support them */ - -.public:before { - content: 'public '; -} -.private:before { - content: 'private '; -} -.protected:before { - content: 'protected '; -} -.final dt:before{ - content: 'final '; -} -.abstract dt:before { - content: 'abstract '; -} - -/* Apply rtd default styling to prepended visibility strings */ -.public:before, .private:before { - float: left; -} -.abstract dt:before, -.final dt:before { - padding-right: 10px; -} - dl.class dt, dl.interface dt, dl.trait dt { @@ -1256,18 +1230,6 @@ dl.trait dt { font-family: Monaco,Menlo,Consolas,"Courier New",monospace; font-size: 90%; } -.method:before, -.class:before, -.interface:before, -.trait:before, -.namespace:before { - padding-left: 10px; - padding-top: 1px; - background-color: #eeeeee; - font-family: Monaco,Menlo,Consolas,"Courier New",monospace; - font-size: 90%; - margin-right: 10px; -} .method > dt code, .class > dt code, .interface > dt code, diff --git a/composer.json b/build/composer.json similarity index 100% rename from composer.json rename to build/composer.json diff --git a/generateApiDoc.php b/build/generateApiDoc.php similarity index 88% rename from generateApiDoc.php rename to build/generateApiDoc.php index 956fe40bb..199aa30bf 100755 --- a/generateApiDoc.php +++ b/build/generateApiDoc.php @@ -33,13 +33,12 @@ $nextcloudSource = [ __DIR__ . '/server/lib/public', __DIR__ . '/server/lib/private', ]; -$destinationDirectory = __DIR__ . '/developer_manual/api'; +$destinationDirectory = __DIR__ . '/../developer_manual/api'; $apiDocBuilder = new ApiDocBuilder($nextcloudSource, $destinationDirectory); $apiDocBuilder->setVerboseOutput(true); -$apiDocBuilder->setDebugOutput(true); $apiDocBuilder->addExtension(\JuliusHaertl\PHPDocToRst\Extension\InterfaceImplementors::class); -$apiDocBuilder->addExtension(\JuliusHaertl\PHPDocToRst\Extension\TocExtension::class); -$apiDocBuilder->addExtension(\JuliusHaertl\PHPDocToRst\Extension\PublicOnlyExtension::class); +$apiDocBuilder->addExtension(\JuliusHaertl\PHPDocToRst\Extension\NoPrivateExtension::class); +$apiDocBuilder->addExtension(\JuliusHaertl\PHPDocToRst\Extension\GithubLocationExtension::class, [__DIR__ . '/server/', 'https://github.com/nextcloud/server']); $apiDocBuilder->build(); diff --git a/get-server-sources.sh b/build/get-server-sources.sh similarity index 100% rename from get-server-sources.sh rename to build/get-server-sources.sh diff --git a/developer_manual/api.rst b/developer_manual/api.rst new file mode 100644 index 000000000..658be997c --- /dev/null +++ b/developer_manual/api.rst @@ -0,0 +1,23 @@ +API Documentation +================= + + +PHP public API +-------------- +.. toctree:: + :maxdepth: 1 + + /OCP namespace + + +PHP class reference +------------------- + +Please note that only APIs in \OCP namespace are considered to be public. The +following documentation is just for reference: + +.. toctree:: + :maxdepth: 1 + + / namespace + /OC namespace