hugo-theme-anubis icon indicating copy to clipboard operation
hugo-theme-anubis copied to clipboard

Any instructions for deploying to Netlify?

Open aspantel opened this issue 3 years ago • 8 comments

Hello, I can't figure out how to deploy my site to Netlify with this theme. Any additional configurations required? Thanks

aspantel avatar Feb 16 '22 17:02 aspantel

Added config example. https://github.com/Mitrichius/hugo-theme-anubis/blob/master/exampleSite/netlify.toml

Be sure Netlify uses this config, not some predefined command from Netlify build configuration

Mitrichius avatar Feb 17 '22 12:02 Mitrichius

I have it like that and it's not working. The site deploys but the theme is missing. Some git submodule issue I guess.

aspantel avatar Feb 17 '22 12:02 aspantel

Maybe .gitmodules file is missing?

[submodule "themes/anubis"]
path = themes/anubis
url = https://github.com/mitrichius/hugo-theme-anubis.git

Mitrichius avatar Feb 17 '22 15:02 Mitrichius

No, I have that file. Spent much time yesterday investigating. No luck so far. Do I commit themes/aunibis dir into my repo if it's a submodule? I tried either way but I probably don't need to commit it as Netlify should be importing that submodule on its own, right?

I think I'll have to write to Netlify support about this.

On Thu, Feb 17, 2022 at 10:09 AM Dmitry Kolosov @.***> wrote:

Maybe .gitmodules file is missing?

[submodule "themes/anubis"] path = themes/anubis url = https://github.com/mitrichius/hugo-theme-anubis.git

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.Message ID: @.***>

aspantel avatar Feb 17 '22 15:02 aspantel

I got it. It's a base-url thing. I try to preview the site but the baseUrl is not matching in the preview mode. https://answers.netlify.com/t/private-repo-with-a-public-submodule-hugo/8471/2

Any remedy for that?

aspantel avatar Feb 17 '22 15:02 aspantel

CORS issue? JS/CSS blocked by browser?

Add to netlify.toml

[[headers]]
  for = "/*"
    [headers.values]
      Access-Control-Allow-Origin = "*"

Mitrichius avatar Feb 17 '22 16:02 Mitrichius

No, my issue was simply base-url pointing to a production name, but I was previewing under a temporary url.

aspantel avatar Feb 17 '22 16:02 aspantel

Try override baseURL in config with param --baseURL=https://example.org

Mitrichius avatar Feb 17 '22 16:02 Mitrichius

Closing this issue due to inactivity. If the issue is still here, feel free to reopen it.

Mitrichius avatar Apr 24 '23 09:04 Mitrichius