From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id uC9TBqzr6mENmgAAgWs5BA (envelope-from ) for ; Fri, 21 Jan 2022 18:21:48 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id SNobA6zr6mErzgAAauVa8A (envelope-from ) for ; Fri, 21 Jan 2022 18:21:48 +0100 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 AA8E84233C for ; Fri, 21 Jan 2022 18:21:47 +0100 (CET) Received: from localhost ([::1]:53094 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nAxbe-00084n-Kz for larch@yhetil.org; Fri, 21 Jan 2022 12:21:46 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34998) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nAx3w-0000Q3-OK for emacs-orgmode@gnu.org; Fri, 21 Jan 2022 11:46:56 -0500 Received: from ciao.gmane.io ([116.202.254.214]:42690) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nAx3v-0002JW-6q for emacs-orgmode@gnu.org; Fri, 21 Jan 2022 11:46:56 -0500 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1nAx3n-0007RM-Uh for emacs-orgmode@gnu.org; Fri, 21 Jan 2022 17:46:47 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Max Nikulin Subject: Re: Exporting Org file to Html with collapsable headings Date: Fri, 21 Jan 2022 23:46:38 +0700 Message-ID: References: <875yqduvju.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 In-Reply-To: <875yqduvju.fsf@posteo.net> Content-Language: en-US Received-SPF: pass client-ip=116.202.254.214; envelope-from=geo-emacs-orgmode@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 28 X-Spam_score: 2.8 X-Spam_bar: ++ X-Spam_report: (2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FORGED_MUA_MOZILLA=2.309, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NICE_REPLY_A=-0.001, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1642785707; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=C9n3H1ACeJpnxbQV56OnzgMFXTOEQ9theDtmzhgL3Zw=; b=dH5Uugl26DwgNYa5M6pvUJGixY3vIq86NrOsDyFlUM7dxqXv7Q5ZAbC3dvXVzq6GPil/Hh FepO+3M5qzpCwoRMslKL2c2dVxdoUBxA6eagLwoo3WUP2hUtcZEgLyn5nmVpZ+ki46BRRj 2Aco7tJmmjWvQSwYiu6b/zgw664Ek1hTfq8HZ4V+U0pHCtn9KUKRKN0Hd2PSmgub5EaCmf 7AIrc0Zz3AJ8PYe+uV9pQx0/3NZUWW9ssgUl0RiaFBXu1lGS2C6BJjnsUKmyB59B5kMQDv dOKdcdAgeiFbndkdfroc95FAMeyNkL/JrXMsHLMtSv/rxeLj0f6MIvJCoNhh0A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1642785707; a=rsa-sha256; cv=none; b=bABZo2TnbU/hSa02SQGiZBK5RnYMRRyS6hhH2vCd/CXo7/MGEuQoAYrBg5XUPwt2mYuaf+ lMZ74UOnyLSPuPvdjxGebX9xnfcTAKyryNRcEEEUXB3Ox4H6apTG2g9KXfmxa8ZB74vxrl flhkO92KP5BAO5CJpsHlsoEoYTeH03WgSNcd+uHuWoOniawpGAhhm3k11m9k0DSHqK96WW 3bMCFgG6hpXpuIx7ZXi7RsQt1cNcfCtzIe+4jEo9WM5BG2PboF4pjUDbesbXqKMSe5IRFS e382VFNTmy8t0hJHgT9kZiprumXzAR5a6FYIfLSV1E+PMJorrq8BO0Jlrs6GOQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=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" X-Migadu-Spam-Score: -2.53 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=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" X-Migadu-Queue-Id: AA8E84233C X-Spam-Score: -2.53 X-Migadu-Scanner: scn1.migadu.com X-TUID: XN+VzMPKzMo4 On 21/01/2022 19:23, Juan Manuel MacĂ­as wrote: > ZIPING CHEN writes: > >> I may have many things like this in the middle of the file. >> ************************** a new heading. >> >> I wish to turn all layers of >> headings in org file into collapsable headline to html. >> >> Does anybody know a way I can accomplish this? > > I think that you need to add javascript and enclose the collapsible > content in a div. Have a look at info "(org) JavaScript support" https://orgmode.org/manual/JavaScript-support.html (I have not tried that folding view). HTML has
headerbody
elements that works without JS, but it will require custom exporter. You should ensure that deep headings can not be recognized as org inline tasks. Check ox-html, it may has limit on number of levels that are exported as headings with switching to lists for deeper structures.