molivier / nest

Nest Pelican Template
https://www.molivier.com
GNU General Public License v2.0
123 stars 50 forks source link

expand articles in the main view? #12

Closed pjz closed 7 years ago

pjz commented 7 years ago

Is there a way to inline articles on the main page instead of having just a list of their headers?

molivier commented 7 years ago

The current version doesn't have this feature but you can modify the index.html template to do that. Do you want a list of articles formated as blocks or just expand their content on click?

pjz commented 7 years ago

I was thinking a list of

* Article 1 title
  Summary of article 1
* Article 2 title
  Summary of article 2
molivier commented 7 years ago

As a quick fix you can modify the templates to add the article summary:

 <dl class="dl-horizontal">
                {% for article in articles_page.object_list %}
                <dt>{{ article.locale_date}}</dt>
                <dd><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></dd>
                <dd>{{ article.summary }}</dd><br/>
                {% endfor %}
</dl>
cyrilb38 commented 6 years ago

Hi,

First, thanks a lot for this awesome theme. This is exactly what I was looking for. As pjz pointed out, I would love to see the summary of articles. I try to set up your suggested fix in the index.html file but this doesn't seem to work. Any idea why ? I have to confess that I'm quite new to Pelican...