From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32880 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Indy Singh Newsgroups: gmane.text.pandoc Subject: Re-use metadata variables in header-includes? Date: Mon, 26 Jun 2023 13:43:36 -0700 (PDT) Message-ID: <0528e5ed-7b8e-41c0-a67b-0133b17b8955n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_388_1839971067.1687812216277" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15518"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBC7I5ZPIRYLRB6PQ46SAMGQE6HJA7UA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Jun 26 22:43:42 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oo1-f60.google.com ([209.85.161.60]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1qDt3l-0003sg-AN for gtp-pandoc-discuss@m.gmane-mx.org; Mon, 26 Jun 2023 22:43:41 +0200 Original-Received: by mail-oo1-f60.google.com with SMTP id 006d021491bc7-560c480ccb6sf2522878eaf.1 for ; Mon, 26 Jun 2023 13:43:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20221208; t=1687812220; x=1690404220; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:message-id:to:from:date:sender:from:to:cc :subject:date:message-id:reply-to; bh=JanM5wpgTE8gnsXPYzG9WG7op0P1ft+6cXqdOojmQ4U=; b=GRgAakrXa1LD+XUeDKitRQvLG2P1HcvR9+mtE7XUDpo9dF2Jcn/i4fgcJBeQFxGaaz Z5DEWfqgNj5hxv++Zcpy9He/bxGlDyXuy6mfVR4mKXMs2SOFQc5J9wFa+qQinw46a+WH /ekN7wvgLIWSQ/fIM85KMbHO1OKLz+nXNG2zg+hNQH9kGJZ8uYL80oi2OGpwzLcsJunE lmrpHd6quIvYt8oiau7AtAsjOaLZaxt2BhkV45jxeC7TOfh8OIDFo1fFdAwGa649vvVz xW5Y0XmmA8W9SAVUh686Z9HjRiL5njTmtSPRkqKkolFpX0PsYSCDQ6ZoVxGsNSy0y/tV POlQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687812220; x=1690404220; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:message-id:to:from:date:from:to:cc:subject :date:message-id:reply-to; bh=JanM5wpgTE8gnsXPYzG9WG7op0P1ft+6cXqdOojmQ4U=; b=pzkUdhmmvTlOx1hcmBC1HkhJHSjuE+GbSZkH28C6rDoJvewkd1qCSKJsGPdycSHf1L SrKSFbjumK82P1SR/dBBTm18F4DqhbL3REUBn3hQoAua3kvqQ/66vaDxEkJAaRTBsXOj dd8F/q7i6R12wv5A8Wt2/+SoJnnc7EMGYN0Nh8aX/3dlwdFhUgSrC58eufE2sFKxQoSk Bc+k8o7qJWnpxBhcj5MEmoPp3znNKhWeM7mXVusEe2pfJ4HnckWe3dQUtHL0Pf0IGarm nypjnuuPK4mI6cl11Zr5XCJ3B7qM+1CR3ylJ7RjmebXS+/UOoOHvJczXULCllpeQbDX8 nDbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687812220; x=1690404220; 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-sender:mime-version:subject:message-id:to:from:date :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=JanM5wpgTE8gnsXPYzG9WG7op0P1ft+6cXqdOojmQ4U=; b=NmMofOUhD2bdJOHGQ/46hNsJW9ksgrcyxUfQld4aG82aXUajqaWmsL+euMBbKq/EHr ik/Yrko3Iq2+5jSoWcBhlvYcgkZaImSE0EQny40ttXSTBOOnAtlwJO2IRF1Va1EBRYnG QZ1VD6F3DO2NHYe5xsUX+I2EPe9JOJHYwiZlGa5B1ekBn5gCF21EqtFU6vprqm80ETrl nOguKdYJoZcsOJfjJuyMfPhR6LPyizJlcFUnr4+u9wBNsDW3l9moJA7Qq+lYEDGU5sYQ yW8Pm4RMcv3j5h37sE1kLAoO8b4zKuVcxcsckpoI0TFeBsTGHuDg98FQRbG1wPwuJ/ec Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AC+VfDy8j8M9Ko/sX5vlWYrCVKPAUb99CbglfWviQ80Wm70lc8G5cMtF v5ySI4ZQXfpUIALyEaPF81s= X-Google-Smtp-Source: ACHHUZ5DRzyOgGQ3ljhPizWwxUamgBtbaz+naW4o9fb2Pkbp2WIqyjkfvukB04uG93UHUBu3zvYGJQ== X-Received: by 2002:a4a:a7c2:0:b0:563:2507:3173 with SMTP id n2-20020a4aa7c2000000b0056325073173mr6430531oom.5.1687812220218; Mon, 26 Jun 2023 13:43:40 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a4a:761b:0:b0:555:5bba:2bb0 with SMTP id t27-20020a4a761b000000b005555bba2bb0ls2830447ooc.0.-pod-prod-07-us; Mon, 26 Jun 2023 13:43:37 -0700 (PDT) X-Received: by 2002:a4a:c303:0:b0:55a:ed02:f433 with SMTP id c3-20020a4ac303000000b0055aed02f433mr7431870ooq.0.1687812216828; Mon, 26 Jun 2023 13:43:36 -0700 (PDT) X-Original-Sender: singh400-Re5JQEeQqe8AvxtiuMwx3w@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:32880 Archived-At: ------=_Part_388_1839971067.1687812216277 Content-Type: multipart/alternative; boundary="----=_Part_389_1440405343.1687812216277" ------=_Part_389_1440405343.1687812216277 Content-Type: text/plain; charset="UTF-8" Question is nicely formatted here, but a copy and paste:- Given this as input.md:- ```markdown --- title: Strings Are Evil subtitle: Reducing memory allocations from 7.5GB to 32KB header-includes: | --- rest of the blog ``` Produce this output:- ```html ``` I did try https://pandoc.org/lua-filters.html#replacing-placeholders-with-their-metadata-value and played about with https://github.com/jgm/pandoc/issues/1950#issuecomment-74613325 but I could never get it to work inside the markdown meta block. I've tried various incarnations of `{.thing}` too. Cheers, Indy -- 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 email 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/0528e5ed-7b8e-41c0-a67b-0133b17b8955n%40googlegroups.com. ------=_Part_389_1440405343.1687812216277 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Question is nicely formatted here, but a copy and paste:-

<= div>Given this as input.md:-

```markdown
---
title: St= rings Are Evil
subtitle: Reducing memory allocations from 7.5GB to 32K= B
header-includes: |
=C2=A0 =C2=A0 <meta name=3D"og:type" =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0property=3D"og:type" co= ntent=3D"website">

=C2=A0 =C2=A0 <meta name=3D"title" =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0property=3D"titl= e" content=3D"{{title}}" />
=C2=A0 =C2=A0 <meta name=3D"descript= ion" =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0property=3D"description" cont= ent=3D"{{subtitle}}" />
=C2=A0 =C2=A0
=C2=A0 =C2=A0 <meta = name=3D"og:title" =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 property= =3D"og:title" content=3D"{{title}}" />
=C2=A0 =C2=A0 <meta name= =3D"og:description" =C2=A0 =C2=A0 =C2=A0 =C2=A0 property=3D"og:description"= content=3D"{{subtitle}}" />

=C2=A0 =C2=A0 <meta name=3D"t= witter:title" =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0property=3D"twitter:title" = content=3D"{{title}}" />
=C2=A0 =C2=A0 <meta name=3D"twitter:des= cription" =C2=A0 =C2=A0property=3D"twitter:description" content=3D"{{subtit= le}}" />
---
rest of the blog
```

Produce this= output:-

```html
<meta name=3D"og:type" =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0property=3D"og:type" content=3D"we= bsite">
<meta name=3D"title" =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0property=3D"title" content=3D"Strings Are Evil" = />
<meta name=3D"description" =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0property=3D"description" content=3D"Reducing memory allocations from= 7.5GB to 32KB" />
<meta name=3D"og:title" =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 property=3D"og:title" content=3D"Strings Are Ev= il" />
<meta name=3D"og:description" =C2=A0 =C2=A0 =C2=A0 =C2=A0= property=3D"og:description" content=3D"Reducing memory allocations from 7.= 5GB to 32KB" />
<meta name=3D"twitter:title" =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0property=3D"twitter:title" content=3D"Strings Are Evil" /&= gt;
<meta name=3D"twitter:description" =C2=A0 =C2=A0property=3D"twi= tter:description" content=3D"Reducing memory allocations from 7.5GB to 32KB= " />
```

I did try https://pandoc.org/lua-filters.html#r= eplacing-placeholders-with-their-metadata-value and played about with https= ://github.com/jgm/pandoc/issues/1950#issuecomment-74613325 but I could neve= r get it to work inside the markdown meta block.

I've tried vari= ous incarnations of `{.thing}` too.

Cheers,
Indy

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d= /msgid/pandoc-discuss/0528e5ed-7b8e-41c0-a67b-0133b17b8955n%40googlegroups.= com.
------=_Part_389_1440405343.1687812216277-- ------=_Part_388_1839971067.1687812216277--