New to Hugo but have built a small site that is actually documentation for a Wordpress site. I was hoping that I could then export this into a local folder that I could send to the client as a local site they can use in their browser alongside the Wordpress site.
So, I need the Hugo site to be completely location agnostic and have all internal links relative to the root folder, wherever it ends up on the clients computer. I’ve tried removing/editing baseURL, but I’m pretty confused - could anyone give me a shove in the right direction? Thanks.
You might also look into: <base href="{{ .Site.BaseUrl }}/"> in <head>. I’ve not tried this, but it might be a way to specify.
I’m a newbie to Hugo, but one thing I know is, right now there are a few URL-related discussions & tweaks going on, in the development version of Hugo. FYI.
Thanks for the replies - I’ll have a look into canonifyurls and what you’ve suggested RickCogley. I suspect that as I’m only running half a dozen pages I’ll end up just exporting the site and then editing the internal links for now. I know that is weak, but I haven’t really got my head round Hugo yet and I just need this to work.
bjornerik - its a shame if its not possible. Whilst I can understand that Hugo has a lot of power in building large static sites, for me it also seems like a perfect solution for quickly creating documentation. At the same time, I understand that creating a website full of relative links isn’t normally that useful - I should probably look at hosting it in a subdomain of the Wordpress site.
But it would cool if someone added that feature – it is an open source project, so all is welcome to chime in. I build the things I need, others build the things they need. In total it gets good.
I believe the fastest way to get fully relative links is to do something similar to what the canonifyUrls feature i doing today.
Cool, thanks for the input, I will give it a go
Also, I don’t mean to come across as moaning/ungrateful - I’m really not! - I’d definitely chime in if I had any semblance of the skills required. Really appreciate the tools that are here and your help in understanding them a bit more, so thank you.
Thanks for putting this together - I really appreciate your time. Unfortunately, I think I am too much of a luddite to take advantage of it - I’m not proficient with Git at all, but I think I’ve got that branch installed locally now. However, I’m not confident in what’s running or what results I’m looking for, so I can’t give you any decent feedback I’m afraid (and that’s having spent the past 2.5 hours tinkering with it all). Sorry