How to rebuild Digest theme?

Is anyone able to customize the official “Digest” theme recently?

When I try to build the theme locally (before making any code changes), something in the Javascript breaks and the menu bar fails to render.

Replication steps:

  1. Clone the Digest github repo.
  2. sudo npm install, sudo npm update, sudo npm upgrade
  3. npm run zip. This will fail with the error message:

Error: ENOENT: no such file or directory, scandir ‘Digest/assets/js/lib’

  1. Create empty folder ‘Digest/assets/js/lib’
  2. npm run zip. This runs successfully.
  3. Upon uploading the theme, menu bar no longer exists:

In comparison, with the prebuilt Digest theme downloaded from Github, menu bar is visible:

Deeply appreciate any replication or leads on this! Thanks folks :smile:

Edit: Wanted to shout out @umangkagathara for the help in replicating this bug and suggesting posting to this forum. :smile:

1 Like

Are you on windows? There are some problems with asset generation on windows that might be responsible…,

1 Like

I’m on a Mac unfortunately…do you have any idea which dependency is causing the issue?

Haven’t encountered this with other themes (tried: Casper, Edition)…

Just tried and could replicate this by following the readme from the repository (also on a Mac).

I played around a little bit – initially thought it’s an issue in the gulpfile.js, since that is the one looking for the directory. But I thought…that would be odd. Especially since that specific line is in the repository since it was created nearly 2 years ago.

So, I dug a bit more.

3 weeks ago, good-old renovate bot updated dependencies – and pushed gulp from 4.0.2 to 5.0.0:

Now, that included loads of breaking changes:

I tried reverting the renovate bot commit on my local machine and TADAAA – everything builds without issues AND the navigation bar is present. So, that might be an option for you to quickly get what you want (or specifically check out the last commit before the upgrade to gulp 5.0.0)

So…not entirely sure how the Ghost team handles renovate bot breaking things. @RyanF maybe you can have a look? Happy to help out with a PR, but I feel like the breaking changes from gulp are a bit deeper than on theme level, given that the navigation bar also disappears completely :thinking:

2 Likes

That worked for me as well – super thanks for the eagle eyed find, @jannis!

Equally happy to help with a PR. Love Ghost, love that it’s open source and would love to help keep it chugging along. :v:

Thanks for reporting this. I’ve let our theme design team know about it.

2 Likes