-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
fix(url_for): some improvement for url_for
#307
Conversation
Property 'fromEntries' does not exist on type 'ObjectConstructor' Property 'matchAll' does not exist on type 'string'
- sometimes `postinstall` not triggered when using `yarn` v3
chore(url_for): make `options` as optional - keep `empty object` for default options - sometimes i saw someone plugin fill `options` null, to prevent useless errors we must give options fallback to `empty object`
@SukkaW review pls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything else LGTM!
highlight.js no need build everytime
url_for
trailing_index: true, | ||
trailing_html: true | ||
}, config.pretty_urls); | ||
const prettyUrlsOptions = Object.assign( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can keep the original code style here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like he used prettier. If eslint doesn't fail, I guess it doesn't matter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
url_for
url_for
[skip ci] Co-authored-by: Sukka <[email protected]>
chore: some improvement for
url_for
options
as optional with default value asempty object
options
- https://github.com/next-theme/hexo-theme-next/blob/acca4e83747b168e90815945f58f982b1d14eac5/layout/_layout.njk#L10options
fallback to anempty object
url_for
theoptions
given asnull
, prevent useless error giveoptions
fallback to anempty object