From b2a794a66fe8026b139f5b7490bb14774f3e681b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Zaj=C4=85czkowski?= Date: Thu, 13 Feb 2020 14:36:44 +0100 Subject: [PATCH] Ability to disable link do talk page or provide external one Quite often in my case, there is no content that I would like to provide on a dedicated page for a particular page. As a result I would like to be able to disable the link at all or provide an external link (e.g. to the conference page). --- layouts/talks/list.html | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/layouts/talks/list.html b/layouts/talks/list.html index b674147..0101698 100644 --- a/layouts/talks/list.html +++ b/layouts/talks/list.html @@ -22,7 +22,12 @@ {{ .PublishDate.Format (i18n "talks-dateformat") }} - {{ .Title }} + {{ if .Params.disableLink }} +
{{ .Title }}
+ {{ else }} + {{ $talkLink := (.Params.externalLink | default .Permalink) }} + {{ .Title }} + {{ end }} {{ end }} @@ -35,4 +40,4 @@ {{ partial "script/archive-script" . }} -{{ end }} \ No newline at end of file +{{ end }}