First implementation (#1)
check / check (push) Successful in 42s
site / site (push) Successful in 3m4s

Reviewed-on: #1
This commit was merged in pull request #1.
This commit is contained in:
alexm committed 2026-10-15 05:47:05 -04:00
1 parent 34c0abb26a
commit 4fa326dc76
534 files changed
+28280 -37

No files matched your search

+34
View File
@@ -0,0 +1,34 @@
# Serves the paperspec website built by `python3 tools/site.py` (the `_site/` folder), copied to /srv/www/paperspec.
# The site mirrors the repository, so every schema is served at its $id and the JSON-LD context at the address
# layers name; this file sets the media types those addresses need and lets any page fetch them.
paperspec.scient.ing {
root * /srv/www/paperspec
encode zstd gzip
# Every file may be fetched from any origin: JSON-LD processors and schema validators in browsers need it.
header Access-Control-Allow-Origin "*"
header X-Content-Type-Options "nosniff"
# file_server keeps a Content-Type that is already set, so these take precedence over its defaults.
@jsonld path *.jsonld
header @jsonld Content-Type "application/ld+json"
@schema path /schemas/*.schema.json
header @schema Content-Type "application/schema+json"
@jsonl path *.jsonl
header @jsonl Content-Type "application/jsonl; charset=utf-8"
@package path *.sct.zip
header @package Content-Type "application/vnd.scienting.doc+zip"
@text path *.md *.py *.sql *.csv *.hex *.toml *.lock *.txt
header @text Content-Type "text/plain; charset=utf-8"
# Pages and the search index change with each release; data files are cached briefly too, since the
# addresses stay the same across releases while their contents may not.
header Cache-Control "public, max-age=300"
file_server
handle_errors {
rewrite * /404.html
file_server
}
}