cmc/dotfiles

Using GNU Stow to manage my dotfiles. config dotfiles macos stow

Commit a5d3ecf0ae

a5d3ecf0aebe1802e4bf8ba834693996425a707f

parent: f11fc68a0a

Verified · cmc

cmc <hello@cleberg.net> · 2026-05-01 15:29 UTC

fix: enable markdown serving via org on cleberg.net

Layout: unified · split

linux/nginx/etc/nginx/conf.d/cleberg.net.conf +38 −1
@@ -10,7 +10,44 @@ server {
1010
1111 add_header Onion-Location "http://paske4urhs6nttrtlkuwa5cowum3fjkc6yv6kl4ncx3mjxcd77764nqd.onion$request_uri" always;
1212
13 include custom.d/sites/cleberg_net_static_locations.conf;
13 location /org/ {
14 internal;
15 alias /var/www/cleberg.net/org/;
16 default_type text/markdown;
17 add_header Content-Type "text/markdown; charset=utf-8" always;
18 add_header Vary "Accept" always;
19 }
20
21 location = / {
22 if ($http_accept ~* "text/markdown") {
23 rewrite ^/$ /org/index.org last;
24 }
25
26 add_header Vary "Accept" always;
27 try_files /index.html =404;
28 }
29
30 location / {
31 try_files $uri $uri/ =404;
32 }
33
34 location /blog/ {
35 rewrite ^/blog/((?!index)[^/]+)/(.*)$ /blog/$1.html permanent;
36 if ($http_accept ~* "text/markdown") {
37 rewrite ^/blog/([^/]+)\.html$ /org/blog/$1.org last;
38 }
39 }
40
41 location ~ ^/(.+)\.html$ {
42 if ($http_accept ~* "text/markdown") {
43 rewrite ^/(.+)\.html$ /org/$1.org last;
44 }
45 add_header Vary "Accept" always;
46 try_files $uri =404;
47 }
48
49 location /atom.xml { return 301 $scheme://$host/feed.xml; }
50 location /blog/salary-transparency.html { return 301 $scheme://$host/salary/; }
1451}
1552
1653server {
linux/nginx/etc/nginx/custom.d/sites/cleberg_net_static_locations.conf +15 −4
@@ -1,8 +1,18 @@
11location /org/ {
22 internal;
33 alias /var/www/cleberg.net/org/;
4 default_type text/plain;
5 add_header Content-Type "text/plain; charset=utf-8";
4 default_type text/markdown;
5 add_header Content-Type "text/markdown; charset=utf-8" always;
6 add_header Vary "Accept" always;
7}
8
9location = / {
10 if ($http_accept ~* "text/markdown") {
11 rewrite ^/$ /org/index.org last;
12 }
13
14 add_header Vary "Accept" always;
15 try_files /index.html =404;
616}
717
818location / {
@@ -16,10 +26,11 @@ location /blog/ {
1626 }
1727}
1828
19location ~ ^/([^/]+)\.html$ {
29location ~ ^/(.+)\.html$ {
2030 if ($http_accept ~* "text/markdown") {
21 rewrite ^/([^/]+)\.html$ /org/$1.org last;
31 rewrite ^/(.+)\.html$ /org/$1.org last;
2232 }
33 add_header Vary "Accept" always;
2334 try_files $uri =404;
2435}
2536