From 30ea88e8d8c201c3fcce409a54712de820610dff Mon Sep 17 00:00:00 2001 From: Jieiku Date: Mon, 30 May 2022 23:20:43 -0700 Subject: Add Favicons, Add Head Macro, 404 noindex, config.toml Resources, Whitespace Cleanup --- templates/index.html | 111 +++++++++++++++++++++++++++++---------------------- 1 file changed, 64 insertions(+), 47 deletions(-) (limited to 'templates/index.html') diff --git a/templates/index.html b/templates/index.html index abc29c0..c17ee63 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,57 +1,74 @@ -{% import "macros/page.html" as page_macros %} -{% import "macros/macros.html" as macros %} -{% extends "base.html" %} -{% block content %} -
- {% for page in paginator.pages %} +{%- extends "base.html" %} + +{%- block seo %} + {{- super() }} + + {%- if config.title %} + {%- set title = config.title %} + {%- else %} + {%- set title = "" %} + {%- endif %} + + {%- if config.extra.title_addition and title %} + {%- set title_addition = title_separator ~ config.extra.title_addition %} + {%- elif config.extra.title_addition %} + {%- set title_addition = config.extra.title_addition %} + {%- else %} + {%- set title_addition = "" %} + {%- endif %} + + {%- set description = config.description %} + + {{- macros_head::seo(title=title, title_addition=title_addition, description=description, is_home=true) }} +{%- endblock seo %} + +{%- block content %} +
+ {%- for page in paginator.pages %}
- {{ macros::title(page=page) }} + {{- macros::title(page=page) }}

- {% if page.summary -%} - {{ page.summary | markdown(inline=true) | safe }} - {% elif page.description %} - {{ page.description | safe }} - {% elif page.content %} - {{ page.content | safe | striptags | truncate(length=150) }} - {% elif page.extra.static_thumbnail %} - {% endif -%} + {%- if page.summary %} + {{ page.summary | markdown(inline=true) | safe }} + {%- elif page.description %} + {{ page.description | safe }} + {%- elif page.content %} + {{ page.content | safe | striptags | truncate(length=150) }} + {%- elif page.extra.static_thumbnail %} + {%- endif %} ...more

- {% endfor %} - {% if paginator.previous or paginator.next %} - - {% endif -%} -
- {% set section_item = get_section(path="_index.md") %} - {% if config.extra.recent | default(value=true) %} + {%- endfor %} + {%- if paginator.previous or paginator.next %} + + {%- endif %} +
+ {%- set section_item = get_section(path="_index.md") %} + {%- if config.extra.recent | default(value=true) %}

Recent Posts

- {% for page in section_item.pages | slice(end=config.extra.recent_items) %} - {{ page_macros::page_listing(page=page) }} - {% endfor %} + {%- for page in section_item.pages | slice(end=config.extra.recent_items) %} + {{- page_macros::page_listing(page=page) }} + {%- endfor %}
- {% endif %} -{% endblock content %} + {%- endif %} +{%- endblock content %} -- cgit v1.3.1