How to group and link content

Hi everybody,

I started migrating my Drupal website to Hugo. I successfully converted the pages but am struggling with the structure. Most of my content is bike trip reports, each report consisting of an overview page and one page per trip day. Requirements are:

  • The overview page should contain a list of links to the day pages and each day page should link to the page of the following day (optionally a link to the previous day).
  • Only the overview page should appear in lists, such as home or site/categories.
  • The pages for one trip should be stored together in a dedicated subdirectory
  • It should be possible to generate a list of the day pages in the subdirectory.

I am not asking for a full featured solution but for some hints in which direction to look. I currently use the MemE theme but would switch to another theme if it would make the task easier.

Thanks
Ray66

Structure
content/
ā”œā”€ā”€ trips/
ā”‚   ā”œā”€ā”€ trip-1/
ā”‚   ā”‚   ā”œā”€ā”€ day-1/
ā”‚   ā”‚   ā”‚   ā”œā”€ā”€ image-1.jpg
ā”‚   ā”‚   ā”‚   ā””ā”€ā”€ index.md
ā”‚   ā”‚   ā”œā”€ā”€ day-2/
ā”‚   ā”‚   ā”‚   ā”œā”€ā”€ image-2.jpg
ā”‚   ā”‚   ā”‚   ā””ā”€ā”€ index.md
ā”‚   ā”‚   ā”œā”€ā”€ day-3/
ā”‚   ā”‚   ā”‚   ā”œā”€ā”€ image-3.jpg
ā”‚   ā”‚   ā”‚   ā””ā”€ā”€ index.md
ā”‚   ā”‚   ā”œā”€ā”€ image-a.jpg
ā”‚   ā”‚   ā””ā”€ā”€ _index.md
ā”‚   ā””ā”€ā”€ trip-2/
ā”‚       ā”œā”€ā”€ day-1/
ā”‚       ā”‚   ā”œā”€ā”€ image-4.jpg
ā”‚       ā”‚   ā””ā”€ā”€ index.md
ā”‚       ā”œā”€ā”€ day-2/
ā”‚       ā”‚   ā”œā”€ā”€ image-5.jpg
ā”‚       ā”‚   ā””ā”€ā”€ index.md
ā”‚       ā”œā”€ā”€ day-3/
ā”‚       ā”‚   ā”œā”€ā”€ image-6.jpg
ā”‚       ā”‚   ā””ā”€ā”€ index.md
ā”‚       ā”œā”€ā”€ image-b.jpg
ā”‚       ā””ā”€ā”€ _index.md
ā””ā”€ā”€ _index.md

Example

git clone --single-branch -b hugo-forum-topic-38429 https://github.com/jmooring/hugo-testing hugo-forum-topic-38429
cd hugo-forum-topic-38429
hugo server
1 Like

Hi Joe,

many thanks, this is exactly what I am looking for! Now I will adapt my migration script to this content structure and integrate the layouts to the theme of my site. I will give feedback when I am finished.

Ray66

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.