| @@ -0,0 +1,176 @@ |
| |
1 | |
| |
2 | # Table of Contents |
| |
3 | |
| |
4 | 1. [cleberg.net](#org7e6a5fc) |
| |
5 | 1. [Site Structure](#orgdb622a7) |
| |
6 | 2. [Dependencies](#org4029d4c) |
| |
7 | 3. [Viewing the Site Examples](#orgd805aba) |
| |
8 | 4. [Configuration](#orgc1b1a3d) |
| |
9 | 5. [Setup Instructions](#org16caf48) |
| |
10 | 6. [Building and Publishing the Site](#org507540e) |
| |
11 | 7. [Creating New Blog Posts](#org99866ce) |
| |
12 | 8. [Contributing and Issue Tracking](#org57a6a9c) |
| |
13 | |
| |
14 | |
| |
15 | <a id="org7e6a5fc"></a> |
| |
16 | |
| |
17 | # cleberg.net |
| |
18 | |
| |
19 | This document describes the structure and usage of the `cleberg.net` project. |
| |
20 | The site is built and maintained using the Org-Mode publishing system within |
| |
21 | Emacs, supported by the weblorg package. This setup allows for generation of |
| |
22 | static HTML content from Org files using a declarative configuration. |
| |
23 | |
| |
24 | |
| |
25 | <a id="orgdb622a7"></a> |
| |
26 | |
| |
27 | ## Site Structure |
| |
28 | |
| |
29 | The project source files are written in Org-Mode format and reside in the |
| |
30 | repository. These files are processed by the publishing engine to produce HTML |
| |
31 | output, which can then be deployed to a web server. |
| |
32 | |
| |
33 | The main site components are: |
| |
34 | |
| |
35 | - Org source files containing content, including blog posts and pages. |
| |
36 | - A configuration file (`publish.el`) that specifies publishing parameters like |
| |
37 | base URL, output directories, and export options. |
| |
38 | - Assets such as images and stylesheets, located in designated subdirectories. |
| |
39 | - Utility scripts (e.g., `build.sh`) to facilitate building and deployment. |
| |
40 | |
| |
41 | |
| |
42 | <a id="org4029d4c"></a> |
| |
43 | |
| |
44 | ## Dependencies |
| |
45 | |
| |
46 | The publishing system depends on: |
| |
47 | |
| |
48 | - Emacs text editor with Org-Mode. |
| |
49 | - The weblorg package, available at <https://github.com/emacs-love/weblorg>, which |
| |
50 | provides advanced Org publishing functionality and theming support. |
| |
51 | |
| |
52 | |
| |
53 | <a id="orgd805aba"></a> |
| |
54 | |
| |
55 | ## Viewing the Site Examples |
| |
56 | |
| |
57 | Screenshots illustrating the site in both light and dark display modes are |
| |
58 | included in the `./screenshots/` directory. |
| |
59 | |
| |
60 | <table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"> |
| |
61 | |
| |
62 | |
| |
63 | <colgroup> |
| |
64 | <col class="org-left" /> |
| |
65 | |
| |
66 | <col class="org-left" /> |
| |
67 | </colgroup> |
| |
68 | <thead> |
| |
69 | <tr> |
| |
70 | <th scope="col" class="org-left">Light Mode</th> |
| |
71 | <th scope="col" class="org-left">Dark Mode</th> |
| |
72 | </tr> |
| |
73 | </thead> |
| |
74 | <tbody> |
| |
75 | <tr> |
| |
76 | <td class="org-left"><img src="./screenshots/light.png" alt="light.png" /></td> |
| |
77 | <td class="org-left"><img src="./screenshots/dark.png" alt="dark.png" /></td> |
| |
78 | </tr> |
| |
79 | </tbody> |
| |
80 | </table> |
| |
81 | |
| |
82 | |
| |
83 | <a id="orgc1b1a3d"></a> |
| |
84 | |
| |
85 | ## Configuration |
| |
86 | |
| |
87 | Custom site settings are centralized in the `publish.el` file. This file |
| |
88 | establishes key variables such as: |
| |
89 | |
| |
90 | - The base URL for links. |
| |
91 | - Output directories. |
| |
92 | - Publishing rules defining which files are converted and how. |
| |
93 | - Theme settings managed by weblorg. |
| |
94 | |
| |
95 | Users intending to modify site parameters should review and edit this file |
| |
96 | accordingly. The weblorg documentation contains extensive details on |
| |
97 | configuration options and expected formats. |
| |
98 | |
| |
99 | |
| |
100 | <a id="org16caf48"></a> |
| |
101 | |
| |
102 | ## Setup Instructions |
| |
103 | |
| |
104 | To obtain a working copy of this repository, execute the following commands |
| |
105 | within a shell environment or Emacs’ shell interface: |
| |
106 | |
| |
107 | git clone https://github.com/ccleberg/cleberg.net |
| |
108 | cd cleberg.net |
| |
109 | emacs -nw |
| |
110 | |
| |
111 | For users employing Doom Emacs, open any repository Org file using `SPC f f` to |
| |
112 | access the content. |
| |
113 | |
| |
114 | |
| |
115 | <a id="org507540e"></a> |
| |
116 | |
| |
117 | ## Building and Publishing the Site |
| |
118 | |
| |
119 | The publishing process involves invoking Emacs with the `publish.el` script, |
| |
120 | which performs the export of Org documents to HTML output. |
| |
121 | |
| |
122 | Configure the environment variable `ENV` as follows: |
| |
123 | |
| |
124 | - If `ENV` is set to `prod`, the script uses production base URL settings as |
| |
125 | defined in `publish.el`. |
| |
126 | - If `ENV` is unset or set differently, the script defaults to development |
| |
127 | settings, typically using `localhost:8000` as the base URL. |
| |
128 | |
| |
129 | Example commands to build the site: |
| |
130 | |
| |
131 | # Production build: |
| |
132 | ENV=prod emacs --script publish.el |
| |
133 | |
| |
134 | # Development build: |
| |
135 | emacs --script publish.el |
| |
136 | |
| |
137 | Generated site files reside in the designated output directory, ready for |
| |
138 | deployment. Deployment can be performed by standard file transfer protocols such |
| |
139 | as `scp` or SFTP. |
| |
140 | |
| |
141 | The `./build.sh` script automates the build process. It can be executed with or |
| |
142 | without the `ENV` variable to perform production or development builds |
| |
143 | respectively. |
| |
144 | |
| |
145 | # Production build script: |
| |
146 | ENV=prod ./build.sh |
| |
147 | |
| |
148 | # Development build script: |
| |
149 | ./build.sh |
| |
150 | |
| |
151 | |
| |
152 | <a id="org99866ce"></a> |
| |
153 | |
| |
154 | ## Creating New Blog Posts |
| |
155 | |
| |
156 | To add new blog content, follow this procedure within Emacs: |
| |
157 | |
| |
158 | 1. Open a new Org file (via `C-x C-f` or Doom’s `SPC f f`). |
| |
159 | 2. Insert the contents of the post template with `C-x i`, sourcing from |
| |
160 | `utils/template.org`. |
| |
161 | 3. Modify the new file as needed to add post content and metadata. |
| |
162 | |
| |
163 | This method streamlines content creation by reusing a preformatted template. |
| |
164 | |
| |
165 | |
| |
166 | <a id="org57a6a9c"></a> |
| |
167 | |
| |
168 | ## Contributing and Issue Tracking |
| |
169 | |
| |
170 | Contributions and bug reports are tracked through the repository’s issue tab on |
| |
171 | GitHub. Users are encouraged to submit reports, feature requests, or pull |
| |
172 | requests following standard repository guidelines. |
| |
173 | |
| |
174 | For further details on the usage of Org-Mode, weblorg configuration, or |
| |
175 | publishing workflows, consult the respective documentation sources. |
| |
176 | |