Skip to content

Commit 4d5f586

Browse files
committed
feature: organize images (or more resources) of posts in a centralized place, and use an image util to convert import image in posts.
1 parent af11123 commit 4d5f586

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

_includes/utils/post-image.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
{% capture image_path %}{{ page.date | date: "%Y-%m-%d" }}-{{ page.title }}/{{ include.name }}{% endcapture %}
2+
<img src="{{ image_path | prepend: '/assets/posts/' | absolute_url }}" {% if include.alt %} alt="{{ include.alt }}" {% endif %} {% if include.width %} width="{{ include.width }}" {% endif %} class="post"/>

_posts/2025-06-07-行路难.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ lang: zh-cn
1717

1818
签证官当场拒绝他的时候,并没有使用“Refuse”这个词,就像Z后来二签填写拒签原因时,也没有用这个词一样。那天中午,签证官只是平静地重复了两遍:“对不起,我今天不能批准你的签证申请。”话里却听不出一丝歉意。离开窗口,Z坐在等候区整理文件,却怎么也找不到就拿在手里的护照。Z慌了。局势远比预想更糟,如意算盘落空,计划彻底乱套,临行前的万全准备顷刻作废。他可能回不去了。这天,是他回国的第二天。
1919

20+
{%- include utils/post-image.html name="boat.jpg" alt="A small fishing boat in Victoria Harbor." -%}
21+
2022
Z像断线的木偶,拖着沉重的身躯,强迫自己继续当游客。他沿着英皇道,从北角走到铜锣湾,又原路返回。终于,他在东岸公园坐下了。十一月底的南国依旧温暖,虽是霪雨霏霏、连月不开,却并无阴风怒号、浊浪排空。海面空无一物,寂静得连风声都没有。忽然,漂来一叶之扁舟,船上有两人,船尾的人正撑着长篙,船头的人静静坐着。小船背后就是密集的高楼,耸入云霄。寄蜉蝣于天地,渺沧海之一粟,一种强烈的反差感袭来。Z就好像这艘小船上的人,他或许能决定这船往哪儿划,但却改变不了这港被一点一点填满。
2123

2224
Z在十一月下旬动身,几乎没人支持他的决定。周四的会议上,同事们轮流劝他:“现在走只会对你不利,等一月绩效评完,赶上春节,回去不是正好?”晚上做复健时,朋友也发来消息,说权衡再三,还是不愿冒险。Z不为所动。他认定这是最后的窗口,一旦换届变天,恐怕就更回不来了。他一心只想离开,越快越好,一切安排都很仓促。律所转寄来的I-797,直到临行前一周才到。

_sass/_layout.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,10 @@
128128
float: left
129129
}
130130

131+
img.post {
132+
max-width: 100%;
133+
}
134+
131135
h2 {
132136
font-size: $h2size;
133137
}
645 KB
Loading

0 commit comments

Comments
 (0)