From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/33005 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: JJ Newsgroups: gmane.text.pandoc Subject: Setting a template based on YAML metadata blocks Date: Tue, 1 Aug 2023 22:16:07 -0700 Message-ID: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="816"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCX65AVTRILBBI6NU6TAMGQEWYDE7JY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Aug 02 07:16:25 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-pl1-f190.google.com ([209.85.214.190]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1qR4Dh-000AYl-3x for gtp-pandoc-discuss@m.gmane-mx.org; Wed, 02 Aug 2023 07:16:25 +0200 Original-Received: by mail-pl1-f190.google.com with SMTP id d9443c01a7336-1bb29dc715bsf3977435ad.1 for ; Tue, 01 Aug 2023 22:16:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690953383; cv=pass; d=google.com; s=arc-20160816; b=ztbksroektEfkyJ1XSWNNs4369bNSiM3hHERhGxdFjx3e0ATSjI94LPOpkMtOsfprV 7ys3GSkQIPUcviUGqyIrKjWedqvOo1t2hWrzIXzeM3LUa1iFaXojllE1gG/AneBi7c+2 ABLWxhVx4Sf8SY5MIjftdIk/sCq/XKas8JSRP9iMJ4H22BhFOSsryOlMqTC6VhfbfBBv BK5ihN560DIeit/Nu3Dd+lnHQjW9DbU7uCtcyLnd23tj93IDW8Sv6pFgvGI3j8woX6Ho simP6rBf9xpIDchUvkB5X+vbik8OIv8Jt/i6bhiTiI2mpKnKpTW+J/vw67Dkjy8BOpza NO1Q== 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:to:subject:message-id:date :from:mime-version:sender:dkim-signature; bh=UauduoH1tufGXi9KMbdY+dsD3E2oSIMN2dQfI0fIay0=; fh=lLQIEFjEvwB5V09Eekf1lUzB91+XbNjkKM1v5wGHJFY=; b=B+U/1JtQV33sRfheBmTYviPHfTqiwJfktqLb5sWEoQsF3lxZg4EeCYnF1pAWC/Gi6B QpRnwGrO9b3wKCHEyK4bC2ydv0qhwpjPYy1glzQBU9e7oOqpLntD+uvoVyzlfXTm3QSQ vyOHsifKCsLh+8/uONM3EY+hT1knoSXXOuqtq7J7Px+ktLcoOwkFrCUVW8537EoH9hFd nURpUIXei1FSfY9rxhJIEvY2cABQQO2rzNbDmP4ZVnykBjDJZwulrhuw6ohMteD04EZb XdM7viDmLOxwi+v317R5v+V35EollUgJ9/Vj56tPR9AXm+TgCtJlcEl+V5HTiKg32fuY gp6A== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@toki-la.20221208.gappssmtp.com header.s=20221208 header.b=VCDoYpSa; spf=pass (google.com: domain of jj-pl4xscvadcE@public.gmane.org designates 2607:f8b0:4864:20::b35 as permitted sender) smtp.mailfrom=jj-pl4xscvadcE@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20221208; t=1690953383; x=1691558183; 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:to:subject :message-id:date:from:mime-version:sender:from:to:cc:subject:date :message-id:reply-to; bh=UauduoH1tufGXi9KMbdY+dsD3E2oSIMN2dQfI0fIay0=; b=UjyYGrU/G5DpN656iL+oM/nQNWuHxlFivenqxC4s+vAMZMl93AL6Hmpa18YFZHYkzM LndvRp4LjLhCfeOWJh4UA2H6T3cEulwGs1oTOdhf7MeoroLTgcFjqdETB1QhO1VoRg9/ RRz0CixXkCrDAFUVM6zTSMg3PTuWKo9CKKx+NuvZHPNIn0aS8p79JeNPtpebtV7+1XPx acRpmPi/jBHs0HOXg8vF9xTtkJEvC+YTr2tjlf8mPELM3UM4J3OYMl3q+Juh0YXd5ZyB dujRSIqUzwXaVfsOzy92TvAETLpZJD9vrVJpCFzY0taZMgF6Jskn+tCzbsC04XAr1vwW tHzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690953383; x=1691558183; 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:to:subject :message-id:date:from:mime-version:x-beenthere:x-gm-message-state :sender:from:to:cc:subject:date:message-id:reply-to; bh=UauduoH1tufGXi9KMbdY+dsD3E2oSIMN2dQfI0fIay0=; b=VysP8aRuHleZyV+sl40LkT709brJ/N2OstJIqnbBtk3+2MxgayU/59UBqPwTidEH3+ a8+nAQeKFNsy0enkE3kGOjokOLUUYnrAFYv271UIPUpxEqXiIk1N1I3yFNDOUANIbTvh 1wjiDwklaEDgp6BHAv46bzHJBmIf2JGcDqpXVQlxr9wpoYHJoMtAnWEC2GQhroByeCBK IJHoLUKRso5VG1shF6QMDOzamE6b7GwlAo/inWAowwaoE3xBL3kJAnO8cR17XQBU/VYl 9gm+yxKU4omfMFYLTXLGx0NDsdZure3CGVTczZJ Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: ABy/qLZIWDcJZ+r/+1uXTLERQHq2X/UwBuDSZYc+XnxnOgCyOgIZs/M1 USzUmwnLtpn4Ai0GGYNujmM= X-Google-Smtp-Source: APBJJlGLYMTNtjLUeL9k3DE2f53WHCVNyNnW9ZKmQQRkBiqC0cE7vHBGeIubJ9AidcvBsSv9wkaGdg== X-Received: by 2002:a17:902:d481:b0:1bc:1d1b:2314 with SMTP id c1-20020a170902d48100b001bc1d1b2314mr7975917plg.26.1690953383730; Tue, 01 Aug 2023 22:16:23 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a17:902:6848:b0:1bb:7c82:bc2b with SMTP id f8-20020a170902684800b001bb7c82bc2bls1404789pln.2.-pod-prod-00-us; Tue, 01 Aug 2023 22:16:18 -0700 (PDT) X-Received: by 2002:a17:903:11c3:b0:1bb:b2f7:e075 with SMTP id q3-20020a17090311c300b001bbb2f7e075mr19465861plh.7.1690953378677; Tue, 01 Aug 2023 22:16:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690953378; cv=none; d=google.com; s=arc-20160816; b=BhNj81n1YNxg2xuPz6PR7JtpYFH2gTJdMcs3JMajNjkx3ieFR372e6jIBcsCaM8Idg hx4lnhqiCwZ266FIPg3YBDhQY6/Cft/hQ5EY0uwt0vSQuhIWJe8jgVELFxqZF7qvM4R6 OaW/6tGhNE1FtUIn0LszLz6BijtEGAXYSQ0X3Oqf4RL2OD4DcuBK1U0SLq+BjqGP8VB9 0GsekZO/PTsmkVWXpm9JyVqdkbjqNl84zq3r+0t39zPD1XnvWBhQyj+wNaRhXxBKepIJ b1YKPHbdGMmktBHvT1yGNzjQu6fXBIXOsiP2iXm87c4mPfl6SzGMrTo8jOYmaUB5HCQv nA1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:subject:message-id:date:from:mime-version:dkim-signature; bh=eunqAxF/zTEIPbnne9fvd2RNPPTLAAG4KNajc30CLXc=; fh=lLQIEFjEvwB5V09Eekf1lUzB91+XbNjkKM1v5wGHJFY=; b=EECifaPb/S9ezivRFzgUfssPycWWPUVoc0/OF4unOrJcqafXJYxj+ZljdDXryRofkI +dS7OIP4uibqR3WT48/r9FK1EoXBH6RSj/jIKqVR9vHIv6dAzhTJRVQeG1iHbQW1Q/KT v+C8oM7fC6ppBLPWtlPccPhygmbC9XcWCfTQvhEYucKc9/ehhm4ztYLRgUp4o3AHI8SE Ui0Lhr6cjQVBXM0TTb+rxfEiQS2Fz35J2FNPe3K+cF4RReCz5NZRuTozF7C9q6Asi5nm 9/lKH+vykh8IJ2lt0a/6as1ugYz4tYLwQFEzB5167quk9M/s26zfCu4VxAylrZ0JmlaU ijgA== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@toki-la.20221208.gappssmtp.com header.s=20221208 header.b=VCDoYpSa; spf=pass (google.com: domain of jj-pl4xscvadcE@public.gmane.org designates 2607:f8b0:4864:20::b35 as permitted sender) smtp.mailfrom=jj-pl4xscvadcE@public.gmane.org Original-Received: from mail-yb1-xb35.google.com (mail-yb1-xb35.google.com. [2607:f8b0:4864:20::b35]) by gmr-mx.google.com with ESMTPS id kf4-20020a17090305c400b001bbcd26568asi780576plb.12.2023.08.01.22.16.18 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 01 Aug 2023 22:16:18 -0700 (PDT) Received-SPF: pass (google.com: domain of jj-pl4xscvadcE@public.gmane.org designates 2607:f8b0:4864:20::b35 as permitted sender) client-ip=2607:f8b0:4864:20::b35; Original-Received: by mail-yb1-xb35.google.com with SMTP id 3f1490d57ef6-d299ed34bacso779459276.1 for ; Tue, 01 Aug 2023 22:16:18 -0700 (PDT) X-Received: by 2002:a25:26c6:0:b0:d05:2616:3363 with SMTP id m189-20020a2526c6000000b00d0526163363mr17411334ybm.26.1690953377720; Tue, 01 Aug 2023 22:16:17 -0700 (PDT) X-Original-Sender: jj-pl4xscvadcE@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@toki-la.20221208.gappssmtp.com header.s=20221208 header.b=VCDoYpSa; spf=pass (google.com: domain of jj-pl4xscvadcE@public.gmane.org designates 2607:f8b0:4864:20::b35 as permitted sender) smtp.mailfrom=jj-pl4xscvadcE@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:33005 Archived-At: Hello, I've been acquainting myself with pandoc for the past few days. It's quite neat. I particularly do like pandoc's markdown flavour: it's everything I've ever wanted out of such an extension! I had some questions that I've been unable to find answers to in the manpage or elsewhere, however. Is it possible to specify a template that pandoc is to use in a YAML metadata block? Presumably this would only work with --standalone. I've attempted `template: ` after seeing it elsewhere and hoping it may work, but no dice. This seems like a common enough use case that I'd imagine there is an option I am missing: or perhaps people on this mailing list have external solutions. (though I was hoping to avoid the use of sed: for no reason other than I've only had to use pandoc in my script so far, which has been quite neat) Also, what is best practice for "including" HTML fragments in pandoc? I've found nothing in pandoc for this purpose so far - which, well, makes a lot of sense. I was planning on first trying to rework things to rely entirely on templates, and then in the event of failure just sed-ing it up. But I harbour some concerns about accidentally replacing text strings or code blocks. Also also I am curious: what is the background behind *default* html templates needing the .html5 extension, but regular html templates using .html? This threw me for a bit of a loop for a bit. -- JJ