From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32300 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "S. Manning" Newsgroups: gmane.text.pandoc Subject: Re: Determining that a Pandoc Variable is the Empty String Date: Tue, 07 Mar 2023 21:50:02 -0700 Message-ID: <27db87ff42ad3fe1822144a366498919@ageofdatini.info> References: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6817"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDJ5LMOP34CRB7FHUCQAMGQEAAIBNXI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Mar 08 05:50:08 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-ed1-f56.google.com ([209.85.208.56]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pZlke-0001dz-6s for gtp-pandoc-discuss@m.gmane-mx.org; Wed, 08 Mar 2023 05:50:08 +0100 Original-Received: by mail-ed1-f56.google.com with SMTP id dn8-20020a05640222e800b004bd35dd76a9sf22219165edb.13 for ; Tue, 07 Mar 2023 20:50:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1678251007; cv=pass; d=google.com; s=arc-20160816; b=lFIaM4eP8Y7qU4bGALTnnf/NS8hE4i5ih2UteL7NKDQZaNXrr8EoSuZD3CL2gzNTo3 wvhKiARyQV7bOIzR2NyBujeDojD34w1Q/zPULC7HZHi+fYoXun22aeI6mq30RFUi+3yG GfJ9vyEpnMRhp+Ug5SKqqBco67oPRtsjKN5w64WVTwjXepH3J0JcYPqAfTjStfVaE9mu 7bqAHB8MnswvH9Mg6rEAo44uHkFgluvw5PWkxlUo73scj9xZCZmz/SEnXSsM9lkJCJ5T 1kpcbtTyBDEPKTT7syPRpGyTZZxw2Jh4re0pkYrP5zc5k1vsyPVPQy2KwUmfRyYtBOE4 1uTg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:content-transfer-encoding :message-id:references:in-reply-to:subject:to:from:date:mime-version :sender:dkim-signature; bh=O/A6yQ30MhV5j2JUpDbuN1pX/zlwWz7yWC5FIT5gsoY=; b=YWOtDmAvSeNdi/Ro/+HUseZlVdk7N//O5WE7ZuzndNoggNJ89Mn4ohvEnIlGq+CqhK H6sn0f+GbM8S451hhQJW9MZnYrMbReGP40KOsR3C2clWjVBjCcrzhT4IEZD7Qfz0iY4b TvjdbslCNA2l7ytqlAjyy8ZGiNC8qU6K46pLHrHE3vJyE9Pmz/2zT7bTesSZSTqf7Jfy vRhXJYamXXxX64lCOsO4mfO42NWd+j7eZhRiPiX8o17TnQ6NvW2kiVI0Hlu6ftrvRJC5 KF0GXolQ2UC2PRHSFq/wHI8h4mA1IAbNLIMzjt+4B8PD4aCnjqJQSZ928uEhC0s+rf7M EYbg== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@ssl01.alldomains.hosting header.s=dkim header.b=tIceSvZn; spf=neutral (google.com: 213.145.224.20 is neither permitted nor denied by best guess record for domain of scriptor-aFO/2INALiozYggVrLCuDg@public.gmane.org) smtp.mailfrom=scriptor-aFO/2INALiozYggVrLCuDg@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; t=1678251007; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender :content-transfer-encoding:message-id:references:in-reply-to:subject :to:from:date:mime-version:sender:from:to:cc:subject:date:message-id :reply-to; bh=O/A6yQ30MhV5j2JUpDbuN1pX/zlwWz7yWC5FIT5gsoY=; b=hPBh6bpfnVsvy3j5maL9tmUPj2xS6XQbXZY8SKOowW4U0En66VqOo6Hq0D1mzFCSx+ qQCB6Vu8ivWzbMoHM1Fem0OMrE9GqVl08TZE5VakTIXx8hr2gScFFM+a2Iu/pu5f+skO mUrGpSQQfg9D3nfs4AqgMouSF02+cAHtZA4qP9p70iqEFZplCU7Y/ZeMFzulUhvogAa9 X9sulEt/PpLsmAEeB0TsJq6VFvTLXptifdaOofM5Ed/TVqpkPDbeqq0vLON13Ccid0pS Y683Hc8RVhGLB1m0jOzvWTy62qJeyEds09G3Gmt+AqloCFoIp96 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678251007; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender :content-transfer-encoding:message-id:references:in-reply-to:subject :to:from:date:mime-version:x-gm-message-state:sender:from:to:cc :subject:date:message-id:reply-to; bh=O/A6yQ30MhV5j2JUpDbuN1pX/zlwWz7yWC5FIT5gsoY=; b=7MhBgVpTShJh7K5meNoKfGqn/IEhfLNIIPDOzL8AstUwklYgZj/zUgcRMtNgPitZHR 6u0gCriGxWPT5oUglAYEtAjM2TB4GmKx00FubMWSFy3+p9inaqIQ1JEFJOYpDthtSWBm 6rp/QygRxvG+4WfNC4EUDMAtZQQITmpUFhgt17zG+FMQnzdqUie41iQwlKnMtdy/a/X0 kB7dk1iw04EiolJLQJjtjUkWEzZ/obH0yIfUuRtoNf8NpO6wjkzQs8VYr9htHVaH+ps7 uRb4Og Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AO0yUKX5b/a5NHo6D49b24VqwO/V4tbWAEFtspS5QEGHQabifeFe2As8 ubtwg98nEzXfhJ9gxp1BgMA= X-Google-Smtp-Source: AK7set+PvgRprQSavOQ4u2QZ14usFfba+65eLDD7FpYYy4dHYRsKvpZNaygEvuN/ysSd04mNtwz/Ww== X-Received: by 2002:a17:906:5857:b0:8dd:76b6:65b3 with SMTP id h23-20020a170906585700b008dd76b665b3mr8617675ejs.4.1678251007777; Tue, 07 Mar 2023 20:50:07 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a17:907:7fa5:b0:84d:1543:d10e with SMTP id qk37-20020a1709077fa500b0084d1543d10els10062039ejc.1.-pod-prod-gmail; Tue, 07 Mar 2023 20:50:03 -0800 (PST) X-Received: by 2002:a17:907:dab:b0:8ae:11ca:81de with SMTP id go43-20020a1709070dab00b008ae11ca81demr20834690ejc.34.1678251003322; Tue, 07 Mar 2023 20:50:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678251003; cv=none; d=google.com; s=arc-20160816; b=uV+hEr9ZdxSOZClDAEC6Sr3YQHNsoVd7S/Fo/vc38XP7PirItr5ilGCoNiw0lLU4ee WgBX17bHVQEibqFaPMhT9v4Mxuz0SC1H2oYg5eaUWI+FCJtOmYHRE0MRdp0hbomGGGRy 5TJqM/HrXSqL4gZR5ki5Z40WrKU86Nt5nvHdl2+UTwtoKpqB/OtztMYvn0XgeWACS1Rr nk9MrYe7HSHRHmsxiKF2cfBMER8yITLzk5GF2dSp0SYMszJ0LN92soZw9/JFKq9RX6c2 jK/QETuJ/jOrUTWBQB1onKUyOycLhvnKY5hmjA4fn9bSG+AbZ84G+QQcSUU8cSOC942A vn/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:message-id:references:in-reply-to:subject :to:from:date:mime-version:dkim-signature; bh=8RLyWObaqAwnizGD5YThKetCqLL+ODoHoLsErPjdMAA=; b=jC3Pocjw5tC0Ng6UZncYJnCrkaFy5Sddm8gpEnq26vGSJLUIBhmOGzxyNkoqTg3X32 U8kUQsgCsyn2mmf5Ctfx/Rr/ql7dFq/41nrNsz4RJr8qz/mYUpVQgCIhWPDknwlqtDPo qsgdPGAxChFf122iV2I2aPu1A2QrItpSKRdtjb3OEpYDP6AclqhynI0nJYtGYL6fv2xz V30fJwZb7ao3U5S3ZXMGLUWFXIyL0X2o+BitvbsgHhiK2kIkE2ki1/7qIATXzmg0E88S K4WvgW7elUxM+sEEtHwWsHhvEAkpzT5hDImf6fJVlsYZTOj/v1R+EqGyqtGDICEWmC/p gkwg== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@ssl01.alldomains.hosting header.s=dkim header.b=tIceSvZn; spf=neutral (google.com: 213.145.224.20 is neither permitted nor denied by best guess record for domain of scriptor-aFO/2INALiozYggVrLCuDg@public.gmane.org) smtp.mailfrom=scriptor-aFO/2INALiozYggVrLCuDg@public.gmane.org Original-Received: from ssl01.alldomains.hosting (ssl01.alldomains.hosting. [213.145.224.20]) by gmr-mx.google.com with ESMTPS id mm11-20020a170906cc4b00b008b14694acaesi704249ejb.2.2023.03.07.20.50.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Mar 2023 20:50:03 -0800 (PST) Received-SPF: neutral (google.com: 213.145.224.20 is neither permitted nor denied by best guess record for domain of scriptor-aFO/2INALiozYggVrLCuDg@public.gmane.org) client-ip=213.145.224.20; Original-Received: (qmail 2212437 invoked by uid 7799); 8 Mar 2023 05:50:02 +0100 Original-Received: by simscan 1.4.0 ppid: 2212385, pid: 2212407, t: 0.0717s scanners: clamav: 0.103.7/m:62/d:26834 Original-Received: from ssl01.alldomains.hosting (scriptor-aFO/2INALiozYggVrLCuDg@public.gmane.org@213.145.224.20) by ssl01.alldomains.hosting with SMTP [42824]; 8 Mar 2023 05:50:02 +0100 In-Reply-To: X-Sender: scriptor-aFO/2INALiozYggVrLCuDg@public.gmane.org X-Original-Sender: scriptor-aFO/2INALiozYggVrLCuDg@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@ssl01.alldomains.hosting header.s=dkim header.b=tIceSvZn; spf=neutral (google.com: 213.145.224.20 is neither permitted nor denied by best guess record for domain of scriptor-aFO/2INALiozYggVrLCuDg@public.gmane.org) smtp.mailfrom=scriptor-aFO/2INALiozYggVrLCuDg@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:32300 Archived-At: That works for me! I will add it to my 'lab notes' On 2023-03-07 21:44, John MacFarlane wrote: > Try >=20 > tags: [] >=20 > in your YAML if you don't want the for loop to be executed. >=20 >> On Mar 7, 2023, at 8:41 PM, S. Manning =20 >> wrote: >>=20 >> I would like to add a tag system to my static site which I generate=20 >> with Pandoc templates. Adding a tags: variable in myPage.yaml is=20 >> easy, but then I want to add links from pages with the tag to the page= =20 >> for that tag. Code like: >>=20 >> $for(tags)$ >> =E2=87=90 back to=20 >> $tags$  >> $endfor$ >>=20 >> adds a link even if the tags variable is empty ("tags: " in the YAML=20 >> file). >>=20 >> How can I check that the tag is not empty or a null string or however=20 >> Pandoc defines it? >>=20 >> https://pandoc.org/MANUAL.html#interpolated-variables alludes to=20 >> variable types such as string and list, but does not define them or=20 >> explain how to get the attributes of complex variables such as lists. >>=20 >> -- >> You received this message because you are subscribed to the Google=20 >> Groups "pandoc-discuss" group. >> To unsubscribe from this group and stop receiving emails from it, send= =20 >> an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To view this discussion on the web visit=20 >> https://groups.google.com/d/msgid/pandoc-discuss/baea52e4f4b9a22d832faa3= 0ab3fd116%40ageofdatini.info. --=20 You received this message because you are subscribed to the Google Groups "= pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/= pandoc-discuss/27db87ff42ad3fe1822144a366498919%40ageofdatini.info.