Open
Conversation
Author
|
新的push解决该issue |
|
刚想提这个,就搜到PR了,坐等合并🤗 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
在themes\fluid\source\img目录下创建名为random的文件夹,并将图片放入其中。
在themes\fluid\scripts\events\lib目录下新增一个名为 random-banner.js 的文件,用于自动配置文章随机横幅图片的功能模块,会根据指定目录下的图片自动生成随机横幅的图片路径列表。
对themes\fluid\layout_partials\header\banner.ejs的模板代码做了针对性修改以适配拓展功能。
在_config.fluid.yml文件中新增了一个相应功能的开关,用于开启/关闭所有页面的随机头图(仅在对应 banner_img 为空时生效),具体如下:
banner:
random_img: true
具体可参考个人博客 https://ruak.github.io 《Hexo-Fluid 功能拓展--banner随机化显示》一文