Simple Blog Post cannot load hero image & "Invalid date"?
gokacinlar opened this issue · 6 comments
Hi. I was trying to build a simple blog with bun create nue@latest
command but when I add another "blog-name.md" into the "posts" section, hero image of the post never shows up and date cannot be displayed. Its content appears but hero & date never works. Here's a preview:
The content are exactly the same (its from the example blog posts I'm using that comes with Nue) with different names, one fails to work which is the file I created.
I'm in a Windows environment, running Nue in WSL2.
Hey @gokacinlar.
Do you maybe have a simple reproduction? It would probably help, to have a small repository or zip with your changes, or a short description, what exactly you modified.
Maybe you can also try to remove the generated .dist
directory and rerun nue, to see if that helps.
Hello @nobkd.
Maybe you can also try to remove the generated
.dist
directory and rerun nue, to see if that helps.
Unfortunately, this doesn't work. Here's the project I've been working on.
I've changed nothing serious in .yaml files, just added a {new Date().getFullYear()
} to footer.
Hey, I found the issue.
One file contains CRLF line endings, the other only LF.
The file with CRLF (\r\n
) line endings fails.
I suspect, you copied the content of the first file to the second one, and your editor saved the new file with the Windows style line endings.
I will try to create a PR, that fixes this.
For now, you'll have to ensure, your editor saves your files with LF (\n
) line endings.
Can you confirm, that if works with lf
line endings?
Hi @nobkd. I tested it this morning using Nano in WSL2 and now it works.
In VSCode, you can choose whether you want to use CRLF or LF in bottom bar, this also works:
Good to hear. Thanks for testing :)