Skip to content

Commit 658a4f6

Browse files
Merge pull request #58 from AlexKlimenkov/master
open md links in separate tab instead of downloading
2 parents 78df1e3 + 5579224 commit 658a4f6

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

docker/nginx.conf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,16 @@ http {
4141
return 301 $new_uri;
4242
}
4343

44+
# Serve raw markdown inline so the docs "View as Markdown" link opens
45+
# in a browser tab instead of triggering a download.
46+
location ~* \.md$ {
47+
root /usr/share/nginx/html;
48+
types { }
49+
default_type "text/markdown; charset=utf-8";
50+
add_header Content-Disposition "inline";
51+
add_header X-Content-Type-Options "nosniff";
52+
}
53+
4454
location / {
4555
root /usr/share/nginx/html;
4656
index index.html index.htm;

0 commit comments

Comments
 (0)