# Possible build bug on Github

**URL:** <https://talk.jekyllrb.com/t/possible-build-bug-on-github/869>\
**Category:** Help\
**Created:** [August 5, 2017, 2:05pm UTC](https://talk.jekyllrb.com/t/possible-build-bug-on-github/869 "2017-08-05T14:05:54Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Japorized](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/japorized/32/394_2.png) [@Japorized](https://talk.jekyllrb.com/u/Japorized)\
**Post date:** [August 5, 2017, 2:05pm UTC](https://talk.jekyllrb.com/t/possible-build-bug-on-github/869/1 "2017-08-05T14:05:54Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![ashmaroli](https://avatars.discourse-cdn.com/v4/letter/a/df705f/32.png) [@ashmaroli](https://talk.jekyllrb.com/u/ashmaroli)\
**Post date:** [August 7, 2017, 9:57am UTC](https://talk.jekyllrb.com/t/possible-build-bug-on-github/869/2 "2017-08-07T09:57:40Z")

</div>

Ensure that you’re running only [supported plugins (and versions)](https://pages.github.com/versions/) while pushing to host on GitHub Pages

A

---

<div class="post-metadata">

**Author:** ![Japorized](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/japorized/32/394_2.png) [@Japorized](https://talk.jekyllrb.com/u/Japorized)\
**Post date:** [August 7, 2017, 3:42pm UTC](https://talk.jekyllrb.com/t/possible-build-bug-on-github/869/3 "2017-08-07T15:42:49Z")

</div>

Thanks for pointing that out 😄

So since the newer Jekyll version seems to have fixed this generation, I suppose I should just wait for Github Pages to update their dependency version?

---

<div class="post-metadata">

**Author:** ![jreel](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/jreel/32/867_2.png) [@jreel](https://talk.jekyllrb.com/u/jreel)\
**Post date:** [August 9, 2017, 4:35pm UTC](https://talk.jekyllrb.com/t/possible-build-bug-on-github/869/4 "2017-08-09T16:35:38Z")

</div>

You can also try a workaround by explicitly defining what you want the excerpt to look like. Put something like this inside your for loop:

`{% assign post_excerpt = post.content | truncatewords: 50 %}`

and output via:

`<span class="article_excerpt">{{ post_excerpt | strip_html | markdownify }}</span>`

---

<div class="post-metadata">

**Author:** ![Japorized](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/japorized/32/394_2.png) [@Japorized](https://talk.jekyllrb.com/u/Japorized)\
**Post date:** [August 10, 2017, 12:25pm UTC](https://talk.jekyllrb.com/t/possible-build-bug-on-github/869/5 "2017-08-10T12:25:57Z")

</div>

That’s a clever workaround! Thanks jreel!
