Closed wasserman closed 11 months ago
Hi @wasserman - I'm sorry to hear you're experiencing issues.
I tried replicating the issue by:
hugo new site <site_name>
/themes
hugo.toml
hugo new content posts/my-first-post.md
and setting draft = false
hugo new content about/about.md
and setting draft = false
hugo server
That said, everything built and ran fine for me. Would it be possible to upload your project to GitHub so I can clone the repository and take a closer look? That might help me troubleshoot a bit better. :)
I'm experiencing this issue as well. Things worked well for me when I was using the content/about/about.html location. However, when I wanted to add images to the page bundle, I settled on content/about/index.md. Though another similar, stand-alone (non-post) page worked, I couldn't get About to show up.
I wound up adding a hack to menu.html if eq (lower $menu_item.Name) "about"
because I couldn't figure out what was special about the About page.
Thank you for helping to report this, @tehpola. It gives me more data to work with.
As you noted, the "About" page is a little different. This is because I've created a custom layout for it (i.e. pages contained in the /content/about/..
directory). Unlike other single pages, the "About" page does not display the authorship date, comments, or a table of contents. The code for it can be found here.
With your help, I did find an issue in the custom layout that I've fixed. So it should work for "About" pages located in either of these locations:
/content/about/about.md
/content/about/_index.md
Note: It will not work if the page is located at:
/content/about/index.md
I also created this bare bones repo to help with troubleshooting. Once you clone it, you'll need to also clone the Poison theme into /themes
, then just run hugo server --disableFastRender
.
Hopefully that helps! Please let me know if you experience any issues and we can troubleshoot further.
Thanks @lukeorth. I've been out of town on a different device, but I do plan to test this out when I return tomorrow to validate my configuration and validate your update.
@lukeorth I was able to confirm that everything is working after testing with your bare bones repo and then applying the same config to my working copy of my blog.
FYI - My Hugo copy is using the default of toml for the front matter. The layout mode isn't valid and it fails to compile.
+++
title = 'About'
date = 2023-10-27T05:24:41-05:00
draft = false
layout = single
+++
About me.
The error is as follows:
Error: error building site: assemble: "/path/to/my/hugo/stuff/poison_issue_147/content/about/about.md:5:10": unmarshal failed: toml: incomplete number
I am new to Hugo so I don't know where Hugo ends and Poison begins. Your repo is using yaml for the front matter and I'm happy to move to that format. I just build pages using hugo new content ...
so I believe I just need to update my archetype config, but I wanted you to be aware in case this is something that was missed and easy to fix for the next new user.
Thank you for taking the time to look into this. I'm looking forward to building a blog with Hugo and Poison.
In TOML it needs to be layout = "single"
as it doesn't support "bare" strings like YAML.
@lukeorth Is there a particular reason this doesn't work when using /content/about/index.md
?
I'm new to Hugo and trying to wrap my head around sections. It seems to me that using index.md
should work from Hugo's perspective. What am I missing?
With your help, I did find an issue in the custom layout that I've fixed. So it should work for "About" pages located in either of these locations:
1. `/content/about/about.md` 2. `/content/about/_index.md`
Just letting you know that 1. is not working. Only 2. works
I'm using Hugo on Ubuntu via snap and I can't get the
About
page to show up on the left bar despite including it in the menu (using your exact sample config) and creating a page through two different attempts, both with and withoutlayout: single.
I even cloned your demo site to see if that worked but got shortcode not found errors, but even by just looking at your configs I couldn't sort out what I was doing wrong with my attempt for my own site.
Is this something 119 compatibility or do you have any idea what I am doing wrong?
Thanks!