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

FR: Install theme's dependencies into the site directory before a build #4453

Closed
2 tasks done
outloudvi opened this issue Jul 31, 2020 · 5 comments · Fixed by #4771
Closed
2 tasks done

FR: Install theme's dependencies into the site directory before a build #4453

outloudvi opened this issue Jul 31, 2020 · 5 comments · Fixed by #4771

Comments

@outloudvi
Copy link

Check List

Please check followings before submitting a new feature request.

  • I have already read Docs page
  • I have already searched existing issues

Feature Request

Some themes (e.g. Hive and Overdose) would require additional renderers (e.g. hexo-renderer-sass) or other npm packages (e.g. jquery) during their build, but currently there is no way for a theme to install them except for asking users to install them manually. If Hexo can install the theme dependencies automatically to the site, installing and changing themes will be easier.

@stevenjoezhang
Copy link
Member

stevenjoezhang commented Jul 31, 2020

but currently there is no way for a theme to install them except for asking users to install them manually

Actually, there are two ways to install dependencies:

  1. Install theme through npm. All the dependencies of the theme will be installed automatically
  2. Use postinstall script in package.json

However, the two themes you mentioned have not been updated for years. You need to contact the maintainer to publish them on npm.

@outloudvi
Copy link
Author

@stevenjoezhang Got it. Thank you for your reply!

@jerryc127
Copy link

i have a same question.
the theme need the hexo-renderer-pug
so i add to the theme‘s package.json

I install the theme use npm.
but i run the hexo, it seen like the hexo not detect the hexo-renderer-pug
image

@SukkaW
Copy link
Member

SukkaW commented Aug 3, 2020

@jerryc127 Further discussion about hexo plugin please join here: #3890 (comment)

@stevenjoezhang stevenjoezhang linked a pull request Oct 8, 2021 that will close this issue
2 tasks
@stevenjoezhang
Copy link
Member

Feature added in #4771

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

Successfully merging a pull request may close this issue.

4 participants