Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc4bd663

Browse files
author
root
committed
support dynamic image on each blog post
1 parent85d8c7f commitc4bd663

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

‎README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ bigimg | Include a large full-width image at the top of the page. You can
254254
comments | Only applicable if the `disqus` parameter is set in the `_config.yml` file. All blog posts automatically have comments enabled. To enable comments on a specific page, use `comments:true`; to turn comments off for a specific blog post, use `comments: false`.
255255
social-share | If you don't want to show buttons to share a blog post on social media, use `social-share:false` (this feature is turned on by default).
256256
share-img | If you want to specify an image to use when sharing the page on Facebook or Twitter, then provide the image's full URL here.
257+
image | If you want to add a personalized image to your blog post that will show up next to the post's excerpt and on the post itself, use `image:/path/to/img.png`.
257258
js | List of local JavaScript files to include in the page (eg. `/js/mypage.js`)
258259
ext-js | List of external JavaScript files to include in the page (eg. `//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.2/underscore-min.js`)
259260
css | List of local CSS files to include in the page

‎_includes/nav.html

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,15 @@
3737
</ul>
3838
</div>
3939

40-
{% if site.avatar %}
40+
{% if page.image %}
41+
<divclass="avatar-container">
42+
<divclass="avatar-img-border">
43+
<ahref="{{ site.url }}">
44+
<imgclass="avatar-img"src="{{ page.image | prepend: site.baseurl | replace: '//', '/' }}"/>
45+
</a>
46+
</div>
47+
</div>
48+
{% elsif site.avatar %}
4149
<divclass="avatar-container">
4250
<divclass="avatar-img-border">
4351
<ahref="{{ site.url }}">

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp