okkur / syna

Highly customizable open source theme for Hugo based static websites

Home Page:https://syna.okkur.org/demo/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Contents of all pages is displayed on main page

symlevelbamboo2 opened this issue · comments

Is this a BUG REPORT or FEATURE REQUEST?:
bug

What happened:
I've tried add new page in the contents folder of the syna-start example as described in the documentation. But hugo does not create page in the output but displays its contents on the main page. Maybe I'm doing something wrong?

How to reproduce it (as minimally and precisely as possible):

  1. Clone the syna-start example: git clone --recurse-submodules https://git.okkur.org/syna-start
  2. cd to the syna-start directory
  3. Create content/my-page directory
  4. Create content/my-page/index.md file with the following contents:
+++
title = "My Page"
date = "2020-08-30"
+++
  1. Create content/my-page/content.md file with the following contents:
+++
fragment = "content"
date = "2020-08-30"
+++

This is my page
  1. Start hugo server

After I open localhost:1313 in my browser, I see contents of the my-page ("This is my page" text) on the main page at the top before the navigation bar. If I try open localhost:1313/my-page then I get the "404 page not found" error.

Note: The same happens with about page. I see all contents of the about page on the main page, and if click "About Us" in the main menu then I get the "404 page not found" error.

Environment:

  • Syna Theme version: 0.17.3
  • Hugo version: v0.74.3-DA0437B4/extended linux/amd64 BuildDate: 2020-07-23T16:30:30Z

This seems like a bug.
Rename content/index.md to content/_index.md, that should resolve the issues.
Happy for a PR, if you want to fix this in the main repo as well before we have are able to get to this.

Renaming content/index.md to content/_index.md solved all issues. Thank you!
I've created PR #41 in the syna-start repo.