-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New template with source code and faster search engine #8
Conversation
At least searchIndex.js needs to get updated to include all new results.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks great @claudiosanches, great work!
I did get one error running the script that appears to break the class diagram, but everything else seems fine.
Is GraphViz correctly installed and present in your path?23:03:50 ERROR [app] Generating the class diagram failed [“error” => “”" sh: /Users/obliviousharmony/Repositories/WooCommerce/Tools/code-reference/vendor/phpdocumentor/phpdocumentor/src/phpDocumentor/Transformer/Writer/Graph/../../../../../bin/plantuml: No such file or directory\n sh: line 0: exec: /Users/obliviousharmony/Repositories/WooCommerce/Tools/code-reference/vendor/phpdocumentor/phpdocumentor/src/phpDocumentor/Transformer/Writer/Graph/../../../../../bin/plantuml: cannot execute: No such file or directory\n “”"]
23:03:50 ERROR [app] Generating the class diagram failed [“error” => “”" sh: /Users/obliviousharmony/Repositories/WooCommerce/Tools/code-reference/vendor/phpdocumentor/phpdocumentor/src/phpDocumentor/Transformer/Writer/Graph/../../../../../bin/plantuml: No such file or directory\n sh: line 0: exec: /Users/obliviousharmony/Repositories/WooCommerce/Tools/code-reference/vendor/phpdocumentor/phpdocumentor/src/phpDocumentor/Transformer/Writer/Graph/../../../../../bin/plantuml: cannot execute: No such file or directory\n “”"]
@ObliviousHarmony I disabled the class diagram, it's a environment dependency that can be installed from https://graphviz.org/download/ but it sounds too much for us now, maybe we can try it again after having GH actions to run the deploy. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@claudiosanches This worked great for me.
This PR introduces a new template where many issues present in the default PHPDoc template gets solved, like missing source code, and the search that was crashing browsers.
Note that the new template is based in the latest template from PHPDoc, using the latest structure that makes everything more organized, and also keep us updated when PHPDoc 3 gets released.
And besides the new styling, I also included a hook reference generator based on the old one used for ApiGen. I'm waiting for a better documentation for PHPDoc 3, for now is missing a proper documentation to extend PHPDoc, so for now the hook generator should do the work.
Closes #6
Closes #7
Steps to test:
If you want to just check how everything I said looks like, you can just a sample in: https://woocommerce.github.io/code-reference/v2/
But note that search the search uses links to https://woocommerce.github.io/code-reference/, so search results should redirect you to a different page.
Steps to build and test:
git clone https://github.com/woocommerce/code-reference.git --branch v2 --single-branch --depth 1
cd code-reference/ && composer install
./deploy.sh -s 4.5.2 --build-only
. Make sure to use--build-only
so you don't deploy this branch 😆build/api/index.html
in your browser:firefox build/api/index.html