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

Commitf8b27e0

Browse files
committed
default author name, default author image doesnt work
1 parentf32abad commitf8b27e0

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

‎_layouts/post.html‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ <h2><span class="entry-date date published"><time datetime="{{ page.date | date_
4141
</header>
4242
<divclass="entry-content">
4343
{% if page.author-img %}
44-
<imgsrc="../images/authors/{{page.author-img}}"alt="{{page.author}}"class="author-pic">
44+
<imgsrc="../images/authors/{{page.author-img | default: 'csesoc.jpg'}}"alt="{{page.author}}"class="author-pic">
4545
{% endif %}
4646
<h1class="entry-title"><ahref="{{ site.url }}{{ page.url }}"rel="bookmark"title="{{ page.title }}">{{ page.title }}</a></h1>
47-
<spanclass="entry-date date published updated"><timedatetime="{{ page.date | date_to_xmlschema }}"><ahref="{{ site.url }}{{ page.url }}">{{ page.date | date: "%B %d, %Y" }} by {{site.owner.name }}</a></time></span></span>
47+
<spanclass="entry-date date published updated"><timedatetime="{{ page.date | date_to_xmlschema }}"><ahref="{{ site.url }}{{ page.url }}">{{ page.date | date: "%B %d, %Y" }} by {{page.author | default: "CSESoc UNSW" }}</a></time></span></span>
4848
{{ content }}
4949
<footerclass="entry-meta">
5050
<spanclass="entry-tags">{% for tag in page.tags %}<ahref="{{ site.url }}/tags/#{{ tag }}"title="Pages tagged {{ tag }}"class="tag"><spanclass="term">{{ tag }}</span></a>{% unless forloop.last %}{% endunless %}{% endfor %}</span>

‎_posts/2011-03-10-sample-post.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
layout:post
33
title:Sample Post
4-
author-img:adam.png
4+
author-img:csesoc.jpg
55
description:"Just about everything you'll need to style in the theme: headings, paragraphs, blockquotes, tables, code blocks, and more."
66
modified:2014-12-24
77
tags:[sample post]

‎index.html‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111
{% for post in paginator.posts %}
1212
<articleclass="hentry">
1313
<header>
14-
{% if post.author-img %}
15-
<imgsrc="/images/authors/{{post.author-img}}"alt="{{post.author}}"class="author-pic">
16-
{% endif %}
14+
<!--{% if post.author-img %} -->
15+
<imgsrc="/images/authors/{{post.author-img | default: 'csesoc.jpg'}}"alt="{{post.author}}"class="author-pic">
16+
<!--{% endif %} -->
1717
<h1class="entry-title"><ahref="{{ site.url }}{{ post.url }}"rel="bookmark"title="{{ post.title }}"itemprop="url">{{ post.title }}</a></h1>
1818
<divclass="entry-meta">
19-
<spanclass="entry-date date published updated"><timedatetime="{{ post.date | date_to_xmlschema }}"><ahref="{{ site.url }}{{ post.url }}">{{ post.date | date: "%B %d, %Y" }}</a></time></span><spanclass="author vcard"><spanclass="fn">{{site.owner.name}}</span></span>
19+
<spanclass="entry-date date published updated"><timedatetime="{{ post.date | date_to_xmlschema }}"><ahref="{{ site.url }}{{ post.url }}">{{ post.date | date: "%B %d, %Y" }}</a></time></span><spanclass="author vcard"><spanclass="fn">{{post.author | default: "CSESoc UNSW"}}</span></span>
2020
{% if site.reading_time %}
2121
<spanclass="entry-reading-time">
2222
<iclass="fa fa-clock-o"></i>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp