diff --git a/.gitmodules b/.gitmodules index 7120c1e..772e979 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "themes/hugomods-images"] path = themes/hugomods-images url = https://github.com/hugomods/images.git +[submodule "themes/hugo-cloak-email"] + path = themes/hugo-cloak-email + url = https://github.com/martignoni/hugo-cloak-email.git diff --git a/config.yaml b/config.yaml index be4f685..fb7c837 100644 --- a/config.yaml +++ b/config.yaml @@ -2,7 +2,7 @@ ## Basic Configuration ## ----------------------------------------------- -theme: ["openrail", "hugomods-images"] +theme: ["openrail", "hugomods-images", "hugo-cloak-email"] title: OpenRail Association copyright: "{year}" diff --git a/themes/hugo-cloak-email b/themes/hugo-cloak-email new file mode 160000 index 0000000..56a81dd --- /dev/null +++ b/themes/hugo-cloak-email @@ -0,0 +1 @@ +Subproject commit 56a81dd2c883161aebc388e09e02dddbe986af36 diff --git a/themes/openrail/layouts/partials/cloakemail.html b/themes/openrail/layouts/partials/cloakemail.html deleted file mode 100644 index 3b65a3e..0000000 --- a/themes/openrail/layouts/partials/cloakemail.html +++ /dev/null @@ -1,42 +0,0 @@ -{{/* - SPDX-FileCopyrightText: Copyright © 2019 onwards, Nicolas Martignoni - SPDX-License-Identifier: GPL-3.0-only -*/}} -{{/* Get address, protocol and other parameters */}} -{{- $address := .address -}} -{{- $protocol := .protocol | default "mailto" -}} -{{- $class := .class -}} -{{- $displaytext := .display -}} -{{- $parts := split $address "@" -}} -{{- $user := (index $parts 0) -}} -{{- $domain := (index $parts 1) | default "" -}} -{{- $query := .query | default "" -}} -{{/* Compute md5 fingerprint */}} -{{- $fingerprint := md5 (print $address $protocol (index (seq 999 | shuffle) 0)) | truncate 8 "" -}} -{{/* Set via CSS what is displayed when Javascript is disabled. Query is never displayed */}} - - -{{/* Alter display with Javascript by changing DOM */}} - -{{/* The end */}}