reuixiy / hugo-theme-meme

😝 You can’t spell awesome without MemE!
http://reuixiy.github.io/hugo-theme-meme
MIT License
1.02k stars 279 forks source link

Hugo server works properly but public folder is not fully functional site #176

Closed Ciberth closed 4 years ago

Ciberth commented 4 years ago

Hi!

Thanks for creating the cool theme. I find myself in a bit of trouble though. I installed and configured hugo extended and got everything up and running locally when I run hugo server -D and browse localhost. My public folder though does not contain the proper stylesheets and what not so setting up CI/CD in a container gives me more or less a broken site (index.html doesn't find css/js/favicon).

Any idea what I'm missing? Do I need to add flags with the hugo extended thing (first time using here)?

The "hugo" command generates a leading '/'.

image

In addition, error message in my docker container that might help as well (as I'm not sure it is the same issue):

Error: ".../blog/themes/meme/layouts/index.searchindex.json:9:1": parse failed: template: index.searchindex.json:9: function "merge" not defined

Big thanks in advance!

reuixiy commented 4 years ago

Have you checked the version of Hugo in your docker container?

Ciberth commented 4 years ago

Well the first issue lies before the docker container I'm afraid. As if I browse locally to public folder I get broken site (so not localhost:1313 from hugo) but the plain html public folder.

I'm using same container as 'registry.gitlab.com/yaegashi/hugo/hugo_extended' following https://gitlab.com/pages/hugo/-/issues/31

Just to confirm: if I do not run hugo server but just hugo to build the static site and browse the public folder everything should work properly right? Or am i having a flaw in my reasoning? :)

Thanks for quick feedback @reuixiy

reuixiy commented 4 years ago

No problem. If you want to make your site browsable from a local file system, just enable relativeURLs, see https://gohugo.io/content-management/urls/#relative-urls

Ciberth commented 4 years ago

Hi, tried that but it didn't seem to work either (locally) I actually have set up pages to test things out and the deployed version was at first the same but after changing relative-urls it seems to work with trenton/hugo-extended container.

TLDR: it works in container, not locally (maybe windows related issue) but that's ok as it works with hugo server locally.

Thanks for the feedback and all the work on the cool theme!