Conversation
| return this.rule.replace(rParam, (match, name) => data[name]); | ||
| return this.rule.replace(rParam, (match, name) => { | ||
| if (['permalink', 'path'].includes(name)) { | ||
| throw new Error('Invalid permalink setting!'); |
There was a problem hiding this comment.
I think this is not the best change, it makes hexo-util and hexo being coupled. (Although probably no one uses hexo-util except hexo)
Lines 404 to 405 in ec7fd7c
There was a problem hiding this comment.
I've updated the patch to disallow the case where the parameter is a getter. Please take a look to see if this is better.
There was a problem hiding this comment.
I've updated the patch to disallow the case where the parameter is a getter. Please take a look to see if this is better.
This may affect :tags and :categories, but maybe no one will use these two parameters because they can't be overridden by front-matter
There was a problem hiding this comment.
Thank you for your work. it looks better than before
There was a problem hiding this comment.
:tags or :categories looks like an array
Fix hexojs/hexo#5263