X-Git-Url: https://git.ladys.computer/x_status_git/blobdiff_plain/b07270ecbc9ca480c69b7085cf445a0358e22df4..27d67f5fdc5741c6894f9ca1624c417956839190:/Caddyfile?ds=sidebyside diff --git a/Caddyfile b/Caddyfile index 03420b8..a430aae 100644 --- a/Caddyfile +++ b/Caddyfile @@ -9,9 +9,14 @@ status.site.example { path_regexp jsonld \.jsonld$ } + @atom { + path_regexp atom \.atom$ + } + @bare { not path_regexp /$ not path_regexp \.jsonld$ + not path_regexp \.atom$ } @empty { @@ -21,11 +26,27 @@ status.site.example { handle / { rewrite * /index.html header Link ;rel=meta;type="application/ld+json" + header Link ;rel=alternate;type="application/atom+xml" + } + + @iri { + path_regexp matcher ^/(?P[^/:]+:[^/]+)/?$ + } + + handle @iri { + handle @bare { + rewrite * /.lookup.xhtml + } + + handle @slash { + redir * /{re.matcher.iri} + } } handle /about { rewrite * /.about.html header Link ;rel=meta;type="application/ld+json" + header Link ;rel=alternate;type="application/atom+xml" } redir /about/ /about @@ -35,12 +56,15 @@ status.site.example { handle /statuses { rewrite * /.statuses.html header Link ;rel=meta;type="application/ld+json" + header Link ;rel=alternate;type="application/atom+xml" } redir /statuses/ /statuses rewrite /statuses.jsonld /statuses/index.jsonld + rewrite /statuses.atom /statuses/index.atom + @dated { path_regexp matcher ^/statuses/(?P\d{4}-\d{2})(?P/[^/.]+)?(?:\..*|/)?$ not path_regexp ^/statuses/index[/.]? @@ -51,6 +75,7 @@ status.site.example { handle @bare { rewrite * /.topic.html header Link ;rel=meta;type="application/ld+json" + header Link ;rel=alternate;type="application/atom+xml" } handle @slash { @@ -60,12 +85,17 @@ status.site.example { handle @jsonld { rewrite * /statuses/{re.matcher.ym}/index.jsonld } + + handle @atom { + rewrite * /statuses/{re.matcher.ym}/index.atom + } } handle { handle @bare { rewrite * /.status.html header Link ;rel=meta;type="application/ld+json" + header Link ;rel=alternate;type="application/atom+xml" } handle @slash { @@ -93,6 +123,7 @@ status.site.example { handle @bare { rewrite * /.topic.html header Link ;rel=meta;type="application/ld+json" + header Link ;rel=alternate;type="application/atom+xml" } handle @slash { @@ -102,12 +133,17 @@ status.site.example { handle @jsonld { rewrite * /topics/{re.matcher.topic}/index.jsonld } + + handle @atom { + rewrite * /topics/{re.matcher.topic}/index.atom + } } handle { handle @bare { rewrite * /.status.html header Link ;rel=meta;type="application/ld+json" + header Link ;rel=alternate;type="application/atom+xml" } handle @slash {