Skip to content

Commit

Permalink
chore: treat url_for as hexo internal function
Browse files Browse the repository at this point in the history
  • Loading branch information
dimaslanjaka committed May 13, 2023
1 parent 5000810 commit 41b527d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/url_for.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ interface url_for_options {
* const Hutil = require('hexo-util')
* console.log(Hutil.url_for.bind(hexo)('path/to/file/inside/source.css')); // https://example.com/path/to/file/inside/source.css
*/
function urlForHelper(path = '/', options: url_for_options | null = {}) {
function urlForHelper(this: import('hexo'), path = '/', options: url_for_options | null = {}) {
if (/^(#|\/\/|http(s)?:)/.test(path)) return path;

const { config } = this;
Expand Down

0 comments on commit 41b527d

Please sign in to comment.