Permalink
Browse files

Changes to make the homepage more like a blog

- Move welcome static page content to index.html template
- Include latest article in index
- Include up to 9 more article links underneath that
- And if there are 10 or more articles available, show a link to the
  Pelican builtin archives page with all articles on it.
  • Loading branch information...
1 parent bc18eb2 commit 3cc6461e34a17c50cd608253d70cffe5de082a02 @maikelwever maikelwever committed Jan 6, 2014
Showing with 78 additions and 36 deletions.
  1. +0 −36 content/pages/01-home.rst
  2. +4 −0 pelicanconf.py
  3. +74 −0 themes/paylogic/templates/index.html
@@ -1,36 +0,0 @@
-:title: Welcome
-:URL:
-:save_as: index.html
-
-Introducing the Paylogic developer portal
-#########################################
-
-Welcome to the Paylogic developer portal! This website is a platform for
-communication between the engineers & devops at Paylogic and the world (you!).
-We use this website to share:
-
-- Articles about technical topics involving programming (testing, design,
- architecture) and system administration (high availability, automation,
- performance testing) and community events like PyGrunn_
-
-- Open source projects we've published (see also our GitHub_ account)
-
-- How to integrate with Paylogic system.
-
-In the future this website will also host the documentation of the Paylogic
-ticketing API which is currently under development.
-
-Recent articles
-===============
-
-- `Continuous Delivery <articles/continuous-delivery.html>`_
-- `pip-accel: Accelerator for pip, the Python package manager <articles/pip-accel.html>`_
-- `Using Debian packages for Python deployments <articles/debian-packages.html>`_
-- `You are welcome <articles/you-are-welcome.html>`_
-
-.. External references:
-.. _GitHub: https://github.com/paylogic
-.. _PyGrunn: http://www.pygrunn.org/
-
-
-
View
@@ -51,3 +51,7 @@
("Authors", "/authors.html"),
("About", "/pages/about.html"),
)
+
+JINJA_EXTENSIONS = [
+ 'jinja2.ext.with_',
+]
@@ -0,0 +1,74 @@
+{% extends "base.html" %}
+
+{% block title %}Welcome{% endblock %}
+
+{% block content %}
+<section id="content">
+
+{% block content_title %}
+<h1>Welcome</h1>
+{% endblock %}
+
+ <div class="section" id="introducing-the-paylogic-developer-portal">
+ <h2>Introducing the Paylogic developer portal</h2>
+ <p>Welcome to the Paylogic developer portal! This website is a platform for
+ communication between the engineers &amp; devops at Paylogic and the world (you!).
+ We use this website to share:</p>
+ <ul class="simple">
+ <li>Articles about technical topics involving programming (testing, design,
+ architecture) and system administration (high availability, automation,
+ performance testing) and community events like <a class="reference external" href="http://www.pygrunn.org/">PyGrunn</a></li>
+ <li>Open source projects we've published (see also our <a class="reference external" href="https://github.com/paylogic">GitHub</a> account)</li>
+ <li>How to integrate with Paylogic system.</li>
+ </ul>
+ <p>In the future this website will also host the documentation of the Paylogic
+ ticketing API which is currently under development.</p>
+ </div>
+
+ <hr />
+ <div class="section" id="latest-article">
+ <h1>Latest article</h1>
+ {% with article=articles_page.object_list[0] %}
+ <article class="hentry">
+ <header>
+ <h2 class="entry-title">
+ <a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">
+ {{ article.title }}
+ </a>
+ </h2>
+ </header>
+
+ <footer class="post-info">
+ <abbr class="published" title="{{ article.date.isoformat() }}"> {{ article.locale_date }} </abbr>
+ {% if article.author %}
+ <address class="vcard author">By
+ <a class="url fn" href="{{ SITEURL }}/{{ article.author.url }}">{{ article.author }}</a>
+ </address>
+ {% endif %}
+ </footer><!-- /.post-info -->
+
+ <div class="entry-content"> {{ article.content }} </div><!-- /.entry-content -->
+ </article>
+ {% endwith %}
+ </div>
+
+ <hr />
+ <div class="section" id="recent-articles">
+ <h1>More articles</h1>
+ <ul class="simple">
+ {% for article in articles_page.object_list %}
+ {% if loop.index > 1 and loop.index < 10 %}
+ <li>
+ <a class="reference" href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a>
+ </li>
+ {% endif %}
+ {% endfor %}
+ </ul><!-- /#posts-list -->
+
+ {% if articles_page.object_list|length >= 10 %}
+ <a href="{{ SITEURL }}/archives.html" title="Archives">Complete article listing</a>
+ {% endif %}
+ </div>
+</section><!-- /#content -->
+
+{% endblock content %}

0 comments on commit 3cc6461

Please sign in to comment.