aschmelyun / use-the-keyboard

A collection of keyboard shortcuts for Mac apps, Windows programs, and websites.
https://usethekeyboard.com
165 stars 19 forks source link

Help with running local build #25

Open YPCrumble opened 5 years ago

YPCrumble commented 5 years ago

I'm trying to make a change and want to look at it in my local before submitting a PR. Here's what I did:

  1. Clone the repo
  2. composer install && npm install
  3. npm run production
  4. php taro build

All of the above seemed to work. How then would I view the site on my local machine? When I simply type open dist/index.html in my browser (i.e., file:///Users/username/use-the-keyboard/dist/index.html) the text shows up, but the CSS and images do not load properly. Links also don't work.

Thanks for any suggestions!

aschmelyun commented 5 years ago

It's a little unfortunate, but all of the asset paths (JS, CSS) throughout the site use absolute pathways. The site assumes you have it set up at a root local domain like usethekeyboard.test or something similar.

Your best bet would be going into head.blade.php and changing the path of the main stylesheet (should be line 30) to where it is in your local environment. Same with the script in footer.blade.php.