I’ve been trying to create a simple academic personal website. I first tried the Hugo/Academic-Kickstart template, which I used in a first github repository. However, I couldn’t get it to edit any other than the starting page, and there was no helpful answer from its developer for months.
I thus decided to try the AcademicPages site template, and forked it into a new repository. From the Build Settings of my site (tudorpopescu.netlify.app), I changed the repository name, and rebuilt the website. However, probably because the wrong build command was used (“hugo --gc --minify -b $URL” was there from the previous time), this led the Netlify App to issue these build errors.
I assume all that is needed to have my site rebuilt using the code in the new repository is for me to indicate the correct build command - however, none was indicated in the guidelines of the AcademicPages template.
Would really appreciate any help with this, thanks!!
You can set your build command to
bundle exec jekyll build this will probably build your site into a public folder and then you can choose your publish folder on netlify to be public. It looks like you dont have a .toml file so just edit it in the netlify UI under Build & Deploy
Thanks Aaron. I’ve rebuilt the site using that command, but it failed again, this time with these errors, which mention that Deploy directory ‘public’ does not exist.
I’m new to this stuff so am not sure how it works, but I tried to create an empty folder ‘public’ in my Github repository before reissuing the build command. However, I saw no option in Github to create a new folder?!..
Also, is it not a security issue to have my “publish directory” set to “public” in the Netlify build settings?
Run the build command locally, see what folders it creates, inspect them, and choose which folder to set as your publish directory.
And no, to your last question. I did some quick reading which suggested the command will build to a public folder but it may create a build folder etc, run it locally and see.
The build completed, look here. It shows your where it was built to.
So as a guess it could be _site or repo/_site that you want to set as the publish directory. Play around with it.
Changed the publish dir to _site, and it seems to’ve worked. Thanks again!
Sorry to come back to this, but it might be related: after updating the contents of the landing page of my site (_pages/about.md) and rebuilding as per the above (via
curl -X POST webhook), that page shows as unformatted text, and the avatar image also does not show:
I suspected some syntax error like an unclosed quote or something in the _config.yml or in about.md (as in this similar thread), but after checking all files in my repo, I"m at my wit’s end what else to try!
It might be telling that when I try to load my site from the tudorpopescu.github.io URL (instead of tudorpopescu.com), I get a “404 There isn’t a GitHub Pages site here.” error, whereas other websites based on the same academicpages template (e.g. this guy’s) load fine.
Unfortunately there is no more support from the forked repo itself, so am not sure where else to get help. Thanks again if you can spare a bit more time for this!
You’re referencing CSS files from a site on GitHub. We’re Netlify, not GitHub!
They’ll be referenced either using a URL (or similar variable) in Jekyll which should no longer point to the GitHub site or in-line within the code.
Thanks! I admit to be confused as to how I am meant to use GitHub together with Netlify! This was proposed in the academic-kickstarter guide that I had original used, but perhaps it’s better to just use Github Pages, as long as I’m going to use Github hosting?! Otherwise, it’s unclear how I can reference those CSS files correctly.
I’ve now renamed my Github repo so that it is the same as the Github username. This seems to let the images and CSS styles load on the homepage, even though, confusingly, there is no (as per the netlify PublishDir) “_site” folder in the root of my repo.
Also, where can I access the log that you screenshoted? In my netlify dashboard I see no errors upon building.
I also have the problem that a warning icon is displayed in the browser about the site being not secure:
The Chrome documentation suggests this means “something is severely wrong with the privacy of this site’s connection”. In the repo’s settings, the “Enforce HTTPS” is already enabled, which makes sense, since the warning appears only when I navigate to the site using my custom URL (tudorpopescu.com), and not when I use the repo URL (https://wildetudor.github.io/).
I thus went to the Netlify settings, under Domains|HTTPS, where I get “We could not provision a Let’s Encrypt certificate for your custom domain.” when I try to provision a certificate.
How can I secure my website? Thanks again!
Sorry to be slow to get back to you, @tudorpopescu!
We can’t really advise you on how to “combine” GH pages and Netlify. The usual way people “use both” is to use one or the other - you can use GitHub itself with Netlify and that is the usual path - we pull your code from the repo, build and deploy it. But mixing GitHub pages and Netlify is not something that we’d consider a best practice or be able to offer advice on.
So if you want to migrate to “just netlify”, we would advise you to remove all references to wildetudor.github.io from your code, build here, and make sure all your files are in the deploy here. I couldn’t find that reference when I searched at GitHub (https://github.com/wildetudor/wildetudor.github.io/search?p=2&q=github.io) but it is clearly getting in there somehow - perhaps via the academicpages setup which we also aren’t experts on? Not sure.
re: second question: Seems like the SSL situation has been resolved in the meantime; your SSL certificate is complete and I do not see the problem you showed in the small screenshot. Do you still experience that?
Hi, thanks for your reply and sorry to also be even slower in getting back!
I think I was confusing GH with GHPages, and that currently I am in fact using Netlify in combination not with the latter but with the former, as you say is indeed common.
Would you be able to advise how I can use GH (or GHPages) only also for building and deploying? I guess that amounts to replacing Netlify with GH (or GHPages), but I’m not sure where exactly I’d have to make that replacement.
I think this would simplify things for me to use just GH services for both hosting and building&deploying. For instance, right now clicking on links within my website changes the URL to a GH one (e.g. wildetudor.github.io/publications/, instead of the base URL remaining my custom one), which is probably because of some misconfiguration somewhere. I realise however that this might not be your remit to help me with. Thanks again nonetheless!
hi @tudorpopescu, as Netlify support staff, assisting you with migrating your site to GH pages isn’t something we can assist with! It is possible someone else from the wider community might have ideas for you, but you might get a better response if you seek out input from a GitHub Pages specific support resource! good luck.
Alright, thank you, will do