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

blogDir allows [] #342

Open
rainecheck opened this issue Jun 19, 2023 · 1 comment
Open

blogDir allows [] #342

rainecheck opened this issue Jun 19, 2023 · 1 comment

Comments

@rainecheck
Copy link

While removing the blog from a site, I noticed that there was some inconsistent behaviour with the declaration of blogDir:

Syntax Returns Result
blogDir: "" Error [ERROR] ValidationError: "blogDir" is not allowed to be empty
blogDir: null Error [ERROR] ValidationError: "blogDir" must be one of [string, array]
// blogDir: "" Warning Warn: blogDir doesn't exist: "{snip}/blog".
blogDir: [""] Error [ERROR] ValidationError: "blogDir[0]" is not allowed to be empty
blogDir: [null] Error [ERROR] ValidationError: "blogDir[0]" must be a string
blogDir: [] Success No issues, works fine.

Allowing an empty array but not allowing an empty string or a null string seems like it's not intended.

The use case for me here is to declare indexBlog: false, but thought I'd raise this an a minor issue.

@doraeric
Copy link

Took me a while to find the cause of the message

Warn: `blogDir` doesn't exist: "..."

Google search doesn't index this page somehow.

The solution is given above: set indexBlog: false. This option comes from the theme options

I think it's better to show it comes from this package, so developers can find relevant config.

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