Redo structure http://x.com/ -> http://x.com/articles

Hello! Hugo is impressive!

My question is simple, I think, but in spite of my efforts, I could not figure it out. :frowning:

  1. I want to move everything at the root (/) under the URL /articles. (haven’t succeeded)
  2. 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.

My site repo: https://github.com/cameron-elliott/cameronelliott.com
Using this theme: https://github.com/orf/bare-hugo-theme

To use a static home page instead of a home page generated by Hugo, place the following in config.toml:

config.toml:

disableKinds = ["home"]

Then place your static home page (index.html) in the static/ directory. See https://gohugo.io/getting-started/configuration/.

To change the URL structure, configure permalinks.

@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” ’

Thank you,
Cameron

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.

You could either move index.html template to _default/list.html or articles/list.html.