-
Notifications
You must be signed in to change notification settings - Fork 32
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
Broken link to github source file - missing . #47
Comments
Hi @myosotisgit Reading the code and your description more than twice I am still puzzled about how there could be a mistake in the file path, so let's find out :) |
@williamdes We, our programmers, are also stumped and dont know what to do with it. We tried it both on a local dev (windows) and on our test server (ubuntu) thinking it would be a windows/unix issues. But on both instances we get incorrect github links. I did run a 'tree app' but the output is very large. It goes through all of our app and since it is a laravel/vue app it gets big. |
Hi @myosotisgit Would you mind sharing your full config file here in plain text so I can understand how you configured it? Did you follow the readme example? |
Here you go. Straight from the examples use Doctum\Doctum;
use Doctum\Version\GitVersionCollection;
use Symfony\Component\Finder\Finder;
use Doctum\RemoteRepository\GitHubRemoteRepository;
$dir = 'app';
$iterator = Finder::create()
->files()
->name('*.php')
->in($dir);
// generate documentation for all v2.0.* tags, the 2.0 branch, and the main one
/*$version = GitVersionCollection::create($dir)
// In a non case-sensitive way, tags containing "PR", "RC", "BETA" and "ALPHA" will be filtered out
// To change this, use: `$versions->setFilter(static function (string $version): bool { // ... });`
->add('master', 'master branch');*/
return new Doctum($iterator, [
'version' => 'master',
'title' => 'Documentatie Test',
'language' => 'en', // Could be 'fr'
'build_dir' => __DIR__ . '/../public/doctum/%version%',
'cache_dir' => __DIR__ . '/../cache/%version%',
'source_dir' => dirname($dir) . '/',
'remote_repository' => new GitHubRemoteRepository('myosotisgit/webraap5', dirname($dir)),
'default_opened_level' => 2, // optional, 2 is the default value
]); PS |
Hi @myosotisgit I did not manage to reproduce this issue on my side, may you try to change Sorry for the big delay in my response time |
Hi @williamdes I changed the config to $dir = 'app/Logging'; A folder which contains a single class and generated the documentation files. The following link was generated in the Doctum files: {github_link}/blob/master/Logging/{class}.php#L20 This means the .php extension functions properly, but the 'app' folder is missing. {github_link}/blob/master/app/Logging/{class}.php#L20 I tried playing around with the config, but did not manage to produce an 'app' folder in the Github link. Are we missing something in the config maybe? |
Hi @twouda
I think there is maybe something specific that needs a full path from the start |
Do you have some news about this one ? |
I found Doctum while searching for an auto doc generator with Laravel in mind. I installed and and ran it on our existing app code.
It already picked up comments and made a nice static site. So the doc generator seems to work great. So far so good...
But when i try using the links to the github repo file, it wont work because the link is incorrect. It seems to miss the "." in the url.
Adding a "." before "php" will solve the issue and redirect to Github properly.
In the doctum config i have added the most common values, as mentioned in the Doctum doc sample
Any ideas how to solve the missing . problem ?
The text was updated successfully, but these errors were encountered: