Skip to content

Add domain option to the laravel config section so docs can live on a separate hostname#1002

Closed
dazza-dev wants to merge 2 commits into
knuckleswtf:v5from
dazza-dev:docs-domain
Closed

Add domain option to the laravel config section so docs can live on a separate hostname#1002
dazza-dev wants to merge 2 commits into
knuckleswtf:v5from
dazza-dev:docs-domain

Conversation

@dazza-dev

Copy link
Copy Markdown
Contributor

Current behaviour
The laravel section of config/scribe.php lets you tweak docs_url, asset folder, middleware, etc., but there’s no way to put the generated documentation behind a different domain or sub-domain. Today you have to copy the route declaration and wrap it in Route::domain() yourself each time you publish the config.

Impact
Non-breaking: existing installations keep working as domain defaults to null.
Zero maintenance cost: publishing the config once exposes the new env var for developers who need it.

@shalvah

shalvah commented Jun 30, 2025

Copy link
Copy Markdown
Contributor

Thanks for identifying a problem and trying to fix it! I won't be accepting this, though.

As a rule, I reject any new additions to the config file. It's already quite big, and if an addition is not relevant to the majority of users, it's not worth increasing the size of this file (which hurts its usability).

Your use cases in particular can already be solved with a workaround:

Today you have to copy the route declaration and wrap it in Route::domain() yourself each time you publish the config.

I agree it may be less than ideal, so I'm open to other solutions (eg custom hooks). But the config file is for the 90% use case, not the 10%.

@shalvah shalvah closed this Jun 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants