0
votes

i have an blog index page with a list of blog posts and excerpts. once i click on the "read more" link, the full blog post is opened but lacks of its title and date of creation.

the blog index is structured like so:

    {% for post in paginator.posts %}
    <div class="entry">

        <h1>{{ post.title }}</h1>

            <span class="date"><i class="fa fa-clock-o"></i> {{ post.date | date: "%m-%d-%Y"}}</span>

        {{ post.excerpt }}
        <a class="more-link" href="{{ post.url }}">continue reading <i class="fa fa-chevron-right"></i></a>

    </div>
    {% endfor %}

i've tried throwing {{ post.title }} and the date in blog posts, both in the front matter or inline in the article, but it just shows up empty.

how can i show the title in my opened blog post?

thanks!

1

1 Answers

0
votes

To edit how your blog posts are displayed you have to edit the template file in the _layouts folder. By default Jekyll uses post.html as a template for blog posts. Make sure that you have {{ page.title }} in the used layout file and regenerate your site. Now the blog title will appear on all of your individual post pages, please note that it won't appear if the post title is not specified in the front matter of the post.