From a21a86bf8ef2c11882161f893509f3454bf519dc Mon Sep 17 00:00:00 2001
From: "M. Taylor Saotome-Westlake" <ultimatelyuntruethought@gmail.com>
Date: Sat, 15 Sep 2018 16:41:13 -0700
Subject: [PATCH] WIP local fonts

It's nontrivial because the HTML only retreives a stylesheet which retrieves
the actual fonts; not hard to solve, but I don't care that much right now
---
 pelicanconf.py            | 2 ++
 plugins/tag_cloud.py      | 1 +
 publishconf.py            | 2 ++
 theme/templates/base.html | 9 +++++++--
 4 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/pelicanconf.py b/pelicanconf.py
index 7952a3f..a9875e1 100644
--- a/pelicanconf.py
+++ b/pelicanconf.py
@@ -71,3 +71,5 @@ TAG_CLOUD_SORTING = "alphabetically"
 
 # Uncomment following line if you want document-relative URLs when developing
 RELATIVE_URLS = True
+
+IS_DEVELOPMENT = True
diff --git a/plugins/tag_cloud.py b/plugins/tag_cloud.py
index 775977e..bdd9358 100644
--- a/plugins/tag_cloud.py
+++ b/plugins/tag_cloud.py
@@ -23,6 +23,7 @@ logger = logging.getLogger(__name__)
 
 
 def set_default_settings(settings):
+    print(settings)
     settings.setdefault('TAG_CLOUD_STEPS', 4)
     settings.setdefault('TAG_CLOUD_MAX_ITEMS', 100)
     settings.setdefault('TAG_CLOUD_SORTING', 'random')
diff --git a/publishconf.py b/publishconf.py
index 738f1f3..fd59a1a 100644
--- a/publishconf.py
+++ b/publishconf.py
@@ -21,3 +21,5 @@ CATEGORY_FEED_ATOM = 'feeds/%s.atom.xml'
 DELETE_OUTPUT_DIRECTORY = True
 
 GOOGLE_ANALYTICS = "UA-100822263-1"
+
+IS_DEVELOPMENT = False
diff --git a/theme/templates/base.html b/theme/templates/base.html
index 36ca164..472eaf1 100644
--- a/theme/templates/base.html
+++ b/theme/templates/base.html
@@ -8,8 +8,13 @@
 	{% block extra_meta %}
 	{% endblock %}
 
-	<link rel="top" href="#" /><link href='http://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,300italic,400italic,600italic|Source+Code+Pro' rel='stylesheet' type='text/css'></link>
-	<link rel="stylesheet" href="{{ SITEURL }}/theme/css/{{ CSS_FILE }}" type="text/css" />
+        {% if IS_DEVELOPMENT %}
+
+          {# TODO: local fonts?! #}
+        {% else %}
+	  <link rel="top" href="#" /><link href='http://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,300italic,400italic,600italic|Source+Code+Pro' rel='stylesheet' type='text/css'></link>
+	  <link rel="stylesheet" href="{{ SITEURL }}/theme/css/{{ CSS_FILE }}" type="text/css" />
+        {% endif %}
 
 	{% block scripts %}
 	{% endblock %}
-- 
2.17.1