Open dimaslanjaka opened 3 years ago
Hi. Thanks for reporting.
Are you using a phar version of phpdoc?
What version are you using?
Yes. i used phar phpdoc 3.0.0.
phpdocumentor version ^2.9.1 as described on Doc not working as well.
I think you are using phpDocumentor 3. Sadly, at the moment, this template is not compatible with it.
Seems that you installed locally with composer, but still using phpDocumentor 3 executable. Try to run vendor/bin/phpdoc
directly instead of simply phpdoc
.
And yes, PHAR bins seems to fail to locate template files also. :(
You can try to build the documentation using GitHub Actions, for example the Build job in this workflow: https://github.com/nelson6e65/php_nml/blob/master/.github/workflows/documentation.yml#L47 (Is configured to use Netlify, but you can adapt it to GitHub pages or any other).
If you like to discard if there are some problems with your config, you can try to build the documentation of this repository:
# Clone and move to phpdoc-vuepress directory
# Install dependencies
composer install
npm install
# Build API with local phpDoc configured as composer script
composer build:api
# Run VuePress server
npm run docs:dev
If you have problems with building docs for this repository, following previous instructions, then there is some platform incompatibility (PHP version, mostly).
If you successfully build the project, then there are some issues with the global binary files you are using. Maybe duplicated phpdoc bin in different locations.
You can try using composer scripts, like this repo, if you installed phpDocumentor 2.9.1 in your local composer.json. With this, composer will look for local install at first.
I've removed phpdoc phar 3.0.0 and install via composer v.2.9.0 and now render running properly, but exceeds 500kb ?
What do you mean with "exceeds 500Kb"?
What do you mean with "exceeds 500Kb"?
i dont know, its mean too large md file.
are this no alternative splitting classes.md when reached 500kb size ? seems like, splitting other php to classes1.md when classes.md reach 500kb and so on.
when classes.md more than 500kb, vuepress cannot load all contents. result is blank on classes.md (http://localhost:8080/base-url/classes.html)
i build phpdoc with limit classes. but when i build with vuepress build docs-src
result error page like bellow description.
Config : https://github.com/dimaslanjaka/universal-framework/tree/master/docs-src
Github Page :
build with vuepress-phpdoc, on development mode vuepress dev docs-src
working, but when build result like this:
http://git.webmanajemen.com/universal-framework/
http://git.webmanajemen.com/universal-framework/php/
Static JSDoc with gulp-jsdoc3 into .vuepress/public/js (work) http://git.webmanajemen.com/universal-framework/js/
now working like a charm. but i loses a lot function description and usages :(
@dimaslanjaka when classes.md more than 500kb, vuepress cannot load all contents. result is blank on classes.md (http://localhost:8080/base-url/classes.html)
Oh, I understand. You have too many classes, so the file is too large. Hmm...
Yes, I was thinking a way to split on multiple files some time ago, and I found some directions about it, but for my implementation for phpDocumentor 3.
At the moment I have not much time to invest in here. I'm sorry 😥. I will try to get more tome to invest in that implementation in the following weeks, because I also need PHP 7.4+ syntax compatibility for my current projects' documentation.
I have idea. Create single file php to splitting the Larger markdowns. Then creating json config to output splitted md's. And referring json file to config.js.
I want to help, but i still confusing on how md marker to indicate next page or next definition class/method. Need split them to spread into multiple files
Executing that single file php on cli faster than webserver. Can load file size 3mb++ less than 3 seconds on CLI.
Yes, the spitting was a challenge when I try to implement, but I noticed a feature in phpDocumentor 3 to allow split documentation in multiple files, 1 php --> 1 md
, but the problem was linking files on VuePress menu and also linking between files on different files and type (global function, class, trait, interface, ...).
At the beginning, my intention was to build only 1 JSON file and start building from there. 1 Generic Vue component for Class, Trait, etc, but I was kind of difficult, and I ended up by using twig templates instead.
https://github.com/fr3nch13/phpdoc-markdown i have try this. good result, but i dont know how to port it into vuepress.
Also compatible with phpdocumentor 3.0
Scopes
Describe the bug
Steps to reproduce