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

Idea: use themes as npm packages #4441

Closed
2 tasks done
jehy opened this issue Jul 25, 2020 · 2 comments · Fixed by #4423
Closed
2 tasks done

Idea: use themes as npm packages #4441

jehy opened this issue Jul 25, 2020 · 2 comments · Fixed by #4423
Labels
duplicate This issue or pull request already exists

Comments

@jehy
Copy link

jehy commented Jul 25, 2020

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

I really liked the idea that hexo plugins are npm packages. But I think that we could apply same approach to hexo themes. Then themes will be easier to update, semantic versioning will be applied, and they will be excluded from version control. Also it would be easier to build themes from source - as npm packages, they will simply have all neccesary dev dependencies.

I already tried this approach on current hexo and it worked with several small hacks:

  1. fork theme you like
  2. add package.json to theme repo
  3. install theme from GitHub as dependency in your blog: "theme-light": "git+https://github.com/jehy/hexo-theme-light.git"
  4. add post install script which adds symlink to package in themes directory: "postinstall": "ln -snf ../node_modules/theme-light themes/light"

I really like how simpler everything bacame after it. Official support for this feature would be great.

Others

@stevenjoezhang
Copy link
Member

This feature will be part of the Hexo 5.0 release. See also #3890 #2471

@stevenjoezhang stevenjoezhang added the duplicate This issue or pull request already exists label Jul 25, 2020
@stevenjoezhang stevenjoezhang linked a pull request Jul 25, 2020 that will close this issue
22 tasks
@jehy
Copy link
Author

jehy commented Jul 25, 2020

Great, thanks!

@jehy jehy closed this as completed Jul 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants