summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorChristian Cleberg <[email protected]>2026-02-22 11:51:28 -0600
committerChristian Cleberg <[email protected]>2026-02-22 11:51:33 -0600
commit971a018ea197915a3c3279330dda84c842c7ec3d (patch)
tree46c00750a35b73d8e5916cb050d0ca219055382e /linux
parent38aec5deaf2d127eb225474d7d142deef113547d (diff)
downloaddotfiles-971a018ea197915a3c3279330dda84c842c7ec3d.tar.gz
dotfiles-971a018ea197915a3c3279330dda84c842c7ec3d.tar.bz2
dotfiles-971a018ea197915a3c3279330dda84c842c7ec3d.zip
add markdown fetch support for agents
Diffstat (limited to 'linux')
-rw-r--r--linux/nginx/etc/nginx/conf.d/cleberg.net.conf30
1 files changed, 27 insertions, 3 deletions
diff --git a/linux/nginx/etc/nginx/conf.d/cleberg.net.conf b/linux/nginx/etc/nginx/conf.d/cleberg.net.conf
index e9f2ad3..0570488 100644
--- a/linux/nginx/etc/nginx/conf.d/cleberg.net.conf
+++ b/linux/nginx/etc/nginx/conf.d/cleberg.net.conf
@@ -19,9 +19,32 @@ server {
include custom.d/tls/policy_balanced.conf;
include custom.d/basic.conf;
root /var/www/cleberg.net/;
- location / { try_files $uri $uri/ =404; }
- location /blog/ { rewrite ^/blog/((?!index)[^/]+)/(.*)$ /blog/$1.html permanent; }
- location /wiki/ { rewrite ^/wiki/((?!index)[^/]+)/(.*)$ /wiki/$1.html permanent; }
+
+ location /org/ {
+ internal;
+ alias /var/www/cleberg.net/org/;
+ default_type text/plain;
+ add_header Content-Type "text/plain; charset=utf-8";
+ }
+
+ location / {
+ try_files $uri $uri/ =404;
+ }
+
+ location /blog/ {
+ rewrite ^/blog/((?!index)[^/]+)/(.*)$ /blog/$1.html permanent;
+ if ($http_accept ~* "text/markdown") {
+ rewrite ^/blog/([^/]+)\.html$ /org/blog/$1.org last;
+ }
+ }
+
+ location ~ ^/([^/]+)\.html$ {
+ if ($http_accept ~* "text/markdown") {
+ rewrite ^/([^/]+)\.html$ /org/$1.org last;
+ }
+ try_files $uri =404;
+ }
+
location /atom.xml { return 301 $scheme://$host/feed.xml; }
location /blog/salary-transparency.html { return 301 $scheme://$host/salary/; }
}
@@ -32,3 +55,4 @@ server {
server_name www.cleberg.net cleberg.net;
return 301 https://cleberg.net$request_uri;
}
+