[gimp-web/gimp-web-static] Update to-do and added some notes to 'using-pelican'



commit 2c73268f42c41df5f18afa7b4d0ee306569022fc
Author: Pat David <patdavid gmail com>
Date:   Wed Aug 19 14:27:14 2015 -0500

    Update to-do and added some notes to 'using-pelican'

 content/about/meta/to-do/index.md         |   10 ++++++++++
 content/about/meta/using-pelican/index.md |   28 +++++++++++++++++++++++++---
 2 files changed, 35 insertions(+), 3 deletions(-)
---
diff --git a/content/about/meta/to-do/index.md b/content/about/meta/to-do/index.md
index 6c0ebf4..77fdfc3 100644
--- a/content/about/meta/to-do/index.md
+++ b/content/about/meta/to-do/index.md
@@ -4,6 +4,16 @@ Modified: 2015-08-06T16:01:12-05:00
 Author: Pat David
 Summary: Stuff to fix still.
 
+## Test/Port News Items
+
+2015-08-19T14:25:29-05:00
+
+Test that news items are permalinked and generated correctly.
+Also test that they are properly aggregated on an index page, and that the 
+pagination is working correctly.
+
+The actual number of news posts over the years makes me think it shouldn't be too much of a problem,
+but I'd rather have it all working for a ton of posts and not need it (vs. the other way around...).
 
 ## SVG Spritesheet
 
diff --git a/content/about/meta/using-pelican/index.md b/content/about/meta/using-pelican/index.md
index 0b53316..2007d66 100644
--- a/content/about/meta/using-pelican/index.md
+++ b/content/about/meta/using-pelican/index.md
@@ -49,7 +49,7 @@ Don't play with this file unless you're feeling comfortable about what things do
 
 ## Content
 
-There are two main types of content as far as Pelican is concerned: pages and articles.
+There are two main types of content as far as Pelican is concerned: **pages** and **articles**.
 
 
 ### Pages
@@ -92,9 +92,14 @@ The most natural fit for this type of content would be *News* posts and similarl
 There's really no difference, the posts are all *Articles* as far as Pelican is concerned.
 The nice difference from the past is that each post now gets it's own permalinked page.
 
-Any content *not* explicitly inside of a `PAGE_PATHS` location will be parsed as an *Article* by Pelican.
-For keeping things tidy, I've created a sub-directory called *News* to keep those posts organized.
+<del>Any content *not* explicitly inside of a `PAGE_PATHS` location will be parsed as an *Article* by 
Pelican.</del>
+For keeping things tidy, I've created a sub-directory called *news* to keep those posts organized.
 
+The `pelicanconf.py` file has a setting for explicitly setting the location of *Articles*:
+
+    ARTICLES_PATHS = ['news']
+
+This will tell Pelican to look for articles only under the listed path(s).
 
 ---
 ## Pelican Notes
@@ -105,6 +110,23 @@ To hide a page from being included on the navigation elements, add to the pages
 
 `status: hidden`
 
+At the moment, with the addition of the *Page Hierarchy* plugin, each page also gets extra metadata
+that describes the pages parents and children.
+While testing, I assumed I would *not* want sub-pages to be listed in the navigation (ie: only top-level 
pages should be listed).
+
+So, in the `themes/newgimp/templates/base.html` base template file, I did this to the navigation element:
+
+    {% for p in PAGES %}
+        {% if p.parents|length == 1 %}
+          <li{% if p == page %} class="active"{% endif %}>
+            <a href="{{ SITEURL }}/{{ p.url }}">{{ p.title }}</a>
+          </li>
+        {% endif %}
+    {% endfor %}
+
+That is, if page.parents length is "1", then it must be a top-level page, and list it in the navigation.
+Note that the `status: hidden` metadata on the page will override this behavior if desired.
+
 
 ### Python SimpleHTTPServer & SVG
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]