danielmochdotcom

Nikola site for www.danielmoch.com
git clone git://git.danielmoch.com/danielmochdotcom.git
Log | Files | Refs

commit 4a01a57059d1b57d85248d5699772d1b27472cb4
parent 044463ca9d52818e1ddca3490b9b63e1ef99d523
Author: Daniel Moch <daniel@danielmoch.com>
Date:   Mon, 15 Oct 2018 06:19:48 -0400

Teasers and Pagination

Diffstat:
Mconf.py | 6+++---
Mposts/2017/02/how-sadness-could-save-the-world.rst | 2++
Mposts/2018/03/a-eulogy-for-my-grandmother.rst | 2++
Mposts/2018/03/structural-problems-with-for-profit-social-media.rst | 2++
Mposts/2018/04/facebook-defends-universal-data-collection.rst | 2++
Mposts/2018/06/a-letter-to-senator-rubio.rst | 2++
Mposts/2018/10/hardening-services-with-systemd.rst | 2++
Mthemes/djmoch/templates/index.tmpl | 13++++++++++++-
8 files changed, 27 insertions(+), 4 deletions(-)

diff --git a/conf.py b/conf.py @@ -880,7 +880,7 @@ # ) # Show teasers (instead of full posts) in indexes? Defaults to False. -# INDEX_TEASERS = False +INDEX_TEASERS = True # HTML fragments with the Read more... links. # The following tags exist and are replaced for you: @@ -1107,7 +1107,7 @@ # Modify the number of Post per Index Page # Defaults to 10 -# INDEX_DISPLAY_POST_COUNT = 10 +INDEX_DISPLAY_POST_COUNT = 5 # By default, Nikola generates RSS files for the website and for tags, and # links to it. Set this to False to disable everything RSS-related. @@ -1124,7 +1124,7 @@ # Only include teasers in Atom and RSS feeds. Disabling include the full # content. Defaults to True. -# FEED_TEASERS = True +FEED_TEASERS = False # Strip HTML from Atom and RSS feed summaries and content. Defaults to False. # FEED_PLAIN = False diff --git a/posts/2017/02/how-sadness-could-save-the-world.rst b/posts/2017/02/how-sadness-could-save-the-world.rst @@ -27,6 +27,8 @@ But he also exploited the anger of his detractors by building a furor that dominated the news cycle, drowning out other voices and galvanizing his supporters. +.. TEASER_END + But thinly-veiled rage is not the only way to draw attention to your cause. I would argue that it’s not even the most effective way. I submit that sadness stands to be at least as effective. It’s more difficult, diff --git a/posts/2018/03/a-eulogy-for-my-grandmother.rst b/posts/2018/03/a-eulogy-for-my-grandmother.rst @@ -25,6 +25,8 @@ relationships in this community in part through her kindness. She was a force of kindness in my life and the lives of so many others. I'd like to share with you a couple of stories that exemplify Jane's kindness. +.. TEASER_END + During summers growing up, I would spend time with my brother and sister here in Dunkirk with Gram and Papa. That was an act of kindness itself for my parents who were able for a week or two each summer not to worry diff --git a/posts/2018/03/structural-problems-with-for-profit-social-media.rst b/posts/2018/03/structural-problems-with-for-profit-social-media.rst @@ -13,6 +13,8 @@ introduce you to someone whose work I'm only beginning to dig into myself, but who has an awful lot of really smart things to say on the topic of online privacy (among other things): Zeynep Tufekci. +.. TEASER_END + I spare you my attempt at a mini-biography, mostly because I'm about the least qualified person in the world to deliver. Rather, I'll point you to this `TED talk`_ that she did October of last year where she talks diff --git a/posts/2018/04/facebook-defends-universal-data-collection.rst b/posts/2018/04/facebook-defends-universal-data-collection.rst @@ -14,6 +14,8 @@ bit on the defensive with regard to the fact of this type of data collection. To wit, why does Facebook do something as arguably intrusive as collect data on folks who have no other relationship to the site? +.. TEASER_END + That question remains implied, but David's answer to it does not. Here's what he says, in part: diff --git a/posts/2018/06/a-letter-to-senator-rubio.rst b/posts/2018/06/a-letter-to-senator-rubio.rst @@ -18,6 +18,8 @@ brings additional pain to see that that the Bible, the same Scripture this party has used to defend "family values," has been perverted to defend practices that are the antithesis of that phrase. +.. TEASER_END + I take the time to write you because I believe you to be a man of character, and one who has been willing to take a stand on issues—even unpopular issues—that you think are important. I can think of no more diff --git a/posts/2018/10/hardening-services-with-systemd.rst b/posts/2018/10/hardening-services-with-systemd.rst @@ -13,6 +13,8 @@ discussed pretty much anywhere: Systemd's native ability to leverage the Linux kernel's namespacing features to run services in a sandboxed environment. +.. TEASER_END + `Linux namespaces`_ are the kernel feature that enables partitioning everything from processes, to the filesystem, to the network stack. A process operating in one namespace will have a different view of the diff --git a/themes/djmoch/templates/index.tmpl b/themes/djmoch/templates/index.tmpl @@ -1,3 +1,6 @@ +{# -*- coding: utf-8 -*- #} +{% import 'index_helper.tmpl' as helper with context %} +{% import 'pagination_helper.tmpl' as pagination with context %} {% extends "post_base.tmpl" %} {% block head %} @@ -6,9 +9,17 @@ {% endblock %} {% block content %} +{% if page_links %} + {{ pagination.page_navigation(current_page, page_links, prevlink, nextlink, prev_next_links_reversed) }} +{% endif %} <h1>Recent Posts</h1> {% for post in posts %} <h2><a class="subtle-link" href="/blog/{{post.permalink()}}">{{post.title()}}</a></h2> -{{ post.text() }} +{% if index_teasers %} +{{ post.text(teaser_only=True) }} +{% else %} +{{ post.text(teaser_only=False) }} +{% endif %} {% endfor %} +{{ helper.html_pager() }} {% endblock %}