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 KDCzCCMNbGfWCgEAe85BDQ:P1 (envelope-from ) for ; Wed, 25 Dec 2024 13:48:19 +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 KDCzCCMNbGfWCgEAe85BDQ (envelope-from ) for ; Wed, 25 Dec 2024 14:48:19 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=LrCGxaaZ; 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"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1735134498; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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:dkim-signature; bh=CFXEcPESPVWe/zgRVXwjiiEiBj4T+Tx4bdJaJLtnG20=; b=gOvpSPX0aQ/SGLTaHpqvCN0S9cOud3SK2PNCJASnddvm8cu1iPhKw8MFF7nnDjH4x9UNNa AqakS4Q5EyqiVyzApet4gFKXAw8sYPGMU/YcCIW9yyyGxyxtYesuISvxXb7WaWWT4LsJPC e5/6EDf77sosacuXu2A/Jv7IVBEmgZ+9RcSHGUHvNktY2dpvdaVvwMZlucDS/s08BWhK7q J0Oy033qeVmMo/RsK1hUEFf1xjBehYQ8bk3dSsmgkUE2Q4eLLGxl7GX971/5uUbUh1tN4O prh5vc58dmeexcicHcmwS5NjqahYlgjQKcvc5ym4dQcDwHmiMIdoRZYKcHkgKw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=LrCGxaaZ; 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"; dmarc=pass (policy=none) header.from=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1735134498; a=rsa-sha256; cv=none; b=Zw/yGFcEZjsDVhjKOSbgr2f1MOw1ijLhKqPVlHF89gqtTVwltnDs+/rHvBBK7KkXazVfxH MMOJNms4s6LU9ruJKGzKGk8biQ8SyzK/B0HM2sxW7yadvNS/obg/wF1mKCw4WH2uaMsFJX U6WcjbUU9uzGkM8R8xU+cc1QK1Wvz6IFyWyW9zoGTbpGPx5r+NqJ3iAM154QG/nRv1iz6g kJzjAiS3qQjYvaw6B43teHZqOTV9bc1+IafYn4idUpO0WGkm7osF2QG1UOcD2YleG6oWrM eTZ0xthRE5Brtb1pdU++6OBxoLoXQzkh8uVm57oY0r17IgS8QXViyCxS/hDcpA== 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 0755D899D5 for ; Wed, 25 Dec 2024 14:48:18 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tQRjc-0001sy-Fo; Wed, 25 Dec 2024 08:47:36 -0500 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 1tQRjY-0001p5-DE for emacs-orgmode@gnu.org; Wed, 25 Dec 2024 08:47:32 -0500 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tQRjW-0003wP-Bj for emacs-orgmode@gnu.org; Wed, 25 Dec 2024 08:47:32 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 43E3F240027 for ; Wed, 25 Dec 2024 14:47:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1735134446; bh=QQHje1BcGZ3evDTHLNiVSgHFIDwdyp+F+UprIxWK7V0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=LrCGxaaZPBl5jdmgAz4Es0cu/bGz5b7A64JgiGIIajLFNccsCqGXsYhsaf7vk4Oov Y05IMqhsdfAXXvQ8ucqljF40htOX7Ch/xfWBklXMlKr3dpXwuxw7v7eZfkgyw+tLvG 4XvkPKt4Z/kfGqlNYtDPS/cAQ2K+23RxBTe4NzhK73PxTR9k0bFyjIv1OIBO9f5YUx MosFXdpM8sQmKiRbr90bTxz5YJ5n7LPufFx0m/DbcLQAcz6PJR+HPVTggAIqSjxsev ck85q7YO92Nudx7UUTJcNwLHa9KrUSeBWfso9kdhK/KB9BTMaJt4YQ1suqRkdv+iAn Wt89R/9xkN0hQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4YJCk56TrLz9rxB; Wed, 25 Dec 2024 14:47:25 +0100 (CET) From: Ihor Radchenko To: Nikolaos Chatzikonstantinou Cc: emacs-orgmode@gnu.org Subject: Re: Some hacks on top of org-publish In-Reply-To: References: Date: Wed, 25 Dec 2024 13:48:56 +0000 Message-ID: <87ikr7zxdj.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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-Scanner: mx11.migadu.com X-Migadu-Spam-Score: -9.18 X-Spam-Score: -9.18 X-Migadu-Queue-Id: 0755D899D5 X-TUID: IT7QDYmfS2Gy Nikolaos Chatzikonstantinou writes: > 3) Source code blocks + colors (server-side; not a .js coloring client-side) Note that ox-html can fontify src blocks by itself. Via htmlize + CSS styles. > 1) I got colors in source blocks by post-processing with node.js + > highlight.js the raw HTML. Is it possible to write my own backend that > feeds the source block into my node app? Yes, of course. See my next answers. The whole export proces is hackable on multiple levels. > 2) I got several issues with how the org files are exported as HTML, > for example I may want to insert an
tag, I may want a div > around content and a div around nav bar, etc. Not everything can be > solved with #+HTML: tags because I don't have precise control of where > those go. Can the HTML backend be edited or do I have to write my own > backend? Check out https://orgmode.org/manual/Advanced-Export-Configuration.html > 3) I am very inexperienced with org backends. What good resources are > out there for this subject? See https://orgmode.org/manual/Adding-Export-Backends.html Org export backends can use inheritance. So, if you need to re-define a part of backend (if filters are not enough), you can always create a "subclass" by creating a "derived" backend. > Finally a highlight of the hacks I had to pull off: apparently > #+INCLUDE: will strip away inline backend information such as > @@html:@@. I figured out that if I write something like > @@html@@a:@@:@@, only the inner @@a:@@ is recognized and stripped, > which leaves me with what I originally wanted! (see > ) May you show more concrete example? #+INCLUDE by itself does not remove export snippets. -- Ihor Radchenko // yantar92, Org mode maintainer, Learn more about Org mode at . Support Org development at , or support my work at