diff --git a/assets/js/main.js b/assets/js/main.js
new file mode 100644
index 0000000..def29f8
--- /dev/null
+++ b/assets/js/main.js
@@ -0,0 +1,19 @@
+const obfuscates = document.getElementsByClassName("obfuscate");
+for (const element of obfuscates) {
+ const link = document.createElement("a");
+ const separators = element.dataset.separators;
+ const protocol = element.dataset.param1.split("").reverse().join("");
+ let url = protocol;
+ for (let i = 0; i < separators.length; i++) {
+ url += separators[i] + element.dataset["param" + (i+2)].split("").reverse().join("");
+ }
+ let text = element.dataset.param2.split("").reverse().join("");
+ for (let i = 1; i < separators.length; i++) {
+ text += separators[i] + element.dataset["param" + (i+2)].split("").reverse().join("");
+ }
+ link.innerText = url.replace(new RegExp(element.dataset.regex, 'i'), element.dataset.replace);
+ link.href = url;
+ link.rel = "nofollow";
+ element.parentElement.insertBefore(link, element);
+}
+while (obfuscates.length > 0) obfuscates[0].remove();
diff --git a/assets/styles/link.sass b/assets/styles/link.sass
new file mode 100644
index 0000000..0aff268
--- /dev/null
+++ b/assets/styles/link.sass
@@ -0,0 +1,7 @@
+.obfuscate:before
+ content: attr(data-param2)
+ unicode-bidi: bidi-override
+ direction: rtl
+
+ &.at
+ content: attr(data-param4) "\002E" attr(data-param3) "\0040" attr(data-param2)
diff --git a/assets/styles/main.sass b/assets/styles/main.sass
index 5d4dd8f..cbbc759 100644
--- a/assets/styles/main.sass
+++ b/assets/styles/main.sass
@@ -1,2 +1,3 @@
@import "./variables"
@import "./grid"
+@import "./link"
diff --git a/layouts/_default/_markup/render-link.html b/layouts/_default/_markup/render-link.html
new file mode 100644
index 0000000..7327822
--- /dev/null
+++ b/layouts/_default/_markup/render-link.html
@@ -0,0 +1,36 @@
+{{/*
+ S'il n'y a pas de / dans l'url d'un lien alors on ajoute le path du répertoire
+*/}}
+{{ $isExternalLink := strings.HasPrefix .Destination "http" }}
+{{ $isWebLink := or $isExternalLink (eq 0 (.Destination | strings.Count ":")) }}
+{{ $isTelLink := strings.HasPrefix .Destination "tel:" }}
+{{ $isMailtoLink := strings.HasPrefix .Destination "mailto:" }}
+{{ $hasSlash := in .Destination "/" }}
+{{- if $isWebLink -}}
+ {{ $link := cond (and $isWebLink (and (not $hasSlash) (not $isExternalLink))) (path.Join "/" .Page.Dir .Destination) .Destination }}
+ {{ .Text | safeHTML }}
+{{- else -}}
+ {{- $separators := cond $isMailtoLink ":@." ":" -}}
+ {{- $regex := cond $isMailtoLink "[a-z]*:(.*)" "[a-z]*:([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})"}}
+ {{- $replace := cond $isMailtoLink "$1" "$1 $2 $3 $4 $5" -}}
+ {{- $string := .Destination -}}
+ {{- $params := slice -}}
+
+ {{- range split $separators "" }}
+ {{ $parts := split $string . }}
+ {{ $params = $params | append (index $parts 0) }}
+ {{ $string = index $parts 1 }}
+ {{ end }}
+ {{- $params = $params | append (string $string) -}}
+
+
+{{- end -}}
+