From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id EI/5IAA/umaBnwAA62LTzQ:P1 (envelope-from ) for ; Mon, 12 Aug 2024 16:57:36 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id EI/5IAA/umaBnwAA62LTzQ (envelope-from ) for ; Mon, 12 Aug 2024 18:57:36 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1723481856; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=AA20pKaRWw0AqLJA0o+Z0frOPNRXlrE+DMtmpMd9uSw=; b=jwA5yxAnuWgO72jjJvV7I39M0sknqO4FzJ/B4jPUnb5G8o52wM6PyHOkZxKcmYlO3hB+4H 5KfrjvoRcJAk+J2O0NiD2F0zmm5C6DUrpp3WwVbJEJa5F2QA8jDsI1FUgLLYThBxhYRNCC CN5mSIT4ACWWgHGjh4kG2nSWaNcowB5Z4z6YtM/gdJTM46toZFHSUp0RvcjnSIV/8hzdDW VXj2QfAdJ0GY8upfCx/cg/6GdJKS7n4A85TDbxzbHt6jCeRD5kBfVN1hLU3hHczbL50+OV okMvxNKpCWx63LrPYLRMuRS8zWY1oT/GFfKrTH6BaoDN5Fl5Civp+TV+Qq4R3w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1723481856; a=rsa-sha256; cv=none; b=MZV7ig+aMhwPVCXpBLS/PwhNPQF9Nl/1QP7nxh1+g6zI/GjUvg1ApQ137Fym0m+J+HBYjL 4EME4eUNbKH+g/7ohDugdmi/q9Yo0KwnvifrBNpnt7DW4D0JpgpgIiw8OQkpvhjsXxL+Wk voIG4TYmtTEfprVJ8gkmZdmbm7lOCg/mMcSLst+EHzs+SXtvkcOP/az162Kgt0K22n8F+2 eSOLAr2aU4LDNkMza7pDKhhudhw8uF7TLbiipFlNRU0GtAUl8DHyZylQyrXk/KUO1b00N1 5/HRXE8eMM28YJ32FynigUMrcu0FonREWzwsy7Ed60uj1c85x4yJDITGW9PIFg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 27A643DCBB for ; Mon, 12 Aug 2024 18:57:36 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sdYLI-0002g0-RR; Mon, 12 Aug 2024 12:56:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sdYLG-0002de-MK for emacs-orgmode@gnu.org; Mon, 12 Aug 2024 12:56:22 -0400 Received: from 96-100-31-185.ftth.cust.kwaoo.net ([185.31.100.96] helo=k-7.ch) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sdYLE-0005FO-T5 for emacs-orgmode@gnu.org; Mon, 12 Aug 2024 12:56:22 -0400 Received: from van (_gateway [192.168.1.1]) (Authenticated sender: seb) by k-7.ch (Postfix) with ESMTPSA id 30E34A13A for ; Mon, 12 Aug 2024 18:56:16 +0200 (CEST) From: =?utf-8?Q?S=C3=A9bastien_Gendre?= To: Org mailing list Subject: Re: Build a menu for an HTML publish In-Reply-To: <87cyme36xg.fsf@k-7.ch> (=?utf-8?Q?=22S=C3=A9bastien?= Gendre"'s message of "Mon, 12 Aug 2024 02:45:31 +0200") References: <87cyme36xg.fsf@k-7.ch> User-Agent: mu4e 1.12.1; emacs 29.4 Date: Mon, 12 Aug 2024 18:56:15 +0200 Message-ID: <877ccl3ck0.fsf@k-7.ch> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Received-SPF: pass client-ip=185.31.100.96; envelope-from=seb@k-7.ch; helo=k-7.ch X-Spam_score_int: -8 X-Spam_score: -0.9 X-Spam_bar: / X-Spam_report: (-0.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, RDNS_DYNAMIC=0.982, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, TVD_RCVD_IP=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -5.56 X-Spam-Score: -5.56 X-Migadu-Queue-Id: 27A643DCBB X-Migadu-Scanner: mx11.migadu.com X-TUID: nDjYYR5zK8Db --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable So, I can partially reply to myself: S=C3=A9bastien Gendre writes: > # How to pass parameters to this function > > If I set a function as value to the variable `org-html-preamble`, this > function will receive a plist containing all the export options. > > But can I set custom export option in the publish project alist=C2=A0? > And when I export manually a file, can I set custom export option on > buffer level=C2=A0? > > Or each option in the plist that my function receive need to be defined > in the HTML export backend level=C2=A0? If I use org-publish, define a publish project and set a function as its preamble: Any custom settings in the publish project will be put in the info plist that the preamble function receive as parameter. For example, if I define this function: (defun my/preamble-test (info) "docstring" (plist-get info :very-strawbery)) Then I set a publish project like this: (setq org-publish-project-alist '(("pages-org" :base-directory "./Pages/" :base-extension "org" :recursive t :publishing-function org-html-publish-to-html :publishing-directory "./public/" :html-doctype "html5" :html-html5-fancy t :very-strawbery "Test 1, test 2, test 3" :html-preamble my/preamble-test))) And finally I publish the project "pages-org", in my published web pages I get a preamble with the content "Test 1, test 2, test 3". But if I set the variable `org-html-preamble` to my custom preamble function like this: (setq org-html-preamble 'my/preamble-test) I cannot found a way to define "very-strawbery" value in an Org-mode buffer and having it used while I manually export the Org-mode buffer. I tried with "#+very-strawbery: test123" and "#+OPTIONS: very-strawbery: test123", without success. Someone have an idea=C2=A0? In conclusion, about this point: It is possible to define custom Org-mode publish settings that will be available to a preamble function. But, I cannot found a way to set the value of "very-strawbery" that is used when I export an Org-mode buffer instead of publish it. Best regards =2D------ Gendre S=C3=A9bastien --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQI/BAEBCAApFiEEaA9vw9ypVj1kP0tAtYb3x3I54p4FAma6Pq8LHHNlYkBrLTcu Y2gACgkQtYb3x3I54p5PsQ/5AXW+zn1Vuu6enmjSV4rEfbUhRdmNTySrLMmALhMl gFoc/WotHDY580+zM/VkYLsjQho25g9bIr8H3wkvVA2u73phYtBZFJB+ulZ8hi0L dyOoa46pvddY/0Ehz7KYDqN6JEpU4jSD1OEXq/1FB8vRI7bOlGK3d7JIWmcUmcoy /XEMh6NDf1YtbHMLCTBdLpMh/igHP7bltfLSO0a8PGKjyylWiCjx92M4GiNGjPRB l9Gu6yGTWn4ZBsAWsmOIN64zultFiQyoBVQSfxXE3+QrmRsYmMfnAvm3OJOcnCzf izynllV4TAdxpNMQe4F/QoZdYMx3/tqgnDplr9Y5QpThHsLT7/xBh1s/iMILGhq2 xAxlPwPdu0kG2EZsbnNvA79A+We0AdYJDpEUpzgNNZMNtDm/vbaODgqViaPOEZ6H 1IenWI0Ax5CENn09K5ET7/RM3jfFE8yzIa2awpd2kbdREDlQoeVF9AztuN/d/JSY y979iczL2yeSvM+nDJ+xC07I9xkTgalEXRM29U7DLLCqhZ4JL9YOcrsBqsud2cAv 4NrXK06C8RODbsJWjDZbmaN+MoRqKczNbKwFeqzdxmPuWE46Qojpu8kfNguJkx12 KGxK/x7siHtF6BNPgIEiolFzVnBTok4sMLVfGj1KkCKAGCS9LWS+dVuLhjHQyayD wWs= =qyJ3 -----END PGP SIGNATURE----- --=-=-=--