keystatic icon indicating copy to clipboard operation
keystatic copied to clipboard

Admin UI does not load if GitHub App installed to empty repo

Open tyteen4a03 opened this issue 1 year ago • 4 comments

Description

Linking a Keystatic app to an brand new, uninitialized GItHub repo would cause the Admin UI to be completely blank.

Reproduction

  1. Create a Keystatic app and run it in development.
  2. Link it to a brand new repository. (I used an organization one but I don't think it matters)
  3. Try to access https://127.0.0.1/keystatic

tyteen4a03 avatar Jan 17 '24 00:01 tyteen4a03

I'm not sure I understand the use case where you'd want to do that. Keystatic in github mode will read/write content from the GitHub repository directly, so it's a fair assumption to expect that repo to have a Keystatic project committed.

Do you have a use case/workflow where that's an issue and the code for the repo cannot be committed and pushed?

simonswiss avatar Jan 22 '24 05:01 simonswiss

I'm not sure I understand the use case where you'd want to do that. Keystatic in github mode will read/write content from the GitHub repository directly, so it's a fair assumption to expect that repo to have a Keystatic project committed.

Do you have a use case/workflow where that's an issue and the code for the repo cannot be committed and pushed?

When you create a Keystatic project for the first time.

tyteen4a03 avatar Jan 23 '24 01:01 tyteen4a03

i faced the same issue a hour ago and solved now. Based on my experience, there is few things you have to check:

  • make sure that you already setup this https://keystatic.com/docs/github-mode#branch-prefix. Also dont forget to add your branchPrefix based on your github default branch. For me its main
  • create the repo name based on keystatic.config.js and make sure its not private
  • install the app into your repository

then your project is ready to go... 🚀

dxxta avatar Feb 06 '24 12:02 dxxta

Yes, I think this experience should be improved so an error message shows you exactly what you need to do.

tyteen4a03 avatar Feb 21 '24 23:02 tyteen4a03