{% import "macros/replacements.html" as replacements %} {%- block head -%}{%- endblock head -%} {%- set page = page | default(value = section | default(value = false)) -%} Graphite | {{ title | safe }} {% if current_path -%} {%- endif %} {%- set meta_description = page.extra.meta_description | default(value = meta_description | default(value = false)) -%} {% if meta_description %} {%- endif %} {% block rss -%} {%- endblock %} {#- ======================================================================== -#} {#- ON EVERY PAGE OF THE SITE: CSS AND JS TO LOAD EITHER AS A LINK OR INLINE -#} {#- ======================================================================== -#} {%- set global_linked_js = [] -%} {%- set global_linked_css = [] -%} {%- set global_js = ["/js/text-justification.js", "/js/navbar.js"] -%} {%- set global_css = ["/base.css", "/fonts/common.css"] -%} {%- set fonts_loaded = load_data(path="static/fonts/common.css", format="plain", required=false) -%} {%- if not fonts_loaded -%} {{ throw(message="------------------------------------------------------------> FONTS ARE NOT INSTALLED! Before running Zola, execute `npm run install-fonts` from the `/website` directory.") }} {%- endif -%} {#- RETRIEVE FROM TEMPLATES AND PAGES: CSS AND JS TO LOAD EITHER AS A LINK OR INLINE -#} {#- ================================================================================ -#} {%- set linked_css = page.extra.linked_css | default(value = []) | concat(with = linked_css | default(value = [])) -%} {%- set linked_js = page.extra.linked_js | default(value = []) | concat(with = linked_js | default(value = [])) -%} {%- set css = page.extra.css | default(value = []) | concat(with = css | default(value = [])) -%} {%- set js = page.extra.js | default(value = []) | concat(with = js | default(value = [])) -%} {#- COMBINE THE GLOBAL AND TEMPLATE/PAGE RESOURCE LISTS -#} {#- =================================================== -#} {%- set linked_css_list = linked_css | concat(with = global_linked_css) -%} {%- set linked_js_list = linked_js | concat(with = global_linked_js) -%} {%- set css_list = css | concat(with = global_css) -%} {%- set js_list = js | concat(with = global_js) -%} {#- CONDITIONALLY MAKE ONLY PROD BUILDS ACTUALLY INLINE THE CSS AND JS FOR CLEANLINESS -#} {#- ================================================================================== -#} {%- if get_env(name = "MODE", default = "dev") != "prod" -%} {%- set linked_css_list = linked_css_list | concat(with = css_list) -%} {%- set linked_js_list = linked_js_list | concat(with = js_list) -%} {%- set css_list = [] -%} {%- set js_list = [] -%} {%- endif -%} {#- INSERT CSS LINKS -#} {#- ================ -#} {%- for path in linked_css_list %} {%- endfor %} {#- INSERT JS LINKS -#} {#- =============== -#} {%- for path in linked_js_list %} {%- endfor %} {#- INSERT INLINE CSS CODE -#} {#- ====================== -#} {%- if css_list | length > 0 %} {{ "<" ~ "style>" | safe }} {% for path in css_list -%} {{ load_data(path = path) | safe }} {% endfor -%} {{ "" | safe }} {%- endif %} {#- INSERT INLINE JS CODE -#} {#- ===================== -#} {%- for path in js_list %} {{ "<" ~ "script>" | safe }} {{ load_data(path = path) | safe }} {{ "" | safe }} {%- endfor %} {{- get_env(name = "INDEX_HTML_HEAD_INCLUSION", default = "") | safe }}

{%- filter replace(from = "", to = replacements::blog_posts(count = 2)) -%} {%- filter replace(from = "", to = replacements::text_balancer()) -%} {%- block content -%}{%- endblock -%} {%- endfilter -%} {%- endfilter -%}