Rewrap README; point AWS post links to gitbay !12

merged merged by cmc on 2026-11-05 22:41 UTC · cmc/cleberg.net:readme-and-gitbay-links into main

4 files changed, +62 −66

Layout: unified · split

README.org +59 −63
@@ -15,14 +15,13 @@ The main site components are:
15 15
16- Org source files in =content/=, containing blog posts and pages. That directory 16- Org source files in =content/=, containing blog posts and pages. That directory
17 is the site's URL root: =content/blog/post.org= publishes at =/blog/post.html=. 17 is the site's URL root: =content/blog/post.org= publishes at =/blog/post.html=.
18- A configuration file (=content/orgo.toml=) that specifies the base 18- A configuration file (=content/orgo.toml=) that specifies the base URL,
19 URL, navigation, templates, and the generated pages (home, blog and 19 navigation, templates, and the generated pages (home, blog and garden indexes,
20 garden indexes, tags, and the RSS feed). 20 tags, and the RSS feed).
21- HTML templates in =content/templates/=. 21- HTML templates in =content/templates/=.
22- Assets such as images and style sheets, located in designated 22- Assets such as images and style sheets, located in designated subdirectories.
23 subdirectories. =theme/static/= is published at =/=. 23 =theme/static/= is published at =/=.
24- Utility scripts (e.g., =build.py=) to facilitate building and 24- Utility scripts (e.g., =build.py=) to facilitate building and deployment.
25 deployment.
26 25
27** Dependencies 26** Dependencies
28 27
@@ -35,22 +34,22 @@ The publishing system depends on:
35 34
36** Configuration 35** Configuration
37 36
38You can customize site settings within the =content/orgo.toml= file. 37You can customize site settings within the =content/orgo.toml= file. This file
39This file establishes key variables such as: 38establishes key variables such as:
40 39
41- The base URL for links. 40- The base URL for links.
42- Which pages appear in the navigation, and in what order. 41- Which pages appear in the navigation, and in what order.
43- Per-directory template rules. 42- Per-directory template rules.
44- The collections that generate the indexes, tag pages, and feed. 43- The collections that generate the indexes, tag pages, and feed.
45 44
46Users intending to modify site parameters should review and edit this 45Users intending to modify site parameters should review and edit this file
47file accordingly. The orgo documentation contains extensive details on 46accordingly. The orgo documentation contains extensive details on configuration
48configuration options and expected formats. 47options and expected formats.
49 48
50** Setup Instructions 49** Setup Instructions
51 50
52To obtain a working copy of this repository, execute the following 51To obtain a working copy of this repository, execute the following commands
53commands within a shell environment or Emacs shell interface: 52within a shell environment or Emacs shell interface:
54 53
55#+begin_src shell 54#+begin_src shell
56git clone https://gitbay.org/cmc/cleberg.net 55git clone https://gitbay.org/cmc/cleberg.net
@@ -58,35 +57,35 @@ cd cleberg.net
58emacs -nw 57emacs -nw
59#+end_src 58#+end_src
60 59
61For users employing Doom Emacs, open any repository Org file using 60For users employing Doom Emacs, open any repository Org file using =SPC f f= to
62=SPC f f= to access the content. 61access the content.
63 62
64** Building and Publishing the Site 63** Building and Publishing the Site
65 64
66The =build.py= script wraps the build: it runs orgo, rewrites the footer's 65The =build.py= script wraps the build: it runs orgo, rewrites the footer's orgo
67orgo version to match the orgo that ran, and then either deploys the result 66version to match the orgo that ran, and then either deploys the result or serves
68or serves it locally. 67it locally.
69 68
70Environment variables control what it does, and all default to off: 69Environment variables control what it does, and all default to off:
71 70
72- =BUILD=true= performs the build. 71- =BUILD=true= performs the build.
73- =DEPLOY=true= deploys in production, or starts a development server 72- =DEPLOY=true= deploys in production, or starts a development server on port 8000
74 on port 8000 otherwise. 73 otherwise.
75- =ENV=prod= selects production: image URLs are rewritten to be 74- =ENV=prod= selects production: image URLs are rewritten to be root-relative (see
76 root-relative (see Deployment below) and the =ruff= pass is skipped. 75 Deployment below) and the =ruff= pass is skipped. Anything else builds for
77 Anything else builds for development. 76 development.
78- =DRY_RUN=true= turns a production deploy into a report. Production 77- =DRY_RUN=true= turns a production deploy into a report. Production only; ignored
79 only; ignored everywhere else. 78 everywhere else.
80 79
81Exactly one combination writes to the server: 80Exactly one combination writes to the server:
82 81
83| =ENV= | =BUILD= | =DEPLOY= | =DRY_RUN= | What happens | Output | Server | 82| =ENV= | =BUILD= | =DEPLOY= | =DRY_RUN= | What happens | Output | Server |
84|--------+---------+----------+-----------+---------------------------------------+--------------+-------------------| 83|-------+-------+--------+---------+----------------------------------------+-------------+-------------|
85| unset | =true= | — | — | Development build, =ruff= first | =.build-dev/=| Untouched | 84| unset | =true= | — | — | Development build, =ruff= first | =.build-dev/= | Untouched |
86| unset | =true= | =true= | — | Development build, then serve on :8000| =.build-dev/=| Untouched | 85| unset | =true= | =true= | — | Development build, then serve on :8000 | =.build-dev/= | Untouched |
87| =prod= | =true= | — | — | Production build and image rewrite | =.build/= | Untouched | 86| =prod= | =true= | — | — | Production build and image rewrite | =.build/= | Untouched |
88| =prod= | — | =true= | =true= | Reports what a deploy would change | — | Read only | 87| =prod= | — | =true= | =true= | Reports what a deploy would change | — | Read only |
89| =prod= | =true= | =true= | — | Production build, then deploy | =.build/= | *Overwritten* | 88| =prod= | =true= | =true= | — | Production build, then deploy | =.build/= | *Overwritten* |
90 89
91#+begin_src shell 90#+begin_src shell
92# Development build: 91# Development build:
@@ -105,20 +104,19 @@ ENV=prod DEPLOY=true DRY_RUN=true uv run build.py
105ENV=prod BUILD=true DEPLOY=true uv run build.py 104ENV=prod BUILD=true DEPLOY=true uv run build.py
106#+end_src 105#+end_src
107 106
108Generated site files reside in =.build/= for production and 107Generated site files reside in =.build/= for production and =.build-dev/= for
109=.build-dev/= for development. 108development.
110 109
111The deploy is =rsync --delete-before=, so files the build no longer 110The deploy is =rsync --delete-before=, so files the build no longer produces are
112produces are removed from the server. That is what makes the dry run 111removed from the server. That is what makes the dry run worth having: a build
113worth having: a build that silently produced fewer pages would quietly 112that silently produced fewer pages would quietly delete the rest. Lines
114delete the rest. Lines beginning =*deleting= in the dry-run output are 113beginning =*deleting= in the dry-run output are what the real deploy would remove.
115what the real deploy would remove.
116 114
117Builds are incremental: orgo keeps an =.orgo-cache.json= inside the 115Builds are incremental: orgo keeps an =.orgo-cache.json= inside the output
118output directory and re-renders only what changed, so the directory is 116directory and re-renders only what changed, so the directory is left in place
119left in place between runs. Delete it for a clean build. The two 117between runs. Delete it for a clean build. The two environments use separate
120environments use separate directories because production rewrites image 118directories because production rewrites image URLs in the output and development
121URLs in the output and development does not. 119does not.
122 120
123orgo can also build and preview on its own, without =build.py=: 121orgo can also build and preview on its own, without =build.py=:
124 122
@@ -128,28 +126,27 @@ orgo serve content -o /tmp/preview
128 126
129** Deployment 127** Deployment
130 128
131Production builds rewrite image URLs to root-relative ones 129Production builds rewrite image URLs to root-relative ones (=/img/blog/...=)
132(=/img/blog/...=) instead of absolute =https://img.cleberg.net/= ones so 130instead of absolute =https://img.cleberg.net/= ones so the site renders standalone
133the site renders standalone on the onion service without fetching assets 131on the onion service without fetching assets off-onion. The stylesheet is
134off-onion. The stylesheet is already same-origin. 132already same-origin.
135 133
136This means the web server must serve the image store at =/img/= on the 134This means the web server must serve the image store at =/img/= on the =cleberg.net=
137=cleberg.net= vhost. The images live at =/var/www/img/= (their own host, 135vhost. The images live at =/var/www/img/= (their own host, =img.cleberg.net=);
138=img.cleberg.net=); expose them under =cleberg.net/img/= with a symlink: 136expose them under =cleberg.net/img/= with a symlink:
139 137
140#+begin_src shell 138#+begin_src shell
141ln -s /var/www/img /var/www/cleberg.net/img 139ln -s /var/www/img /var/www/cleberg.net/img
142#+end_src 140#+end_src
143 141
144Without this, images 404 in production. Development builds keep the 142Without this, images 404 in production. Development builds keep the absolute
145absolute =img.cleberg.net= URLs, so local previews load images from the 143=img.cleberg.net= URLs, so local previews load images from the live host and need
146live host and need no symlink. 144no symlink.
147 145
148Once assets are same-origin, the vhost CSP can tighten =img-src=, 146Once assets are same-origin, the vhost CSP can tighten =img-src=, =style-src=, and
149=style-src=, and =font-src= back to ='self'=, and drop =bubbles.town= 147=font-src= back to ='self'=, and drop =bubbles.town= from =script-src=/=connect-src=
150from =script-src=/=connect-src= (the vote widget was removed; only a 148(the vote widget was removed; only a plain link to Bubbles remains). After
151plain link to Bubbles remains). After deploying, purge the Cloudflare 149deploying, purge the Cloudflare cache (responses carry a 31-day =max-age=).
152cache (responses carry a 31-day =max-age=).
153 150
154** Creating New Blog Posts 151** Creating New Blog Posts
155 152
@@ -157,8 +154,7 @@ To add new blog content, follow this procedure within Emacs:
157 154
1581. Open a new Org file (via =C-x C-f= or Doom\'s =SPC f f=). 1551. Open a new Org file (via =C-x C-f= or Doom\'s =SPC f f=).
1592. Insert the contents of the post template with =C-x i=, sourcing from 1562. Insert the contents of the post template with =C-x i=, sourcing from
160 =utils/template.org=. 157 =utils/template.org=.
1613. Modify the new file as needed to add post content and metadata. 1583. Modify the new file as needed to add post content and metadata.
162 159
163This method streamlines content creation by reusing a preformatted 160This method streamlines content creation by reusing a preformatted template.
164template.
content/blog/2026-02-21-auditing-aws-iam.org +1 −1
@@ -18,7 +18,7 @@ To solve this problem, this post walks through a script that does it for you and
18explains what to look for once you have the output. This is something I've used 18explains what to look for once you have the output. This is something I've used
19in practice and want to share, as cloud auditing knowledge seems scarce. 19in practice and want to share, as cloud auditing knowledge seems scarce.
20 20
21The script is available at [[https://github.com/audit-labs/audit-tools/blob/main/applications/aws/aws_iam_users.sh][audit-labs/audit-tools]]. 21The script is available at [[https://gitbay.org/audit-labs/audit-tools/blob/main/applications/aws/aws_iam_users.sh][audit-labs/audit-tools]].
22 22
23* Background: How AWS Provisions Access 23* Background: How AWS Provisions Access
24 24
content/blog/2026-02-21-auditing-aws-passwords.org +1 −1
@@ -10,7 +10,7 @@ number of IT systems. However, things have changed with the introduction of
10cloud platforms. This post covers the process and results of auditing AWS 10cloud platforms. This post covers the process and results of auditing AWS
11passwords. 11passwords.
12 12
13The scripts are available at [[https://github.com/audit-labs/audit-tools/tree/main/applications/aws/aws_password_policy][audit-labs/audit-tools]]. 13The scripts are available at [[https://gitbay.org/audit-labs/audit-tools/tree/main/applications/aws/aws_password_policy][audit-labs/audit-tools]].
14 14
15* Scoping 15* Scoping
16 16
content/blog/2026-03-03-auditing-aws-s3.org +1 −1
@@ -21,7 +21,7 @@ can appear restricted at one layer while still being exposed at another.
21This post walks through a script that checks all three layers for every bucket 21This post walks through a script that checks all three layers for every bucket
22in the account and produces a CSV report. 22in the account and produces a CSV report.
23 23
24The script used in this post is available at [[https://github.com/audit-labs/audit-tools/blob/main/applications/aws/aws_s3_buckets.sh][audit-labs/audit-tools]]. 24The script used in this post is available at [[https://gitbay.org/audit-labs/audit-tools/blob/main/applications/aws/aws_s3_buckets.sh][audit-labs/audit-tools]].
25 25
26* Background: How S3 Controls Public Access 26* Background: How S3 Controls Public Access
27 27