Hi there,
I’m not too sure where to post this, but I ran into this problem that the site built by Jekyll on Github was different from the one built on my local computer (in the _site folder).
Here’s how the pre-built code looks like:
<a class="post_catalog_title" href="{{site.baseurl}}{{post.url}}">
<h1 class="medium-title">{{post.title}}</h1>
<span class="article_excerpt">{{post.excerpt | strip_html | markdownify | truncatewords: 50}}</span>
<span class="read_more">Read More</span>
</a>
Here’s the HTML rendered by Jekyll in my _site folder:
<a class="post_catalog_title" href="/link/to/my/blog/post">
<h1 class="large-title">My title here</h1>
<span class="article_excerpt"><p>My contents here...</p></span>
<span class="read_more">Read More</span>
</a>
Here’s the HTML rendered on my Github Pages site:
<a class="post_catalog_title" href="/link/to/my/blog/post">
<h1 class="large-title">My title here</h1>
<span class="article_excerpt"></span>
</a>
<p>
<a class="post_catalog_title" href="/link/to/my/blog/post">
My contents here...
<span class="read_more">Read More</span>
</a>
</p>
Note that the problem only happened for excerpts that have been truncated.
So what should I do?