Add another section to Cupper theme

Hi @zwbetz
If I want to add another section, what should I do? Can you help me?
I tried to add a Reading section in config.yaml

  post: /:filename/
  reading: /:filename/

    - name: Home
      url: /
      weight: 1

    - name: Blog
      url: /post/
      weight: 2

    - name: Reading
      url: /reading/
      weight: 3

    - name: Tags
      url: /tags/
      weight: 4

    - name: About
      url: /about/
      weight: 5
    - name: RSS
      url: /index.xml
      weight: 6

I create in /content/reading/
Then I created a folder and first post in /content/reading/
1/ I can read in hugo server
but I get 404 error on my github page.

2/ And also, TOC only shows in post section (content/post). It doesn’t show in reading section (/content/reading)

I’m sorry if I used any wrong technical words here. I’m still learning to use Hugo.
Thank you

There is a single template for the post section, see This template is what renders single pages.

You must also make a single template for the reading section. You could do this by making a file at layouts/reading/single.html and then pasting in the contents of the link above.

There are more DRY ways to do this, but this will get it working for now.

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