Skip to content

Commit

Permalink
🐛 fix(comments): fix malformed URLs in Isso mails (#211)
Browse files Browse the repository at this point in the history
  • Loading branch information
welpo authored Oct 25, 2023
1 parent 0b6cb31 commit be218c0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ lazy_loading = true
enabled_for_all_posts = false # Enables Isso on all posts. It can be enabled on individual posts by setting `isso = true` in the [extra] section of a post's front matter.
automatic_loading = true # If set to false, a "Load comments" button will be shown.
endpoint_url = "" # Accepts relative paths like "/comments/" or "/isso/", as well as full urls like "https://example.com/comments/". Include the trailing slash.
page_id_is_slug = true # If true, it will use the post's filename (slug) as id; this is the only way to share comments between languages. If false, it will use the entire url as id.
page_id_is_slug = true # If true, it will use the relative path for the default language as id; this is the only way to share comments between languages. If false, it will use the entire url as id.
lang = "" # Leave blank to match the page's language.
max_comments_top = "inf" # Number of top level comments to show by default. If some comments are not shown, an “X Hidden” link is shown.
max_comments_nested = "5" # Number of nested comments to show by default. If some comments are not shown, an “X Hidden” link is shown.
Expand Down
5 changes: 3 additions & 2 deletions templates/partials/comments.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,9 @@
{% elif comment_system == "isso" %}
data-endpoint-url="{{ config.extra.isso.endpoint_url }}"
{% if config.extra.isso.page_id_is_slug %}
data-isso-id="{{ page.slug }}"
data-title="{{ page.slug }}"
{%- set default_lang_url = current_path | replace(from='/' ~ lang ~ '/', to = '/') -%}
data-isso-id="{{ default_lang_url }}"
data-title="{{ default_lang_url }}"
{% endif %}
{% if config.extra.isso.lang %}
data-page-language="{{ config.extra.isso.lang }}"
Expand Down
2 changes: 1 addition & 1 deletion theme.toml
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ allowed_domains = [
# enabled_for_all_posts = false # Enables Isso on all posts. It can be enabled on individual posts by setting `isso = true` in the [extra] section of a post's front matter.
# automatic_loading = true # If set to false, a "Load comments" button will be shown.
# endpoint_url = "" # Accepts relative paths like "/comments/" or "/isso/", as well as full urls like "https://example.com/comments/". Include the trailing slash.
# page_id_is_slug = true # If true, it will use the post's filename (slug) as id; this is the only way to share comments between languages. If false, it will use the entire url as id.
# page_id_is_slug = true # If true, it will use the relative path for the default language as id; this is the only way to share comments between languages. If false, it will use the entire url as id.
# lang = "" # Leave blank to match the page's language.
# max_comments_top = "inf" # Number of top level comments to show by default. If some comments are not shown, an “X Hidden” link is shown.
# max_comments_nested = "5" # Number of nested comments to show by default. If some comments are not shown, an “X Hidden” link is shown.
Expand Down

0 comments on commit be218c0

Please sign in to comment.