-
Notifications
You must be signed in to change notification settings - Fork 10
/
HowTo
32 lines (24 loc) · 1.03 KB
/
HowTo
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Introduce new categories with
Category:
in an .md metadata section.
But then these don't appear in the News.
Now they do
double loop in home.html over the categories and skip the ones not in EVENTS_TAGS
Still coming out in alphabetical order and we want to order them based on EVENTS_TAGS.
Perhaps create an ordered list within the template.
See theme/templates/article_list.html
http://jinja.pocoo.org/docs/2.9/tricks/
Home page:
News consists of events in content/articles/Recent.
Currently Limited to 20 (was 6) in pelicanconf.py
The material in Upcoming Events seems to be all the Past events!
Entirely the wrong thing.
And doesn't filter based on the current date.
The different tags are defined in EVENTS_TAGS
[done Perhaps to filter the Upcoming Events we can use an {%if %} in the home.html template.
We need to determine how to add a test for the date against the current date.
{%if article.date is %}
{% endif %}
Start with a test for the string
How to sort by an attribute.
{% for p in pages|sort(attribute='source_path') %}