From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32881 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Indy Singh Newsgroups: gmane.text.pandoc Subject: Re: Re-use metadata variables in header-includes? Date: Mon, 26 Jun 2023 13:44:03 -0700 (PDT) Message-ID: References: <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_394_1734397928.1687812243989" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17131"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBC7I5ZPIRYLRBFPR46SAMGQEAYOZSZY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Jun 26 22:44:08 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oi1-f190.google.com ([209.85.167.190]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1qDt4C-0004H6-DV for gtp-pandoc-discuss@m.gmane-mx.org; Mon, 26 Jun 2023 22:44:08 +0200 Original-Received: by mail-oi1-f190.google.com with SMTP id 5614622812f47-39a9590f9fdsf2960039b6e.1 for ; Mon, 26 Jun 2023 13:44:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20221208; t=1687812247; x=1690404247; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :sender:from:to:cc:subject:date:message-id:reply-to; bh=o/493afDo1a9RgrUHN+o3sYGsL7QyJECDnEC0SaCOSU=; b=bvNVviu/8veO35b//IQJAjlmbd6PD9MLG6Dm7BtoM9lmZJMjY8azK3y0guK9Km99zV Z53MGW56rnmNE07FZ5XPdVZ79IoYzAngsjv69UOiWMrCzbqthxJcqjCzXZph49RzLFYf ZNe7hv4SNtMItNUbm+vLrYy2De84NG2JGDz2SrGUy53pY8p/hEOnLjURUmk41pUgYUkB S007vDyGS1ugjeXr26aQpc4HXeGrLDCEEMmKeu6i8OvQZgJG8XoIBdXVd56PiOdh6lau aBu5jDBxR4s5YpM4wThSEugL1s/5kmDYkFwUixHG5SM/eCPa5ePvsJlUOojCeBPlV+k5 j1hg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687812247; x=1690404247; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=o/493afDo1a9RgrUHN+o3sYGsL7QyJECDnEC0SaCOSU=; b=ayayiQb8LLrumdQ91xYsG2J85iad6o1Z67dFOvcpxK1OX8Y+MsAnThkUBcnALq1RzX 6VJUPryLqKocaFop7hLwRvprsXEXYn1lMwmYUlzIQ5rGkHzViNLPk+nGspv8y+71mNpN 7Quy0lw5o3D0mFWrkat6MM3bCoieC2ejCsWhQPBBcwIdJBohT26TnGhnQRE+rMZSO3JK WIy+i05VCfDlegDdJLyNOhVe6RVaqxgeFt/4ZI2/MAmEBjksmbyF58OBuXFAt3pSF1G4 +Hfjc6Ggz9aklFquZrMT3ctZB4BhkOOhmURDGJWhgD4ZtxDGIN+FuamBEsL+5g2prHDK NVLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687812247; x=1690404247; 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:references:in-reply-to :message-id:to:from:date:x-beenthere:x-gm-message-state:sender:from :to:cc:subject:date:message-id:reply-to; bh=o/493afDo1a9RgrUHN+o3sYGsL7QyJECDnEC0SaCOSU=; b=W0pwcCUWUdTE4ND2lASE8sFnK/4+wUooCd7fRAyRaV4xptB8GvuaBpOMGyAM6XMNlT f8EkXtPtU3GZr6RJh2H/ZMRNbRJ2NPNhYKNhiDHC0EJCnyxjOpJgpiITIB+eJ3eNuUIt d+1DHFokAUmzouNOHJWDuE62ZziOprK4MT7SC95HJbvhwMm8P+wFvnCKdoV5TYw27VF/ jFprqzjRPJLrgRYmqvOEbB+JjkutByTQ7HpX+qlgfnKFrazRp1lTZ1OSs17a3wUVnE47 oi/II308VRSZeCbRbtU9KQptZ+NlDxlmsVByoEmNeH+vtL45Pq Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AC+VfDyYMKsIxktYzjnb4sRfKiDACfwAXJhKlpKyVTVT93rNoCsfFCSp whnEnoGBdKNmzQ1kX9wJIYk= X-Google-Smtp-Source: ACHHUZ5Mf6mBcpeCO/3K+MpVHS4kCVQoflY8q4ARexgEVkGyIg8av32hfyeiwlzvtJNRYHPt2Ivx9w== X-Received: by 2002:aca:f184:0:b0:39e:b81d:b61d with SMTP id p126-20020acaf184000000b0039eb81db61dmr13391579oih.0.1687812247248; Mon, 26 Jun 2023 13:44:07 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6820:16d:b0:558:b1ed:9f8f with SMTP id k13-20020a056820016d00b00558b1ed9f8fls123977ood.1.-pod-prod-00-us; Mon, 26 Jun 2023 13:44:04 -0700 (PDT) X-Received: by 2002:a05:6808:1529:b0:3a0:9db4:a575 with SMTP id u41-20020a056808152900b003a09db4a575mr6081192oiw.1.1687812244713; Mon, 26 Jun 2023 13:44:04 -0700 (PDT) In-Reply-To: <0528e5ed-7b8e-41c0-a67b-0133b17b8955n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 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:32881 Archived-At: ------=_Part_394_1734397928.1687812243989 Content-Type: multipart/alternative; boundary="----=_Part_395_1958372498.1687812243989" ------=_Part_395_1958372498.1687812243989 Content-Type: text/plain; charset="UTF-8" Question is nicely formatted here: https://github.com/jgm/pandoc/issues/8919 On Monday, 26 June 2023 at 21:43:36 UTC+1 Indy Singh wrote: > 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: | > content="website"> > > content="{{title}}" /> > content="{{subtitle}}" /> > > content="{{title}}" /> > content="{{subtitle}}" /> > > content="{{title}}" /> > content="{{subtitle}}" /> > --- > rest of the blog > ``` > > Produce this output:- > > ```html > > > content="Reducing memory allocations from 7.5GB to 32KB" /> > > content="Reducing memory allocations from 7.5GB to 32KB" /> > content="Strings Are Evil" /> > content="Reducing memory allocations from 7.5GB to 32KB" /> > ``` > > 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/fdbc8315-8a84-4ae7-bdea-aa39bfb88fa9n%40googlegroups.com. ------=_Part_395_1958372498.1687812243989 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Question is nicely formatted here:=C2=A0https://github.com/jgm/pandoc/issue= s/8919

On Monday, 26 June 2023 at 21:43:36 UTC+1 Indy Singh wrote:
Question is nicely = formatted here, but a copy and paste:-

Given this as inp= ut.md:-

```markdown
---
title: Strings Are Evil
subtitle: R= educing memory allocations from 7.5GB to 32KB
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" content=3D"w= ebsite">

=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"= ;title" content=3D"{{title}}" />
=C2=A0 =C2=A0 <met= a name=3D"description" =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0p= roperty=3D"description" content=3D"{{subtitle}}" /><= br>=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&quo= t; content=3D"{{title}}" />
=C2=A0 =C2=A0 <meta name=3D&= quot;og:description" =C2=A0 =C2=A0 =C2=A0 =C2=A0 property=3D"og:d= escription" content=3D"{{subtitle}}" />

=C2=A0 =C2= =A0 <meta name=3D"twitter: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:description" =C2= =A0 =C2=A0property=3D"twitter:description" content=3D"{{subt= itle}}" />
---
rest of the blog
```

Produce this ou= tput:-

```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" con= tent=3D"website">
<meta name=3D"title" =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0property=3D"tit= le" content=3D"Strings Are Evil" />
<meta name=3D&q= uot;description" =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0property=3D&= quot;description" content=3D"Reducing memory allocations from 7.5= GB 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" cont= ent=3D"Strings Are Evil" />
<meta name=3D"og:descri= ption" =C2=A0 =C2=A0 =C2=A0 =C2=A0 property=3D"og:description&quo= t; content=3D"Reducing memory allocations from 7.5GB to 32KB" /&g= t;
<meta name=3D"twitter:title" =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0property=3D"twitter:title" content=3D"Strings Are Evi= l" />
<meta name=3D"twitter:description" =C2=A0 =C2= =A0property=3D"twitter:description" content=3D"Reducing memo= ry allocations from 7.5GB to 32KB" />
```

I did try https= ://pandoc.org/lua-filters.html#replacing-placeholders-with-their-metadata-v= alue and played about with https://git= hub.com/jgm/pandoc/issues/1950#issuecomment-74613325 but I could never = get it to work inside the markdown meta block.

I've tried variou= s 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/fdbc8315-8a84-4ae7-bdea-aa39bfb88fa9n%40googlegroups.= com.
------=_Part_395_1958372498.1687812243989-- ------=_Part_394_1734397928.1687812243989--