[PHP API Reference] Reduce size of PHP API reference - #3008
Merged
Merged
Conversation
|
Preview of modified files: no change to preview. |
mnocon
force-pushed
the
optimize-php-api-ref
branch
from
January 14, 2026 18:24
7fa2c8a to
0a03838
Compare
mnocon
marked this pull request as ready for review
January 15, 2026 07:32
mnocon
force-pushed
the
optimize-php-api-ref
branch
from
January 15, 2026 07:35
0a03838 to
d88537c
Compare
mnocon
force-pushed
the
optimize-php-api-ref
branch
from
January 15, 2026 07:38
d88537c to
473ecc4
Compare
adriendupuis
added a commit
that referenced
this pull request
Jan 19, 2026
* sidebar.html.twig: Load menu from index.html --------- Co-authored-by: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com>
7 tasks
adriendupuis
added a commit
that referenced
this pull request
Jan 20, 2026
* [PHP API Reference] Reduce size of PHP API reference (#3008) --------- Co-authored-by: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Co-authored-by: Marek Nocoń <mnocon@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently, the PHP API reference takes more than 8gb on the disk. With MkDocs build, it's another 8 gb in the
sitedirectory -> more than 16gb for a single copy of the doc.Very often I work on multiple PRs in parallel and I'm running out of disk space to continue some topics.
This also results in slower checkout and clone times when working with the doc.
The size of the repository is caused by our PHP API reference - 3k files, each almost 3mb in size, results in ~8gb of content (that gets doubled after MkDocs built).
This solution extract the common part of each file (the navigation) to a separate file that is loaded using JavaScript.
Advantages:
Disclaimer: I have used AI when writing the code, but I've verified the output (both of the script and the end result) and it works.
When reviewing, review 38bc22b first - and then verify the second commit locally (it's autogenerated).
Link to PHP API ref: https://ez-systems-developer-documentation--3008.com.readthedocs.build/en/3008/api/php_api/php_api_reference/
Individual file before:
https://github.com/ibexa/documentation-developer/blob/5.0/docs/api/php_api/php_api_reference/classes/Ibexa-Contracts-ActivityLog-Values-ActivityLog-Criterion-LogicalAnd.html
Individual file after:
https://github.com/ibexa/documentation-developer/blob/optimize-php-api-ref/docs/api/php_api/php_api_reference/classes/Ibexa-Contracts-ActivityLog-Values-ActivityLog-Criterion-LogicalAnd.html
(becomes actually viewable on GitHub)
Tested scenarios: