From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.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 yG5bBBguu2YxgAAAe85BDQ:P1 (envelope-from ) for ; Tue, 13 Aug 2024 09:57:44 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id yG5bBBguu2YxgAAAe85BDQ (envelope-from ) for ; Tue, 13 Aug 2024 11:57:44 +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=1723543063; 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=A0GsRsI6fJqd6I5p9ye1vVBPiXiTddir307MGJAUfXU=; b=jnoMLPg2MQvTf4MlNMpI85NoXLxFI6ZfmBSggDxn4U9h5I9fUn1KJJycVfNRBH/s/AfUzJ 8DfooRDX5YYMRq297ZHpu+vCq3EDr4b+ASnFY8YHrdf8vVtdOx8ULbUMUEe8hk3vCjd1NX +x4yricylmp+08Na1lJgCxE/z8h06Mwpv1IFyF9sPszWvSaN8CSwaoBmUubXwHD4K0oMq9 pOJudpzHCGOewZsvZSIfhfoTz5yZfFNRXPP6Z7eBvGBipns2nvNoqYDjc1/Ty4ZAY2ENXp ZPTZpiN1XE9lFrotwYgMzvnggjRFLxcGHnzbD9RvrmrsqeoZ7jmkAf8dY5cHEw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1723543063; a=rsa-sha256; cv=none; b=QwrdpSKtDl8GoZI3g83hpRVzVpcd9mOAFQKcVrHiRPnb2NwL2CbiIBjQqBDHO9Egc1rAnz zfyoXXfkNhhWFxogOQWKkVtqW7Bg8/mfvtD4/5QPiztrS6KwS6Gy2Y8jV3d+rbuY6Xx9wt 15nScu/7vEXE/PTurkf3VKOQfexnLE8a8eFblSwqMawVOYVjKPLY8XeBJYGpozJCdyMPMP a4D+aD7I/CubVguUuxej8iWeRp99YMacLWfZZD3sXpmDvjvd54W9ER79tJ2ffyhe9jfmsM PtUitRq81/XPbXc/ybMUa0pdpzq3ER8SMOHpYoRcOhwR89rfZI2r0zBaCD5WXg== 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 BEBE8957B for ; Tue, 13 Aug 2024 11:57:43 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sdoGq-0005qL-8Q; Tue, 13 Aug 2024 05:56:52 -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 1sdoGk-0005XQ-JR for emacs-orgmode@gnu.org; Tue, 13 Aug 2024 05:56:47 -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 1sdoGg-0002gB-N0 for emacs-orgmode@gnu.org; Tue, 13 Aug 2024 05:56:44 -0400 Received: from van (_gateway [192.168.1.1]) (Authenticated sender: seb) by k-7.ch (Postfix) with ESMTPSA id 4F275A13A for ; Tue, 13 Aug 2024 11:56:35 +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: <877ccl3ck0.fsf@k-7.ch> (=?utf-8?Q?=22S=C3=A9bastien?= Gendre"'s message of "Mon, 12 Aug 2024 18:56:15 +0200") References: <87cyme36xg.fsf@k-7.ch> <877ccl3ck0.fsf@k-7.ch> User-Agent: mu4e 1.12.1; emacs 29.4 Date: Tue, 13 Aug 2024 11:56:34 +0200 Message-ID: <87v80421bh.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: BEBE8957B X-Migadu-Scanner: mx11.migadu.com X-TUID: 0362xOzPpT4Z --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Another reply to myself about this specific part: S=C3=A9bastien Gendre writes: > 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? If I want to define the value of my new option "very-strawbery" in the level of an Org-mode buffer (or file), I need to add this new option into the variable `org-export-options-alist` like this: If I evaluate this: (add-to-list 'org-export-options-alist '(:very-strawbery "VERYSTRAWBERY" nil nil)) To quote the docstring of `org-export-options-alist`: > Alist between export properties and ways to set them. >=20 > The key of the alist is the property name, and the value is a list > like (KEYWORD OPTION DEFAULT BEHAVIOR) where: >=20 > KEYWORD is a string representing a buffer keyword, or nil. Each > property defined this way can also be set, during subtree > export, through a headline property named after the keyword > with the "EXPORT_" prefix (i.e. DATE keyword and EXPORT_DATE > property). > OPTION is a string that could be found in an #+OPTIONS: line. > DEFAULT is the default value for the property. > BEHAVIOR determines how Org should handle multiple keywords for > the same property. It is a symbol among: > nil Keep old value and discard the new one. > t Replace old value with the new one. > =E2=80=98space=E2=80=99 Concatenate the values, separating them with = a space. > =E2=80=98newline=E2=80=99 Concatenate the values, separating them with > a newline. > =E2=80=98split=E2=80=99 Split values at white spaces, and cons them t= o the > previous list. > =E2=80=98parse=E2=80=99 Parse value as a list of strings and Org obje= cts, > which can then be transcoded with, e.g., > =E2=80=98org-export-data=E2=80=99. It implies =E2=80=98space= =E2=80=99 behavior. >=20 > Values set through KEYWORD and OPTION have precedence over > DEFAULT. After adding my new export option, I can use it by writing this on my Org-mode buffer/file I want to export: #+VERYSTRAWBERRY: TestTestTest After exporting my Org-mode buffer/file to HTML, I get a preamble with the text "TestTestTest". Note : * Having a buffer option for "very-strawbery" is useful for export but also for publish. I can set a value that will override the value set in the Org-publish project settings. * The variable `org-export-options-alist` is made for options who are back-end agnostic. But I didn't found a way to modify export options of HTML backend without redefine a new backend. Best regards =2D------ Gendre S=C3=A9bastien --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQI/BAEBCAApFiEEaA9vw9ypVj1kP0tAtYb3x3I54p4FAma7LdILHHNlYkBrLTcu Y2gACgkQtYb3x3I54p7pwg//U9f31GBqiU+Pa6Spz+kaG/K4Tl8TpVuVf8VsoYDP +EFqh2gsNQ6CaqGMh2N8wDmScfX/8AqKfLNRIxlze4ivNheEXb16UwicaGjIr2t6 Oh7drB4pGyfGrEYFe7h80dQXXlCIK8s6cEW3HnTar8VM7rPuzO9rHpEVAZKbaM8+ XZKnGQ4ZlkExPkAZd4cVuAgB69TYAwOb/vJ/9VJSJm4porm/QMzPs9lDaqCgvs0j xLehqG7NOwdD7VyoTmac2tDiRI4aaybSO+s6ZK5QIM1LADzkmdfkNN08UeL8bt8V k/8Fpg4ezven2uV3S0WleArS8gtVj9s8MlJGurXBQyWSOlPotiDiGodL6YAVTZoa YRtT4BO0aFnDgFDfVAKRInwYwnGa4QLKhxhrpJ3a6IVZm7EgsXQDWxp0kV1g7zdl Kt5ZgXU8hocSGg4FsDhfNJ4EwzIj3MRVsggVZgTFmDdiFy55e3RmogBpTpakngSs IRGtjqGSs0MrVbWwbg2QdbueTsBgg/IPjqM1vCVLLx05fMf0FgAhu2Gs0VJlBGhI EryVpesGjYOCGTpfO/mxXMiB8fVGKhD5yQ+IqxeQ8RgfdLqnp5GDLMQcgOYbHurV RrGtxkHML60FWpCcC/YFV0bHtvGrpVv10KnvLqE3+DQMceM4loGHiLD32m1RGBpO kzs= =5G0l -----END PGP SIGNATURE----- --=-=-=--