aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDawid Potocki <dawid@dawidpotocki.com>2020-11-19 21:02:54 +1300
committerDawid Potocki <dawid@dawidpotocki.com>2020-11-19 21:10:19 +1300
commit15f6820082ec9ba1ef36cfe8b34ae395477e4cbd (patch)
tree8ce7e82a602e7150d778c1f42ada7bf2e46cb18b
parentcaaf7b3204e8423dcc53abe872ecdf8a6f041edf (diff)
Switch Matrix account to my own Matrix instance
-rw-r--r--.well-known/matrix/client7
-rw-r--r--.well-known/matrix/server5
-rw-r--r--_config.yml1
-rw-r--r--_includes/aside.html2
-rw-r--r--nginx/000-main.conf4
-rw-r--r--pages/accounts.html2
6 files changed, 19 insertions, 2 deletions
diff --git a/.well-known/matrix/client b/.well-known/matrix/client
new file mode 100644
index 0000000..d11094b
--- /dev/null
+++ b/.well-known/matrix/client
@@ -0,0 +1,7 @@
+---
+---
+{
+ "m.homeserver": {
+ "base_url": "https://{{ site.matrix_domain }}"
+ }
+}
diff --git a/.well-known/matrix/server b/.well-known/matrix/server
new file mode 100644
index 0000000..3df1d20
--- /dev/null
+++ b/.well-known/matrix/server
@@ -0,0 +1,5 @@
+---
+---
+{
+ "m.server": "{{ site.matrix_domain }}"
+}
diff --git a/_config.yml b/_config.yml
index 8ce6f31..1236788 100644
--- a/_config.yml
+++ b/_config.yml
@@ -10,6 +10,7 @@ personal_mail:
- "&#64;"
- "&#100;&#97;&#119;&#105;&#100;&#112;&#111;&#116;&#111;&#99;&#107;&#105;"
- ".&#99;&#111;&#109;"
+matrix_domain: matrix.dawidpotocki.com
permalink: pretty
diff --git a/_includes/aside.html b/_includes/aside.html
index e54c209..66fff88 100644
--- a/_includes/aside.html
+++ b/_includes/aside.html
@@ -18,7 +18,7 @@
<span class="personal-mail onclick-copy mb-2">[Enable JavaScript]</span>
matrix
- <a class="mb-2" href="https://matrix.to/#/@dawidpotocki:privacytools.io">@dawidpotocki:privacytools.io</a>
+ <a class="mb-2" href="https://matrix.to/#/@dawid:dawidpotocki.com">@dawid:dawidpotocki.com</a>
location
<a class="mb-2" href="https://www.openstreetmap.org/relation/2730349">Christchurch, New Zealand</a>
diff --git a/nginx/000-main.conf b/nginx/000-main.conf
index d17326c..e425e49 100644
--- a/nginx/000-main.conf
+++ b/nginx/000-main.conf
@@ -24,6 +24,10 @@ server {
root /var/www/{{ site.domain }};
index index.html;
location /LICENSE { more_set_headers "Content-Type: text/plain"; }
+ location ~ ^/.well-known/matrix/(client|server) {
+ more_set_headers Content-Type application/json;
+ add_header Access-Control-Allow-Origin *;
+ }
location / { try_files $uri $uri/ =404; }
include /var/www/{{ site.domain }}/nginx/010-headers.conf;
diff --git a/pages/accounts.html b/pages/accounts.html
index 8edd20e..adfc040 100644
--- a/pages/accounts.html
+++ b/pages/accounts.html
@@ -35,7 +35,7 @@ p5R+c1AwfdG+y+UoXAD/Z0TyDFsW7sW3iTLDywRVB+LGY1mub+q5yQGkDx2ESwA=
<h2 id="matrix">Matrix</h2>
-<a href="https://matrix.to/#/@dawidpotocki:privacytools.io">@dawidpotocki:privacytools.io</a> - Main account
+<a href="https://matrix.to/#/@dawid:dawidpotocki.com">@dawid:dawidpotocki.com</a> - Main account
<h2 id="code-repositories">Code Repositories</h2>