From d8cd3b9988f9021ea1b285db3231048acb7b74f4 Mon Sep 17 00:00:00 2001 From: Jieiku Date: Mon, 30 May 2022 22:47:37 -0700 Subject: Add Font Files and cachebust --- README.md | 9 +++++++++ config.toml | 18 +++++++++++++++--- static/FiraCode-Bold.woff2 | Bin 0 -> 87408 bytes static/FiraCode-Regular.woff2 | Bin 0 -> 82800 bytes templates/base.html | 10 ++++++++++ templates/macros/macros.html | 20 +++++++++++++++++++- 6 files changed, 53 insertions(+), 4 deletions(-) create mode 100644 static/FiraCode-Bold.woff2 create mode 100644 static/FiraCode-Regular.woff2 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 = 'Abridge' 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 Binary files /dev/null and b/static/FiraCode-Bold.woff2 differ diff --git a/static/FiraCode-Regular.woff2 b/static/FiraCode-Regular.woff2 new file mode 100644 index 0000000..ab47287 Binary files /dev/null and b/static/FiraCode-Regular.woff2 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 %} + + {% else %} + + {% endif %} + {% endfor %} + {% endif %} + {% if config.build_search_index %} 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) %}

{{ page.title }}

-{{ page.date | date(format="%B %d, %Y") }}{% if page.taxonomies.categories %} [{% for cat in page.taxonomies.categories %}{{ cat }}{% endfor %}]{% endif %} +{{ 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 %} + {{ author }} + {% 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 %}{{ cat }}{% endfor %}]{% endif %} {% if page.taxonomies.tags %} {% for tag in page.taxonomies.tags %} #{{ tag }} {% endfor %} {% endif %} + +{% if config.extra.readtime | default(value=true) %} + - {{ page.reading_time }} min +{% endif %} {% endmacro title %} + + {% macro footer(page) %}

Back to top

{% endmacro footer %} -- cgit v1.3.1