Verify the configuration file
- Dominant language
- TypeScript
- Stars
- 41.8k
- Forks
- 41
- PR merge metrics
- No merged PRs in 30d
Description
## Check List
Please check followings before submitting a new feature request.
- [x] I have already read [Docs page](https://hexo.io/docs/)
- [x] I have already searched existing issues
## Feature Request
> ## Expected behavior
> Verify the configuration file of the theme, when our configuration changes, or the user fills in the wrong content, wecan remind the user to modify.
>
> I try to use ajv check
>
> * https://github.com/ajv-validator/ajv
>
> ```shell
> yarn add hexo-theme-cake
> # modify `theme` to `cake`
> # exec check. see impl: https://github.com/jiangtj/hexo-theme-cake/blob/master/lib/console/check.js
> hexo check
> ```
>
> But the problem is that we need to maintain a huge json-schema. Even the compressed next theme (cake), config file line about 140. ~The schema has 276 lines. [schema.json](https://github.com/jiangtj/hexo-theme-cake/blob/master/lib/console/schema.json).~ The schema has 160 lines. [schema.yml](https://github.com/jiangtj/hexo-theme-cake/blob/master/lib/console/schema.yml).
>
> Do you think? @stevenjoezhang
>
> ## Example
> When I fill in a wrong value
>
> 
_Originally posted by @jiangtj in https://github.com/next-theme/hexo-theme-next/issues/20_
Contributor guide
Assessment
This issue has not been assessed yet.