Commit 7eea4f5e14

7eea4f5e14fa452a2c197e7870f27ca42864f685

parent: 2dbea8e72f

Verified · cmc

cmc <hello@cleberg.net> · 2025-06-04 17:33 UTC

fix: revert build idea

Layout: unified · split

.gitignore +1 −1
@@ -1 +1 @@
1.build\ No newline at end of file 1*.html\ No newline at end of file
README.org −8
@@ -6,14 +6,6 @@ This repository contains reusable Org-mode templates intended for structured
6documentation of various workflows. Templates are grouped by domain under the 6documentation of various workflows. Templates are grouped by domain under the
7=templates/= directory. 7=templates/= directory.
8 8
9See the live preview of these templates exported to HTML at
10[[https://org-templates.cleberg.net][org-templates.cleberg.net]]. A set of
11minimal CSS rules are applied from the =assets/styles.css= file.
12
13To generate the HTML files locally, run the provided =export.sh= script from a
14command line shell. This script processes the Org files and produces the HTML
15exports. No additional configuration is required.
16
17* Directory Structure 9* Directory Structure
18 10
19The repository is organized as follows: 11The repository is organized as follows:
assets/styles.css deleted −75
@@ -1,75 +0,0 @@
1/* styles.css */
2/* Minimal, readable styles for Org-mode HTML exports */
3
4body {
5 font-family: system-ui, sans-serif;
6 font-size: 16px;
7 line-height: 1.6;
8 color: #222;
9 background: #ffffff;
10 margin: 2rem auto;
11 max-width: 800px;
12 padding: 0 1rem;
13}
14
15h1, h2, h3, h4 {
16 font-weight: 600;
17 margin-top: 2rem;
18 margin-bottom: 1rem;
19}
20
21h1 { font-size: 1.75rem; border-bottom: 2px solid #ccc; padding-bottom: 0.3rem; }
22h2 { font-size: 1.5rem; border-bottom: 1px solid #ddd; padding-bottom: 0.2rem; }
23h3 { font-size: 1.25rem; }
24h4 { font-size: 1.1rem; }
25
26ul, ol {
27 margin-left: 1.5rem;
28 padding-left: 0;
29}
30
31pre, code {
32 font-family: monospace;
33 background: #f4f4f4;
34 padding: 0.2em 0.4em;
35 border-radius: 4px;
36}
37
38pre {
39 padding: 1em;
40 overflow-x: auto;
41}
42
43blockquote {
44 margin-left: 1rem;
45 padding-left: 1rem;
46 border-left: 3px solid #ccc;
47 color: #555;
48}
49
50table {
51 border-collapse: collapse;
52 width: 100%;
53 margin: 1rem 0;
54}
55
56th, td {
57 border: 1px solid #ccc;
58 padding: 0.5rem;
59 text-align: left;
60}
61
62hr {
63 border: none;
64 border-top: 1px solid #ccc;
65 margin: 2rem 0;
66}
67
68a {
69 color: #0366d6;
70 text-decoration: none;
71}
72
73a:hover {
74 text-decoration: underline;
75}\ No newline at end of file
export.sh deleted −36
@@ -1,36 +0,0 @@
1#!/bin/bash
2
3set -e
4
5SRC_ROOT="${1:-$(pwd)/templates}"
6DEST_ROOT="$(pwd)/.build"
7CSS_SRC="$(pwd)/assets/styles.css"
8CSS_DEST="$DEST_ROOT/assets/styles.css"
9
10# Clean and recreate build directory
11rm -rf "$DEST_ROOT"
12mkdir -p "$DEST_ROOT/assets"
13cp "$CSS_SRC" "$CSS_DEST"
14
15# Export and relocate
16find "$SRC_ROOT" -name "*.org" | while read -r org_file; do
17 # Relative path from templates root
18 rel_path="${org_file#$SRC_ROOT/}"
19 rel_dir=$(dirname "$rel_path")
20 base_name=$(basename "$org_file" .org)
21
22 # Temporary output will go next to source
23 echo "Exporting: $rel_path"
24
25 emacs "$org_file" \
26 --batch \
27 --eval '(require '\''ox-html)' \
28 --eval "(setq org-html-head \"<link rel=\\\"stylesheet\\\" type=\\\"text/css\\\" href=\\\"../assets/styles.css\\\" />\")" \
29 --eval '(org-html-export-to-html)'
30
31 # Move output file to .build
32 mkdir -p "$DEST_ROOT/$rel_dir"
33 mv "$(dirname "$org_file")/${base_name}.html" "$DEST_ROOT/$rel_dir/"
34done
35
36echo "Export complete. Output is in .build/"\ No newline at end of file