Skip to content

GRO-835 Serve/hot-reload local metabase files - #1307

Merged
bpander merged 13 commits into
masterfrom
gro-835-hot-reload-local-metabase
Sep 2, 2026
Merged

GRO-835 Serve/hot-reload local metabase files#1307
bpander merged 13 commits into
masterfrom
gro-835-hot-reload-local-metabase

Conversation

@bpander

@bpander bpander commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

GRO-835

Description

Adds METABASE_REPO_PATH environment variable to optionally view local mb repo files.

Also adds README.

How to test

  1. cp .env-dist .env
  2. Point METABASE_REPO_PATH at your local metabase repo
  3. bun dev
  4. Navigate to http://localhost:4321/docs/latest
  5. Make changes to metabase repo docs md files, images, etc
  6. Verify changes are reflected on dev server
  7. Unset METABASE_REPO_PATH (comment it out or something) and restart dev server
  8. Verify dev server serves what's in _docs and looks the same as before

Would also be good to test update-docs-base-bun.yml won't act funky with these changes, e.g. script/update_docs_for_branchname.clj calls script/docs which uses constructDocMetadata and reformatMarkdownUrls which were moved and changed to TS.

PR env: https://gro-835-hot-reload-local-metabase.dkkh35gceu2po.amplifyapp.com/docs/latest/

Demo

demo-short.mov

@bpander bpander self-assigned this Aug 27, 2026
@linear

linear Bot commented Aug 27, 2026

Copy link
Copy Markdown

GRO-835

@bpander
bpander force-pushed the gro-835-hot-reload-local-metabase branch 2 times, most recently from 4a0a9d8 to c17596c Compare August 27, 2026 19:38
@bpander
bpander marked this pull request as ready for review August 27, 2026 19:57
@bpander
bpander requested review from a team August 27, 2026 19:57
@bpander
bpander force-pushed the gro-835-hot-reload-local-metabase branch from c17596c to b21f85c Compare September 2, 2026 13:29
…enormous amount of computation in dev builds
…significantly simplifies things and increases performance. Also updates docsHtmlLoader to handle local mb files using that same simplification method.
…ow and it's not supposed to generate pages or be in the sitemap)
…cture and so the same code is used in astro and script/docs
…o) but sets the stage to make it so all src files are raw and processed the same way

@gantoreno gantoreno left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢🚢🚢

One minor thing I found, won't block on approval but needed before merging is that the "Propose a change" widget link is now a) missing file extensions and b) trimming the filename in case it's README.md, which causes those links to always 404

For example, on /docs/latest, the link should be: https://github.com/metabase/metabase/blob/master/docs/README.md but instead it's https://github.com/metabase/metabase/blob/master/latest/

Image

@bpander

bpander commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

the "Propose a change" widget link is now a) missing file extensions and b) trimming the filename in case it's README.md, which causes those links to always 404

Thanks for catching that @gantoreno 🙏 - I did some late-stage cleanup and didn't test it thoroughly enough. Addressed in 1063df2. Computes the docPath using the doc's actual filePath. Added handling for the !METABASE_REPO_PATH branch too which is technically unreachable in its current state but will be reachable soon enough (when we nix script/docs).

@bpander
bpander merged commit 5df921a into master Sep 2, 2026
4 checks passed
@bpander
bpander deleted the gro-835-hot-reload-local-metabase branch September 2, 2026 18: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.

2 participants