aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md9
-rw-r--r--config.toml18
-rw-r--r--static/FiraCode-Bold.woff2bin0 -> 87408 bytes
-rw-r--r--static/FiraCode-Regular.woff2bin0 -> 82800 bytes
-rw-r--r--templates/base.html10
-rw-r--r--templates/macros/macros.html20
6 files changed, 53 insertions, 4 deletions
diff --git a/README.md b/README.md
index 237b423..06afb98 100644
--- a/README.md
+++ b/README.md
@@ -95,6 +95,15 @@ repo for an idea.
To change the number of items per page edit: `abridge/content/_index.md` and change the value for `paginate_by`
+### Page width
+
+You can set the overal page width by editing `themes\abridge\sass\_variables.scss` file, and adjusting these two lines:
+
+```scss
+$mw:50% !default;// max-width
+$mb:1200px !default;// value at which to switch from fluid layout to using max-width
+```
+
### Colors and Styles
Colors and style are handled by the sass files of [abridge.css](https://github.com/jieiku/abridge.css)
diff --git a/config.toml b/config.toml
index a90847b..f095616 100644
--- a/config.toml
+++ b/config.toml
@@ -29,8 +29,9 @@ external_links_no_referrer = false # rel="noreferrer"
smart_punctuation = false # `...` to `…`, `"quote"` to `“curly”` etc
[extra]
-katex_enable = false # used to to render mathematical notations, requires js
-katex_auto_render = false
+author = "Your Name"
+author_show = true # displays the author name below the title after the date, tags, categories
+readtime = true # displays the read time below the title after the date, tags, categories
recent = true
recent_items = 9
footer_credit = true
@@ -38,7 +39,6 @@ footer_credit = true
#bing = "Your Bing Site verification code."
textlogo = '<font color="#f90">A</font>bridge'
sitedesc = false # enables or disables the display of the site description below the logo.
-author = "Your Name"
favicon = "favicon.png"
banner = "banner.png"
menu = [
@@ -63,6 +63,18 @@ keywords = "Whatever, SEO, keywords, you want"
twitter = "your-user-name"
seo = true # enable or disable seo-related meta tags: opengraph, facebook, twitter
+# For externally loaded fonts make sure the include the FULL url including the http/https prefix
+fonts_load = false
+fonts = [
+ {url = "https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700|Source+Code+Pro"},
+ {url = "https://fonts.googleapis.com/css?family=Merriweather:300,400|Montserrat:400,700"},
+ {url = "FiraCode-Bold.woff2"},
+ {url = "FiraCode-Regular.woff2"},
+]
+
+katex_enable = false # used to to render mathematical notations, requires js
+katex_auto_render = false
+
# Footer social links; full options listed in macros/social.html
[extra.social]
feed = true
diff --git a/static/FiraCode-Bold.woff2 b/static/FiraCode-Bold.woff2
new file mode 100644
index 0000000..05eb043
--- /dev/null
+++ b/static/FiraCode-Bold.woff2
Binary files differ
diff --git a/static/FiraCode-Regular.woff2 b/static/FiraCode-Regular.woff2
new file mode 100644
index 0000000..ab47287
--- /dev/null
+++ b/static/FiraCode-Regular.woff2
Binary files differ
diff --git a/templates/base.html b/templates/base.html
index d148811..e811e33 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -126,6 +126,16 @@
{% endif %}
{% endif %}
+ {% if config.extra.fonts_load %}
+ {% for i in config.extra.fonts %}
+ {% if 'http' in i.url %}
+ <link rel="preload" href="{{ i.url | safe }}" as="style">
+ {% else %}
+ <link rel="preload" href="{{ get_url(path=i.url, trailing_slash=false, cachebust=true) }}" as="style">
+ {% endif %}
+ {% endfor %}
+ {% endif %}
+
{% if config.build_search_index %}
<script defer type="text/javascript" src="{{ get_url(path="search_index.en.js", trailing_slash=false, cachebust=true) | safe }}"></script>
<script defer type="text/javascript" src="{{ get_url(path="search.min.js", trailing_slash=false, cachebust=true) | safe }}"></script>
diff --git a/templates/macros/macros.html b/templates/macros/macros.html
index bfaaaae..f343828 100644
--- a/templates/macros/macros.html
+++ b/templates/macros/macros.html
@@ -1,10 +1,28 @@
{% macro title(page) %}
<h1><a href="{{ page.permalink | safe }}">{{ page.title }}</a></h1>
-<span>{{ page.date | date(format="%B %d, %Y") }}{% if page.taxonomies.categories %} [{% for cat in page.taxonomies.categories %}<a href="{{ get_taxonomy_url(kind="categories", name=cat) | safe }}">{{ cat }}</a>{% endfor %}]{% endif %}</span>
+<span>{{ page.date | date(format="%B %d, %Y") }}
+
+{% if page.taxonomies.authors and config.taxonomies %} by
+ {% for author in page.taxonomies.authors %}
+ {% if author_flag %} and {% endif %}
+ <a href="{{ get_taxonomy_url(kind='authors', name=author) | safe }}">{{ author }}</a>
+ {% set_global author_flag = true %}
+ {% endfor %}
+{% elif config.extra.author and config.extra.author_show %}
+ by {{ config.extra.author }}
+{% endif %}
+
+{% if page.taxonomies.categories %} [{% for cat in page.taxonomies.categories %}<a href="{{ get_taxonomy_url(kind="categories", name=cat) | safe }}">{{ cat }}</a>{% endfor %}]{% endif %}</span>
{% if page.taxonomies.tags %}
<span>{% for tag in page.taxonomies.tags %} #<a href="{{ get_taxonomy_url(kind="tags", name=tag) | safe }}">{{ tag }}</a> {% endfor %}</span>
{% endif %}
+
+{% if config.extra.readtime | default(value=true) %}
+ - {{ page.reading_time }} min
+{% endif %}
{% endmacro title %}
+
+
{% macro footer(page) %}
<h3><a href="#">Back to top</a></h3>
{% endmacro footer %}