My question is simple, I think, but in spite of my efforts, I could not figure it out.
I want to move everything at the root (/) under the URL /articles. (haven’t succeeded)
Create a static static/index.html file which gets copied to create public/index.html
I did figure out how to sort-of achieve this using a hack: $ hugo -d public/articles -b http://foo.bar/articles,
and dropping in my own index.html under public, and then just serving public using Caddy.
But it is really a hack, and breaks using hugo serve to do development, which is a big loss.
Current situation: themes/bare/layouts/index.html creates -> public/index.html
Desired situation:
Everything under http://foo.com/ is now under http://foo.com/articles themes/bare/layouts/index.html creates -> public/articles/index.html static/index.html gets copied -> public/index.html
Any help or pointers on how to achieve the Desired situation are appreciated.
@jmooring Joe, thank you so much for the help!
One last question.
I do need to move the current homepage, which lives at ./themes/bare/layouts/index.html to another URL, say /articles,
how would I do that? It just defines two blocks using 'define “xxx” ’
I’m not clear on what you’re trying to achieve, nor do I understand the changes that you’ve made to your site since the last commit to your repository.
You might look at predefined front matter variables, specifically url. You would set this in an _index.md file corresponding to the list template.
Or maybe you just need to create a list template that conforms to Hugo’s lookup order.