You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running the latest version. When I'm reading the docs regarding setting modDatetime it says I should set draft: in my frontmatter to draft: first, and that it will trigger the magic
if [ "$draft" = "first" ]; then
However, when I do that I get this error message
Am I missing a step somewhere? Draft is defined as a boolean (i.e. true/false) and anything else will generate that schema error.
I have literally copied/pasted the suggested commands on that page, and everything else with the theme in general seems to be working perfectly fine, so I'm guessing this could be user error on my part, I'm just not sure what part I might have missed.
The one thing I have assumed is a typo I haven't done though, on your blog post/doc it says:
Navigating to the hooks/pre-commit file, we are going to add one or both of the following snippets. I have assumed you mean .husky/pre-commit, as that was the file in the previous instruction. That file btw did have some content before adding snippet from your blog post:
I'm not 100% sure if this is the case.
But by looking at the screenshot error you provided, it's likely to be the problem in ContentCollection validation.
---author: Sat Naing# othersdraft: "false"# instead of (draft: false)# others---
Hey @hellquist, the draft: first is used to set the date times using the git hook, this should be done after you have written it and are wanting it to go live.
The flow should be:
Set the draft to true
Write the content, it can be checked in during this time and will not be visible.
you are happy with the post and are wanting it to go live, you now stop the server and set draft to first
Check in the change
Magic time
———————————————
The magic
the hook will see that the post is marked as first and will clear the modDateTime field and set the pubDateTime to now
It will then set the draft flag to false
Then is then pushed to the repo and when the project is built your post will be visible.
Hi! Thanks for an awesome theme! Really cool.
I'm running the latest version. When I'm reading the docs regarding setting modDatetime it says I should set
draft:
in my frontmatter todraft: first
, and that it will trigger the magicHowever, when I do that I get this error message
Am I missing a step somewhere? Draft is defined as a boolean (i.e. true/false) and anything else will generate that schema error.
I have literally copied/pasted the suggested commands on that page, and everything else with the theme in general seems to be working perfectly fine, so I'm guessing this could be user error on my part, I'm just not sure what part I might have missed.
The one thing I have assumed is a typo I haven't done though, on your blog post/doc it says:
Navigating to the hooks/pre-commit file, we are going to add one or both of the following snippets.
I have assumed you mean.husky/pre-commit
, as that was the file in the previous instruction. That file btw did have some content before adding snippet from your blog post:I have pasted your snippets after that...is that correct?
The text was updated successfully, but these errors were encountered: