ArjenSchwarz / wercker-step-hugo-build

Wercker Step for building Hugo sites
45 stars 19 forks source link

Your rendered home page is blank: /index.html is zero-length #34

Closed matheusrocha89 closed 7 years ago

matheusrocha89 commented 7 years ago

Try to use it to deploy to digital ocean but the build works local but on wercker gives this message:

=============================================================
Your rendered home page is blank: /index.html is zero-length
 * Did you specify a theme on the command-line or in your
   "config.toml" file?  (Current theme: "hugo-icarus-theme")
 * For more debugging information, run "hugo -v"
=============================================================
matheusrocha89 commented 7 years ago

This is a problem with hugo on linux. Need to remove the git submodule on themes. If you install a theme using git clone you need to remove the .git/ folder from this theme.

ArjenSchwarz commented 7 years ago

Another possible solution for your problem here would have been to update your submodules before running hugo. Git doesn't check out submodules unless you tell it to. One way to do this would be to add the following lines to your wercker.yml file before the hugo part.

    - install-packages:
        packages: git ssh-client
    - add-to-known_hosts:
        hostname: github.com
        type: rsa
    - script:
        name: initialize and update git submodules
        code: |
            git submodule init
            git submodule update --remote --recursive
matheusrocha89 commented 7 years ago

Didn't try this approach yet @ArjenSchwarz I will see if it works on wercker.