Skip to content

Commit

Permalink
✨ feat: use custom separator from config in meta & title
Browse files Browse the repository at this point in the history
  • Loading branch information
welpo committed Feb 22, 2023
1 parent ba0631b commit aa00640
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,13 @@ use_cdn = false

date_format = "" # If unset, uses format: "1st January 2049"

#Full path after the base URL required. So if you were to place it in "static" it would be "/favicon.ico"
# Custom separator used in title tag and posts metadata (between date, time to read, and tags).
separator = ""

# Full path after the base URL required. So if you were to place it in "static" it would be "/favicon.ico"
favicon = ""

#This header image is used for SEO. For example if you were to share an image via Messenger/Instagram/Twitter a preview picture is also presented
# This header image is used for SEO. For example if you were to share an image via Messenger/Instagram/Twitter a preview picture is also presented
headerImage = ""

# The icon is display besides the menu text but is not necessary. It needs to be placed under "menu_icon" in the static "folder"
Expand Down
4 changes: 3 additions & 1 deletion templates/macros/content.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{% macro content(page, separator='•') %}
{% macro content(page) %}
{% set separator = config.extra.separator | default(value="•") %}

<main>
<article>
<div>
Expand Down
3 changes: 2 additions & 1 deletion templates/macros/set_title.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

{# Setup. #}
{% set prefix = config.title | safe %}
{% set separator = " • " %}
{% set custom_separator = config.extra.separator | default(value="•") %}
{% set separator = " " ~ custom_separator ~ " " %}

{% if current_path and current_path == "/" %}
{% set suffix = "" %}
Expand Down

0 comments on commit aa00640

Please sign in to comment.