We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
作者,您好!先前在多图展示的问题 #395 上有跟您提过,我想在首页按照目前的效果展示,归档中只展示标题,但内容页按照原样显示。由于新版本的代码在代码高亮部分有问题 #459 ,所以我将作者实现的多图展示的代码扣到了旧有的版本上,目前只修改了归档中的显示效果 (归档),但不知道如何让内容页中原样显示,猜想是不是可以通过修改 group-pictures.js中的groupPicture函数来实现:
group-pictures.js
groupPicture
function groupPicture(args, content) { args = args[0].split('-'); var group = parseInt(args[0]); var layout = parseInt(args[1]); content = hexo.render.renderSync({text: content, engine: 'markdown'}); var pictures = content.match(/<img[\s\S]*?>/g); return '<div class="group-picture">' + templates.dispatch(pictures, group, layout) + '</div>'; }
修改为:
function groupPicture(args, content) { args = args[0].split('-'); var group = parseInt(args[0]); var layout = parseInt(args[1]); content = hexo.render.renderSync({text: content, engine: 'markdown'}); var pictures = content.match(/<img[\s\S]*?>/g); if(is_home()) return '<div class="group-picture">' + templates.dispatch(pictures, group, layout) + '</div>'; else return content; }
但是,在扩展标签中似乎不能使用is_home(),不知道作者是否方便给出一点建议及指导,谢谢您!
is_home()
The text was updated successfully, but these errors were encountered:
这个不好处理
Sorry, something went wrong.
No branches or pull requests
作者,您好!先前在多图展示的问题 #395 上有跟您提过,我想在首页按照目前的效果展示,归档中只展示标题,但内容页按照原样显示。由于新版本的代码在代码高亮部分有问题 #459 ,所以我将作者实现的多图展示的代码扣到了旧有的版本上,目前只修改了归档中的显示效果 (归档),但不知道如何让内容页中原样显示,猜想是不是可以通过修改
group-pictures.js
中的groupPicture
函数来实现:修改为:
但是,在扩展标签中似乎不能使用
is_home()
,不知道作者是否方便给出一点建议及指导,谢谢您!The text was updated successfully, but these errors were encountered: