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

feat: add url_for and relative_url helpers #82

merged 6 commits into from Sep 14, 2019


Copy link

commented Sep 11, 2019

using url_for outside of theme can be a bit awkward.

Currently we need

const url_for = hexo.extend.helper.get('url_for').bind(hexo);
// or
const url_for = require('hexo/lib/plugins/helper/url_for').bind(hexo);

With this PR,

const url_for = require('hexo-util').url_for.bind(hexo);

Similar goal as #81


This comment has been minimized.

Copy link

commented Sep 11, 2019

Coverage Status

Coverage increased (+0.3%) to 96.364% when pulling 2e376ae on curbengh:url_for-relative into 2de7c15 on hexojs:master.

@curbengh curbengh force-pushed the curbengh:url_for-relative branch from 270054f to 2e376ae Sep 14, 2019
@curbengh curbengh requested a review from SukkaW Sep 14, 2019
SukkaW approved these changes Sep 14, 2019
Copy link

left a comment


@curbengh curbengh merged commit 76f3319 into hexojs:master Sep 14, 2019
3 checks passed
3 checks passed
Travis CI - Pull Request Build Passed
continuous-integration/appveyor/pr AppVeyor build succeeded
coverage/coveralls Coverage increased (+0.3%) to 96.364%
@curbengh curbengh deleted the curbengh:url_for-relative branch Sep 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
3 participants
You can’t perform that action at this time.