-
-
Notifications
You must be signed in to change notification settings - Fork 5k
Description
The original discussion is at #2471
Here is my proposal:
- We should not treat
hexo-theme-prefixed package as a hexo plugin. See @tomap 's commit: master...tomap:feature/themeAsPackagediff-3d0f701643104f3b0e388b8f6a9a7f3eR38 - Users are still required to specify their theme's name in
_config.yml, because... - Hexo will read
themes/[name]directory first, then searchhexo-theme-[name]directory undernode_modules. It means the theme underthemesdirectory should have higher priority. In this way no extratheme_from_npm: trueconfiguration is needed. theme_configin_config.ymllooks good, but it is better to have a separate theme config. We could introduce_config.[name].yml. Currently,theme_confighas higher priority than_config.ymlunder theme directories. After bring up_config.[name].yml, I suggest thetheme_config in _config.yml > _config.[name].yml > _config.yml under theme directorieswhich will retain highest priority fortheme_config.Also, we need to fix the issue that some plugins can not read theme config fromtheme_config: Feature Request: Install theme through npm install #2471 (comment)
IMHO, we could easily bring up this feature without any Breaking Changes: the theme structure, current configurations and setup will not be affected. Yes, I mean we can even bring up this feature during Hexo 4.x development.
cc @hexojs/core @jiangtj
dailyrandomphoto, EdisonJwa, giuem, paulkre, NoahDragon and 5 moretomap, paulkre, DeepSpaceHarbor, stevenjoezhang and noraj1v9, SukkaW, giuem and noraj