harbor icon indicating copy to clipboard operation
harbor copied to clipboard

Upload theme Vercel or Netlify problem

Open MrAntooo opened this issue 4 years ago • 3 comments

Hi, how can I upload the site to Netlify / Vercel? It is not the first time I load a site on those platforms but this time styles and all elements of the static folder are not recognized.

Thanks and congratulations for the work on this theme.

MrAntooo avatar Feb 18 '21 20:02 MrAntooo

Hi @MrAntooo, thanks for the feedback and sorry for the delay.

I'm not familiar with these platforms, so please check their documents like https://gohugo.io/hosting-and-deployment/hosting-on-netlify/#configure-hugo-version-in-netlify or https://vercel.com/guides/deploying-hugo-with-vercel.

matsuyoshi30 avatar Mar 21 '21 12:03 matsuyoshi30

ah I've had this issue with netlify, you need to use the url with a trailing / other wise the styles get screwed up

Lunarequest avatar May 01 '21 06:05 Lunarequest

I could deploy to Vercel without problems after specifying the buildUrl with -b, i.e. got the the $project -> Settings -> General -> Build & Development Settings and override build and development commands with:

  • build command: hugo -b https://$VERCEL_URL/
  • development command: hugo server -D -w -p $PORT -b https://$VERCEL_URL/

The system/default env vars are documented at: https://vercel.com/docs/environment-variables#system-environment-variables

MartinSchmidt123 avatar Aug 27 '21 14:08 MartinSchmidt123