Ming Di Leom

Results 68 comments of Ming Di Leom

With a compression plugin like [hexo-yam](https://github.com/curbengh/hexo-yam). How to test: ``` diff package.json - "hexo-server": "^1.0.0" + "hexo-server": "curbengh/hexo-server#pre-compressed", + "hexo-yam": "^3.1.0" ``` ``` diff _config.yml +server: + pre_compressed: true ```...

not compatible with https://github.com/hexojs/hexo-server/pull/111 yet --- fixed https://github.com/hexojs/hexo-server/pull/100/commits/40fe06df25e5d914292e9dcd2743721d6dbf7948

@mygu I recently worked on [`encodeURL()`](https://github.com/hexojs/hexo-util/pull/77) with support of [anchor](https://github.com/hexojs/hexo-util/pull/85). In the example that you gave, what is the expected value for `h2 id`? should it be, ``` html ......

I don't think encodeURI() can be added to slugize, otherwise `hexo new post "散列算法"` will result in the following front matter in the post, ``` yml title: %E6%95%A3%E5%88%97%E7%AE%97%E6%B3%95 ``` In...

> config.url = config.url.replace(/\/+$/, ''); that failsafe is not available in Hexo API (e.g. when use in a plugin's unit test). It is also not ideal in use cases such...

> no 301 will be returned I was referring to `url: http://example.com/blog/` example. `load_config.js` removes the trailing slash, so requesting `http://example.com/blog` will be 301-ed to `http://example.com/blog/` (in GH Pages case)....

Fixed invalid protocol (`https:/example.com/index.html`) raised by @jiangtj --- `full_url_for('/')` now simply returns `config.url` (note: this is different from previous behavior): ```js const hexo = { config: { url: 'http://example.com' }...

This PR makes it flexible to any combination of the following configs: ``` yml url: http://yoursite.com/child root: /child url: http://yoursite.com/child/ root: /child url: http://yoursite.com/child root: /child/ url: http://yoursite.com/child/ root: /child/...

> I'm not sure if this PR is being too lenient on invalid config. Hexo currently is already [pretty lenient](https://github.com/hexojs/hexo/blob/17ee23fa181bcc2c3b47eba5b345762aef1eac36/lib/hexo/load_config.js#L34-L35) about it. This PR may break `{{ url + path...