Moving localhost theme to Production

I’ve been developing a theme locally on my Windows machine, and now that I have it ready for initial rollout, I’m having all types of issues in “Production” (It’s up on the internet). I installed Ghost 3.14.0 on a new droplet on DigitalOcean (Ubuntu 18.04). I did the following:

  1. I ran ‘yarn ship’ on my local machine to build the theme.
  2. I donwloaded the theme from within Ghost Admin, and uploaded it to the production server.
  3. It installed successfully, no errors.
  4. I updated config.production.json for Mailgun, successful test email sent (this likely has nothing to do with my issues).
  5. I updated routes.yaml to undo “corrections” for slashes in routes when on a Windows machine.
  6. I started recreating content manually - a few test posts.

But now only the index template renders at all, and it does not render correctly. I had applied filters on the homepage and on a collection (blog versus a webcomic section):

collections:
  /:
    permalink: /{slug}/
    template: index
    filter: tags:-[comic]
  /comic/:
    permalink: /comic/{slug}/
    template: comic
    filter: primary_tag:comic

On my local machine, the homepage renders correctly - only blog posts show up, but on DO, posts with the tag ‘comic’ show up on the blog page, and the /comic route won’t even render.

  • What’s your URL? thelittlestviking.com
  • What version of Ghost? 3.14.0, locally and on DO droplet
  • What configuration? development locally, production on droplet
  • What browser? multiple (Firefox, Chrome, etc.)
  • What errors or information do you see in the console? None?
  • What steps could someone else take to reproduce the issue you’re having?

DId you restarted ghost after uploading the routes.yaml file?

Yes, multiple times. And after I updated the configuration file.

Thanks!

Also created the tag comic?

Yes, indeed!

What gets me is that the home page works, more or less. It’s showing the wrong posts, but it does render. /comic/ doesn’t render ANYTHING.

I’m wondering if this is down to the yarn ship command you’re using. We’ve noticed in a couple of cases that the command doesn’t appear to work correctly on windows machines. I believe this is down to a known issue in the gulp-zip dependency which the command uses. Would you mind instead using another tool, or app, to zip the theme up and upload that to your production site?

This might not be the actual issue, but at least it’ll eliminate the possibility.

David,

Thank you for the suggestion, but in this case it was entirely user error! I was uploading the wrong version of routes.yaml and didn’t notice until I redownloaded it from within Ghost.

Thanks again!

1 Like