Skip to content

Fix /docs base URL showing localhost on deployed instances#100

Merged
flymia merged 1 commit into
mainfrom
fix/docsbug
Jul 21, 2026
Merged

Fix /docs base URL showing localhost on deployed instances#100
flymia merged 1 commit into
mainfrom
fix/docsbug

Conversation

@flymia

@flymia flymia commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

This fixes #92. Switch Scribe from static-HTML to its laravel type so the docs page renders at request time and its base URL resolves to the live APP_URL, instead of the build-time value baked into static files.

  • config/scribe.php: type=laravel, base_url='{{ config("app.url") }}', add_routes=false, OpenAPI/Postman specs disabled; drop the obsolete class_exists(AuthIn) guard
  • composer: move knuckleswtf/scribe from require-dev to require (runtime dependency); minimal lock change (9 packages moved dev->prod, no bumps)
  • routes/web.php: serve /docs via Route::view('scribe.index'); remove the old /docs -> /docs/index.html redirect
  • Dockerfile.prod: drop the vendor-dev/docs stages, generate in the runtime stage; generate against a sentinel base URL then inject the Blade expression so example snippets and "Try It Out" host are dynamic too
  • nginx.conf: route /docs through PHP; simplify index directive
  • gitignore new generated paths; untrack the stale committed view that had localhost baked in
  • update dev docs compose service comment and CLAUDE.md

Switch Scribe from static-HTML to its `laravel` type so the docs page
renders at request time and its base URL resolves to the live APP_URL,
instead of the build-time value baked into static files.

- config/scribe.php: type=laravel, base_url='{{ config("app.url") }}',
  add_routes=false, OpenAPI/Postman specs disabled; drop the obsolete
  class_exists(AuthIn) guard
- composer: move knuckleswtf/scribe from require-dev to require (runtime
  dependency); minimal lock change (9 packages moved dev->prod, no bumps)
- routes/web.php: serve /docs via Route::view('scribe.index'); remove the
  old /docs -> /docs/index.html redirect
- Dockerfile.prod: drop the vendor-dev/docs stages, generate in the runtime
  stage; generate against a sentinel base URL then inject the Blade
  expression so example snippets and "Try It Out" host are dynamic too
- nginx.conf: route /docs through PHP; simplify index directive
- gitignore new generated paths; untrack the stale committed view that had
  localhost baked in
- update dev docs compose service comment and CLAUDE.md
@flymia
flymia merged commit 426427a into main Jul 21, 2026
1 check passed
@flymia
flymia deleted the fix/docsbug branch July 21, 2026 20:39
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.

bug: Base URL in /docs is wrong on v1.2.0

1 participant