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 yJdVMZBbuWaRyAAA62LTzQ:P1 (envelope-from ) for ; Mon, 12 Aug 2024 00:47:12 +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 yJdVMZBbuWaRyAAA62LTzQ (envelope-from ) for ; Mon, 12 Aug 2024 02:47:12 +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=1723423630; 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:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=bhtpyZBhZuFZFpUUXEpthGUbgFHEqzbN2K/AbJ2ZcSk=; b=tJYMVvDeDjRafAROaTFHJvGcGYGYRVriBqbcxB/bAFJ3mSNfQfupt5k/PW3uhOWWheBnEs /3ZyX/Jfh5xu5cPRjacCMdqhoJKm7ko2LZBixiKWgYfKu7gxCAMPG5QtsS7TwSBlezEq0U 0UGcP2kWZFVIaSLzSn9LCCj/87SLf0Bv+e5MjurIu9ji1yKbz3srQj48dci7KaTcmTF6Iw IpJhfxJwFtccmyzNKBpFtij9YEq9XVLPkfxnjVbsu0YxDA9Cl338p4bVkxmuilXtK+4T3I uMsI8FjavpQVkDDmRPQmUBj9Uw4ClilBEbBK5sAEaaTG3l7YMXsQ6LtqVrt3Yg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1723423630; a=rsa-sha256; cv=none; b=gEy2Bff9njDikyUpxvEIubW3rlTfM+B3e12BZKgzbtQHu8H99aOC4X+2lIKI0ToUbLj7e/ NQwqC6hbUpuxY4TKIQ7AfcGCSFFFPkyLDarrYgokrCxPykNqJU6uXo3F9pnSvV/7YwL2X+ /5h9tqYGlUMtI0sc1qOVAfg9J4CFNitZ+szdtu7FsxTzuEpi+pE+RE+89egjBDLf9OJ0V4 ByCHmxv7itwzaeqGxNmRXmFzwfb3M3Z7UvwXPV2CzIfNn5SXY+igjSs5eF+lrJB2K1YcCR 7UwFxQ7JPe7yyjkr8NyXOJonrAjqb9H5MMOCmd4+wcGwZPuGZY9B+ymjUl3+yQ== 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 144B3A79D for ; Mon, 12 Aug 2024 02:47:10 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sdJC7-00070h-Pm; Sun, 11 Aug 2024 20:45:56 -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 1sdJBt-0006CH-0s for emacs-orgmode@gnu.org; Sun, 11 Aug 2024 20:45:41 -0400 Received: from k-7.ch ([185.31.100.96]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sdJBq-0001rW-1V for emacs-orgmode@gnu.org; Sun, 11 Aug 2024 20:45:40 -0400 Received: from van (_gateway [192.168.1.1]) (Authenticated sender: seb) by k-7.ch (Postfix) with ESMTPSA id 0B5F3E8120 for ; Mon, 12 Aug 2024 02:45:32 +0200 (CEST) From: =?utf-8?Q?S=C3=A9bastien_Gendre?= To: Org mailing list Subject: Build a menu for an HTML publish User-Agent: mu4e 1.12.1; emacs 29.4 Date: Mon, 12 Aug 2024 02:45:31 +0200 Message-ID: <87cyme36xg.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: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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.55 X-Spam-Score: -5.55 X-Migadu-Queue-Id: 144B3A79D X-Migadu-Scanner: mx11.migadu.com X-TUID: N6EqhwmItNuw --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello, I (continue to) write an online documentation with Org-mode and I want to build the main navigation menu dynamically. I would like to have your opinion about what I plan to do. # What I plan I plan to write a function that I can assign to the variable `org-html-preamble` or the publish setting :html-preamble. This function would take as parameters: * The brand name and/or the brand logo url * The main menu structure And optionally the HTML templates for: * The brand name and/or logo url * The menu item * The menu item with submenu * The menu surrounding * The preamble This function will return the formatted preamble in HTML format. # What I need to define I need to choose how the menu structure is defined. An Elisp alist=C2=A0? An org-mode file containing only a list=C2=A0? If I choose an Elisp alist, do I reuse the Org-mode URL format=C2=A0? If ye= s, is there any org-mode internal function I can use to convert an url like "file:example.org::*some headline" to "https://example.html#custom-id"=C2= =A0? With the Elisp alist, I could use keys as menu labels and associated values= as targets. With this solution, I can have different kinds of targets. If I choose an org-mode file, I cannot control how the HTML export is built. I will need to write my own function that parse the file, extract the needed information and format the HTML result. And I need to use a different extension to avoid having to exclude this file with org-publish. # 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? Best regards =2D------ Gendre S=C3=A9bastien --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQI/BAEBCAApFiEEaA9vw9ypVj1kP0tAtYb3x3I54p4FAma5WysLHHNlYkBrLTcu Y2gACgkQtYb3x3I54p4FWRAAlDnMwFwNu2XjfwNpXbi99ZA3wF93pVN5BN9/OXxJ iYz8uU67IuIWtl7bmeQJXzmsus1DiBgOE0z6Czin1Pc7bJBuhxY4NoM4WbFoaExH AF+gtJFSmOrvp6PS91jJRnu3usgRCTgNPErUV9iF/rd61QcUGVFezVRj4S1Ahd6j 41RVfd76PM0GJgjk7M7fXAFfvIf+jTCU6THbngwT2MVVLN8YI5z6mm4gZgzk1eQm xnL/OkCp3JFxrtLrXETaCJqz8+WIU1OK4GF6ksuEjSZK8g26fbpFOl+V9bja24n8 B6aObgTZDtf4nggNXBQx0/tSchku4ftFXw0SXUFHgnffCnEODmjTYkrAlFgX1h+t S47P8hlX5BR+MAQyV8C5Wa78D99vCC2TtuoHoZBY8TvUMfk2RgJRB0oxM3p8GN+L d6MC4evT3l8vAa0rI40X68jnLPFlRW+4PGF14MJzv8UKxJjZYEdLBI1NFwpJekBa O2F/YrLWCKxK//Ul6Qh2MO6dR5/78D4xM2SwjUL6aysGkGQlmsRJimLxqo/xbmN5 +q2dTnEvGQ8K/ieodo/Fk6UqHLMczDBAlq/XjHGKWzeOWXNKqjyoFLKCFM/4KQs2 XLL9bqDWQYNkrh/vw5Pmqnsk0WU0BBGO+7Kk0DZ2Dk5TSqmgLMzvxcfeupjt93+c PJ0= =p2fd -----END PGP SIGNATURE----- --=-=-=--