Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#16920 closed bug (no change required)

Page rendering error on Haiku Website

Reported by: jt15s Owned by: waddlesplash
Priority: normal Milestone: Unscheduled
Component: Website/www.haiku-os.org Version: R1/beta2
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

I recently created a page at https://haiku-os.org/community/getting-involved/promotion detailing Haiku's promotion efforts, only to be presented with the following error upon loading the page' UNABLE TO RENDER PAGE (type=single,community, name=Promotion). Contact a system administrator, or file a bug report.

I would really appreciate it if someone helped to fix the issue!

Change History (10)

comment:1 by humdinger, 3 years ago

I don't know if this is the issue, but your page has the header enclosed in "---" while it's normally "+++". Try with:

+++
type = "article"
title: "Promotion"
date: 2021-04-14T15:16:45+10:00
tags = []
+++

And maybe add some tags while you're at it and insert an emtpy line above #### General Users and above the bullit list, just in case...

comment:2 by humdinger, 3 years ago

Also, to get a line-break in markdown, you need to add a couple of spaces after the first paragraph.
There is a reason all other pages there use HTML... :)
BTW, I use CuteMarkEd to check markdown texts.

comment:3 by jt15s, 3 years ago

Thanks for the tips, I'll try it out and see what happens ;)

comment:4 by jt15s, 3 years ago

Just opened a PR with the changes you suggested, fingers crossed this works!

comment:5 by madmax, 3 years ago

BTW, if you want to test, just install the site builder and type hugo server. Even if it may not be the exact same version and configuration, that builds the pages and starts a local server, with live changes as your save sources, and may show more detailed errors.

[madmax@localhost website]$ hugo server
Built in 42620 ms
Error: Error building site: "/home/madmax/src/haiku/website/content/community/getting-involved/promotion.md:2:1": unmarshal failed: Near line 1 (last key parsed ''): bare keys cannot contain ':'

Probably not very helpful unless you already know your stuff, but something about keys and colons, and I see two values assigned with '=' and the other two with ':'. Let's change all to '=' and see:

[madmax@localhost website]$ git diff content/community/getting-involved/promotion.md 
diff --git a/content/community/getting-involved/promotion.md b/content/community/getting-involved/promotion.md
index 47b8865..e3b26a4 100644
--- a/content/community/getting-involved/promotion.md
+++ b/content/community/getting-involved/promotion.md
@@ -1,7 +1,7 @@
 +++
 type = "article"
-title: "Promotion"
-date: 2021-04-14T15:16:45+10:00
+title = "Promotion"
+date = 2021-04-14T15:16:45+10:00
 tags = []
 +++
 
[madmax@localhost website]$ hugo server

                   |  EN   
-------------------+-------
  Pages            | 3285  
  Paginator pages  |  312  
  Non-page files   |   57  
  Static files     | 2582  
  Processed images |    0  
  Aliases          |  913  
  Sitemaps         |    0  
  Cleaned          |    0  

Built in 53269 ms
Watching for changes in /home/madmax/src/haiku/website/{content,data,static,themes}
Watching for config changes in /home/madmax/src/haiku/website/config.toml
Environment: "development"
Serving pages from memory
Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender
Web Server is available at http://localhost:1313/ (bind address 127.0.0.1)
Press Ctrl+C to stop

That works, the site builds and the page loads. Now the really difficult part, which is content, I haven't checked :-)

comment:6 by jt15s, 3 years ago

Ah, so that was the issue all along! Thanks so much for helping to investigate for me, I really appreciate it!

comment:7 by humdinger, 3 years ago

Resolution: no change required
Status: newclosed

You know, all this could have been avoided had you used the ./scripts/newpost.sh as suggested in the ReadMe at https://github.com/haiku/website ... :)

comment:8 by jt15s, 3 years ago

Isn't that script for a new blog post, though? It creates a new post in the blog folders. And to generate the file, I used the "hugo new" command from the Hugo executable. Anyways, I must have done something wrong along the way haha - I'll be sure not to make that mistake in future!

comment:9 by humdinger, 3 years ago

Yes, that's the script for a new blog post. I meant to have run that initially, when you first created your 'new blog post'.
I don't know in how far you can use hugo directly for this, as it's not available for Haiku.

comment:10 by humdinger, 3 years ago

Sorry, I forgot that yours was a regular page, not a blog post. In any case, the script should work the same, but you'll have to move the created file of course.

Note: See TracTickets for help on using tickets.