Skip to content
Permalink
Browse files

Prefetch newest post when visiting the front page

  • Loading branch information
da2x committed Mar 22, 2015
1 parent 2284efa commit 4cd4584c574cb5ebff8ca90535498ef47dd05a04
Showing with 8 additions and 0 deletions.
  1. +1 −0 CHANGES.txt
  2. +7 −0 nikola/data/themes/base/templates/index.tmpl
@@ -4,6 +4,7 @@ New in master
Features
--------

* Instruct browsers to prefetch newest post when visiting the front page
* Add a ``sort`` parameter to the post-list directive to sort posts in
the list using natsort. (Issue #1635)

@@ -3,6 +3,13 @@
<%namespace name="comments" file="comments_helper.tmpl"/>
<%inherit file="base.tmpl"/>

<%block name="extra_head">
${parent.extra_head()}
% if permalink == '/' or permalink == '/' + index_file:
<link rel="prefetch" href="${posts[0].permalink()}" type="text/html">
% endif
</%block>

<%block name="content">
<div class="postindex">
% for post in posts:

1 comment on commit 4cd4584

@Kwpolska

This comment has been minimized.

Copy link
Member

@Kwpolska Kwpolska commented on 4cd4584 Mar 22, 2015

IndexError: list index out of range

Please sign in to comment.
You can’t perform that action at this time.