From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id YPGDJbDPcGd8VgAAe85BDQ:P1 (envelope-from ) for ; Sun, 29 Dec 2024 04:27:28 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id YPGDJbDPcGd8VgAAe85BDQ (envelope-from ) for ; Sun, 29 Dec 2024 05:27:28 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=h5NHUwjY; 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=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1735446448; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=aW/HA1ksutc8tA+HJ7jzYZDI4Z9f5rhqkLZBGqxyutM=; b=U9qMKjg7kLd9bnmKeijUabr+cMM/BRWa/FcftV6sAzIqacmyhL8auqy9OiobjMWji0kp/Z txZ+uQup0fKq2h+B6rdRWIi+pI++q2j2RXpOYfIhb1hsrwjzkOyHFa9xZsZ+AvoXxXIuNv 6i/10NJ0YluowZxXrzxfQp//a/2kZOuMcgcdm8ee73Nq1idxsWGMPyyiK6yYjR1qp1Ljtu LHSUynh/DSRoMQLZnnd347FOYblrUZYp/Cm3uAHuSqf6V+BL8ivLed5o1V0yepWhJPY3H8 Dwhb+FTFBCwrjPTvAEaafVDFcUz5goh0TueZXNB30d9lkeoZlIQrA3kLc6Wb8A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=h5NHUwjY; 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=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1735446448; a=rsa-sha256; cv=none; b=RsdJ+oBJ+QdIWcE8Cdb+eBW6bPYcuhqaYoJpKRzWjFT8NbagNiKjGD9ncm2UGhdc2Ubsd9 jLg8EZuEkN0QYue/ED9v0DK9kAMWnBcoVk2o8R/7XFqPij6LXub81To2yAqCYj2zUlxCY/ X4aPz399U1HQwzPR2GfKvdmNOgkizfUUc7D2fQ0r7eUBYnC2InF6TLgxIvDOqQpfB6oyaj 02ol0b9KBzT8KmWEl7e9OPyxSPARSRFqI7kuN+1P595w7C7sNirlsCCwEt2Xm0VhfEP8+X ZTNujD1mKVCLnAuw1YJPxvQ3T73EQGpQzmbONNl2++604VpBQcZ16H6RYZNNwg== 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 690ED1F621 for ; Sun, 29 Dec 2024 05:27:28 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tRktE-0006QW-Mf; Sat, 28 Dec 2024 23:26:56 -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 1tRkt9-0006QC-6A for emacs-orgmode@gnu.org; Sat, 28 Dec 2024 23:26:53 -0500 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tRkt5-0003dj-C1 for emacs-orgmode@gnu.org; Sat, 28 Dec 2024 23:26:49 -0500 Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-2163dc5155fso102351255ad.0 for ; Sat, 28 Dec 2024 20:26:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735446405; x=1736051205; darn=gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=aW/HA1ksutc8tA+HJ7jzYZDI4Z9f5rhqkLZBGqxyutM=; b=h5NHUwjYyYkDgACzCczxg/hCwiQDARhWx2oGBWyPvtlezDqpCO331gIXvGThMamYLa 9dAa7rQm+DFYeSRHQhm+AVZManIQngDwz0EczcNh6JH8cKzFTy6bJZUm/RpvxdLh+ChS TcJNfa/70rz5YVFUYgihwPy8hBpWrSGsnFIJvkgvUiB1kKjA98sE2w9/EpLBiP4Tvme2 rtT+88j0xEPLCa2ujQVgg+HbAW+USff0GOtL42p2sJnUQ+s9W7AZPrWAdRXIGYqTbYnR AKo3mXssQztRoZ2e+Kdip2l7BxByaMbQtXyxeJYcr1ftplHKdA0tNg9t9S6Qovfy+cRy DX+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735446405; x=1736051205; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=aW/HA1ksutc8tA+HJ7jzYZDI4Z9f5rhqkLZBGqxyutM=; b=kd58MBVYiRS0VJR2KcKt+E+pSchRhTnc1GE6O+JTSwRmSRCzDRinE9bli7/V0Urj/V 1sHTk/HLsOBS0tlnKftGxOb6sGofstR13a0bxWxUFkMy3Gay5xm90m2CBet76kgyEJQ8 wt7MCMiuaeaNzP4l3JxL8rW+3AZTzB9vx/M+LFY0KPWdNKBFtLt8yjVIptHNKq+6TQeC /EiOnrLtThxfCQkhkZEJHTorfk7yar+u87vQM2bXfK1g6H8cUtp8pYAjUSAsxTXDoe6z P3RQOLSUIs2218Od+JhZPik+wUoWmSGVFU+uwTWkf9aLaPwhwGWAxfgfAmsWZkHcPm6S aC4Q== X-Gm-Message-State: AOJu0YxiB92nzQtOVVsU43yaX6CngOLSUgHP0jAvEu0XpGN0krQr44ZR dw4MsW2+ZJ93dsqPYZf9ZWzcWLBj10SePtHlOTVZTOk4LtgJ5f4P5UOLcEpv0BbTFFlzy2nKJM8 2crFrJ4HGKj/OFxm/aZ215trypH/5v04n X-Gm-Gg: ASbGnct/N6k3id2P2TL3kt4BFqGfS5q5AX9d8z7qEX444T30rwL04cTx9RHUFngXABl CSXensPdMGSTbmkO/6jZsKfbVty0BPmiACcg= X-Google-Smtp-Source: AGHT+IF84hGIm3Np164NdWEVCBD7AEg+UXx10y+XFGyF+O0rGCMWtC4DnOmHsdTsZl9y3gI5dKQDh3jA7d88DeC+Xwk= X-Received: by 2002:a17:902:c941:b0:215:4d90:4caf with SMTP id d9443c01a7336-219e6ea1bb5mr357971145ad.14.1735446405131; Sat, 28 Dec 2024 20:26:45 -0800 (PST) MIME-Version: 1.0 References: <87ikr7zxdj.fsf@localhost> In-Reply-To: <87ikr7zxdj.fsf@localhost> From: Nikolaos Chatzikonstantinou Date: Sat, 28 Dec 2024 23:26:34 -0500 Message-ID: Subject: Re: Some hacks on top of org-publish To: Ihor Radchenko Cc: emacs-orgmode@gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::62c; envelope-from=nchatz314@gmail.com; helo=mail-pl1-x62c.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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: mx12.migadu.com X-Migadu-Spam-Score: -6.46 X-Spam-Score: -6.46 X-Migadu-Queue-Id: 690ED1F621 X-TUID: P1xSWHdP84Ol On Wed, Dec 25, 2024 at 8:47=E2=80=AFAM Ihor Radchenko wrote: > > 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 sty= les. > > > 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. I should probably try to do this, but I got inspired by Worg's website which does not do any backend hacking as far as I can tell, but instead puts some javascript to collapse the table of contents. If you check my blog now, it looks almost OK in mobile phones. I do want to write the backend stuff, but it feels like such a chore. The ox-latex.el (which the manual gives as an example of a not-derived backend) is a bit overengineered for my taste, in the sense that I need to pay a lot of attention to figure it out. Do you have a particular backend for me to look at as a recommendation of an easy source? I don't want it to be derived because I want to understand the whole process. Regards, Nikolaos Chatzikonstantinou