Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad date value when creating a page #7

Closed
dkm opened this issue Nov 25, 2020 · 4 comments
Closed

Bad date value when creating a page #7

dkm opened this issue Nov 25, 2020 · 4 comments

Comments

@dkm
Copy link

dkm commented Nov 25, 2020

New user here... Simply trying to create a simple site:

$ mkdir new-site
$ cd new-site
$ blades init
Enter the basic site info
Name: Un test
Author: Rien
$ blades new
Enter the basic info of the new page
Title: toto
Slug (short name in the URL): toto
Path (relative to the content directory):
"content/2020-11-25-toto.toml" created
Set the EDITOR environment variable to edit new pages immediately
$ blades build
Error parsing content/2020-11-25-toto.toml: invalid type: string "2020-11-25", expected a TOML datetime for key `date` at line 3 column 8

content/2020-11-25-toto.toml:

title = "toto"
slug = "toto"
date = "2020-11-25"

content = """
Put your *possibly markdowned* content here.
"""

Removing the date altogether or correcting it (removing enclosing ") fixes this error, but still can't get the site to build:

$ blades build
Template file section.html not found.

I think I've read the doc but can't figure out exactly what I'm doing wrong. I can provide some PR for adding documentation if needed, but don't know what to add :D

@grego
Copy link
Owner

grego commented Nov 25, 2020

There was a mistake in the new page template, fixed in commit 373c3cb.
Date should be of TOML DateTime type. Removing the quotation marks around it will make it work.

@dkm
Copy link
Author

dkm commented Nov 25, 2020

Thanks, that fixes the date error. But I still have the other issue about not finding the section.html. Is there something else to do ?

@grego
Copy link
Owner

grego commented Nov 26, 2020

You either need to use some theme that provides section.html, or provide one yourself, or set the template variable to some other file.

Blades comes with no pre-built theme. Maybe it should show some warning about it.

@dkm
Copy link
Author

dkm commented Nov 26, 2020

Maybe a note on this would be good. At least not to lose people like me trying to see if the tool fits their need.
Thanks for the fix !

@dkm dkm closed this as completed Nov 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants