Skip to content
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

Generating Different Types of Documentation #471

Closed
1 task done
mooseh opened this issue May 16, 2022 · 3 comments
Closed
1 task done

Generating Different Types of Documentation #471

mooseh opened this issue May 16, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@mooseh
Copy link
Contributor

mooseh commented May 16, 2022

  • I've read the documentation and I can't find details on how to achieve this.

Hi There

I know this is more of a feature request but I have forked your repo and achieved what I need, and I know others need it,
currently your documentation doesn't support "multiple areas" such as admin docs and user docs.

I thought of a quick and easy way around this which is to generate multiple docs, in order to do this you will need a second config.

so I changed your GenerateDocumentation class slightly to accept a {--config=} option

and also in the bootstrap section I added this

        $this->docConfig = new DocumentationConfig(config('scribe'));
        if($this->option('config')){
            $config = config_path($this->option('config')).".php";
            if(!file_exists($config)){
                die("There is no suitable config found at {$config}\n");
            }
            $this->docConfig = new DocumentationConfig(config($this->option('config')));
        }

this allowed me the ability to make another config with static files and with a wider rule set for admins and then I just needed to add the admin routes and voila it works using the artisan command like so
php artisan scribe:generate --config=scribe_admins

maybe you can add this feature? I have seen other people asking for something like this and this is this is the quickest path to

@eonghk
Copy link

eonghk commented May 17, 2022

Vote for this. Maybe the config can be an array so it will be easy to support multiply configs?

@shalvah
Copy link
Contributor

shalvah commented May 18, 2022

Sure, --config seems like a good option. And thanks to the DocumentationConfig class, it's pretty easy to implement. Maybe you can send in a PR?

@shalvah shalvah added enhancement New feature or request and removed question labels May 18, 2022
@shalvah
Copy link
Contributor

shalvah commented Jun 4, 2022

@shalvah shalvah closed this as completed Jun 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants