ConnorAtherton / OctoPanel

A simple, clean and responsive theme for Octopress.
MIT License
57 stars 11 forks source link

Post preview #4

Closed aritzportuondo closed 10 years ago

aritzportuondo commented 10 years ago

Could you please tell me how can I do to "activate" the visualization of each post preview? Now only titles appears. Thanks and good work!

ConnorAtherton commented 10 years ago

Hey man, could you explain this a little more please?

aritzportuondo commented 10 years ago

Yes. I installed your skin and now I can see the titles of all of my posts in the main screen. Now, to read the post I have to click on each title but what I want is to be able to see a preview of my posts without clicking on each title.

ConnorAtherton commented 10 years ago

Okay. Your going to have to modify the source a little for this. Go to source / _includes / article.html.

On line 21 paste in this code

<div class="entry-content">{{ content | excerpt }}</div>
    {% capture excerpted %}{{ content | has_excerpt }}{% endcapture %}
    {% if excerpted == 'true' %}
      <footer>
        <a rel="full-article" href="{{ root_url }}{{ post.url }}">{{ site.excerpt_link }}</a>
      </footer>
    {% endif %}

That should do it! Oh and make sure you put <!-- more --> in the actual post for it to display the excerpt.

aritzportuondo commented 10 years ago

Works well! Thank you!

aritzportuondo commented 10 years ago

Sorry, but there is a mistake.

Now the code say this:

{% else %}

{{ content | excerpt }}
{% capture excerpted %}{{ content | has_excerpt }}{% endcapture %}
{% if excerpted == 'true' %}
  <footer>
    <a rel="full-article" href="{{ root_url }}{{ post.url }}">{{ site.excerpt_link }}</a>
  </footer>
{% endif %}
{{ content }}

{% endif %}

And the result is this:

captura de pantalla 2013-11-21 a la s 13 48 00

ConnorAtherton commented 10 years ago

No problem.

ConnorAtherton commented 10 years ago

Can you please post your full article.html

aritzportuondo commented 10 years ago

Sorry Connor. The mistake was mine. Thanks for your help!

ConnorAtherton commented 10 years ago

Glad we got it sorted. Enjoy the theme. If you are using it for your own blog please could you post the link in the wiki.