Browse Source

Simplify URLs to not contain the date

master
Chris Smith 4 years ago
parent
commit
59329a7c89
Signed by: Chris Smith <chris@chameth.com> GPG Key ID: 3A2D4BBDC4A3C9A9

+ 4
- 0
nginx.conf View File

@@ -51,6 +51,7 @@ http {
51 51
     }
52 52
 
53 53
     map $request_uri $redirect_uri {
54
+        # Preserve image paths after move to page bundles
54 55
         /res/images/sense/sense.jpg                     /2016/04/10/sense-api/sense.jpg;
55 56
         /res/images/wemo/switch.jpg                     /2016/05/02/monitoring-power-with-wemo/switch.jpg;
56 57
         /res/images/wemo/desk-1d.png                    /2016/05/02/monitoring-power-with-wemo/desk-1d.png;
@@ -74,6 +75,9 @@ http {
74 75
         /res/images/unsplash/tools.jpg                  /2019/05/08/debugging-beyond-the-debugger/tools.jpg;
75 76
         /res/images/obfuscation/kotlin-proguard.png     /2019/10/21/obfuscating-kotlin-proguard/kotlin-proguard.png;
76 77
         /res/images/obfuscation/obfuscated.png          /2019/10/21/obfuscating-kotlin-proguard/obfuscated.png;
78
+
79
+        # Deal with requests to old-style yyyy/mm/dd/ URLs, redirecting to the unadorned slugs
80
+        "~/[0-9]{4}/[0-9]{2}/[0-9]{2}/(?<slug>.*?)(/|\.html)$" /$slug/;
77 81
     }
78 82
 
79 83
     server {

+ 1
- 1
site/assets/style/_fonts.sass View File

@@ -14,7 +14,7 @@ $fa-font: 'FontAwesome'
14 14
   font-family: 'Source Sans Pro'
15 15
   font-weight: normal
16 16
   font-style: normal
17
-  @include woff-font-src('SourceScansPro-Regular')
17
+  @include woff-font-src('SourceSansPro-Regular')
18 18
 
19 19
 @font-face
20 20
   font-family: 'League Spartan'

+ 2
- 1
site/config.yaml View File

@@ -4,5 +4,6 @@ disablePathToLower: true
4 4
 languageCode: en-gb
5 5
 title: Chameth.com
6 6
 disableKinds: ["taxonomy", "taxonomyTerm"]
7
-
7
+permalinks:
8
+  post: /:slug
8 9
 pygmentsUseClasses: true

+ 1
- 2
site/content/post/2016-04-10-sense-api/index.md View File

@@ -3,8 +3,7 @@ date: 2016-04-10
3 3
 title: Reverse engineering the Sense API
4 4
 description: How to retrieve data from a Hello Sense without using the official apps.
5 5
 area: REST APIs
6
-url: /2016/04/10/sense-api/
7
-aliases: ["/2016/04/10/sense-api.html"]
6
+slug: sense-api
8 7
 
9 8
 resources:
10 9
   - src: sense.jpg

+ 1
- 2
site/content/post/2016-05-02-monitoring-power-with-wemo/index.md View File

@@ -3,8 +3,7 @@ date: 2016-05-02
3 3
 title: Monitoring power draw with WeMo Insight Switches
4 4
 description: Using SOAP requests to get raw data, and rrdtool to produce graphs.
5 5
 area: data analysis
6
-url: /2016/05/02/monitoring-power-with-wemo/
7
-aliases: ["/2016/05/02/monitoring-power-with-wemo.html"]
6
+slug: monitoring-power-with-wemo
8 7
 
9 8
 resources:
10 9
   - src: switch.jpg

+ 1
- 2
site/content/post/2016-05-21-docker-automatic-nginx-proxy/index.md View File

@@ -3,8 +3,7 @@ date: 2016-05-21
3 3
 title: Automatic reverse proxying with Docker and nginx
4 4
 description: Automatically retrieve certificates from Let's Encrypt and configure an SSL-terminating reverse proxy based on running containers.
5 5
 area: Docker
6
-url: /2016/05/21/docker-automatic-nginx-proxy/
7
-aliases: ["/2016/05/21/docker-automatic-nginx-proxy.html"]
6
+slug: docker-automatic-nginx-proxy
8 7
 
9 8
 resources:
10 9
   - src: reverse-proxy.png

+ 1
- 1
site/content/post/2016-06-17-why-you-should-be-using-https/index.md View File

@@ -3,7 +3,7 @@ date: 2016-06-17
3 3
 title: Why you should be using HTTPS
4 4
 description: There's no good reason for sites to avoid HTTPS any more, and lots of reasons they should be actively encouraging it.
5 5
 area: security
6
-url: /2016/06/17/why-you-should-be-using-https/
6
+slug: why-you-should-be-using-https
7 7
 
8 8
 resources:
9 9
   - src: https-everywhere.jpg

+ 1
- 1
site/content/post/2016-08-11-offline-gnupg-master-yubikey-subkeys/index.md View File

@@ -3,7 +3,7 @@ date: 2016-08-11
3 3
 title: Creating an offline GnuPG master key with Yubikey-stored subkeys
4 4
 description: How to use an aircapped computer, a large dose of paranoia, an ironkey, and some yubikeys to create a new GPG key and subkeys.
5 5
 area: security
6
-url: /2016/08/11/offline-gnupg-master-yubikey-subkeys/
6
+slug: offline-gnupg-master-yubikey-subkeys
7 7
 
8 8
 resources:
9 9
   - src: keys.png

+ 1
- 1
site/content/post/2016-10-18-shoring-up-sshd/index.md View File

@@ -3,7 +3,7 @@ date: 2016-10-18
3 3
 title: Shoring up SSHd configuration
4 4
 description: Tools and suggestions for improving the security of SSHd by disabling weak algorithms and modern config tweaks.
5 5
 area: security
6
-url: /2016/10/18/shoring-up-sshd/
6
+slug: shoring-up-sshd
7 7
 
8 8
 resources:
9 9
   - src: openssh.png

+ 1
- 1
site/content/post/2017-05-16-android-tests-espresso-spoon/index.md View File

@@ -3,7 +3,7 @@ date: 2017-05-16
3 3
 title: Android testing with Espresso and Spoon
4 4
 description: Automatically running Android UI tests, reducing flakeyness, and getting useful debugging information back on failure.
5 5
 area: Android
6
-url: /2017/05/16/android-espresso-spoon/
6
+slug: android-espresso-spoon
7 7
 
8 8
 resources:
9 9
   - src: spoon-espresso.png

+ 1
- 1
site/content/post/2017-08-16-top-sites-dns-providers/index.md View File

@@ -3,7 +3,7 @@ date: 2017-08-16
3 3
 title: A look at the DNS habits of the top 100k websites
4 4
 description: An analysis of the DNS providers and resilience of the top 100,000 websites.
5 5
 area: data analysis
6
-url: /2017/08/16/top-sites-dns-providers/
6
+slug: top-sites-dns-providers
7 7
 
8 8
 resources:
9 9
   - src: providers.png

+ 1
- 1
site/content/post/2017-12-17-dns-over-tls-on-edgerouter-lite/index.md View File

@@ -3,7 +3,7 @@ date: 2017-12-17
3 3
 title: DNS-over-TLS on the EdgeRouter Lite
4 4
 description: Installing and configuring Unbound on an Edgerouter Lite to enable encrypoted DNS requests.
5 5
 area: security
6
-url: /2017/12/17/dns-over-tls-on-edgerouter-lite/
6
+slug: dns-over-tls-on-edgerouter-lite
7 7
 
8 8
 resources:
9 9
   - src: edgerouter.jpg

+ 1
- 1
site/content/post/2018-12-09-over-the-top-optimisations-in-nim/index.md View File

@@ -3,7 +3,7 @@ date: 2018-12-09
3 3
 title: Over-the-top optimisations with Nim
4 4
 description: Sometimes its fun to just abandon good practice and make something *fast*.
5 5
 area: optimisation
6
-url: /2018/12/09/over-the-top-optimisations-in-nim/
6
+slug: over-the-top-optimisations-in-nim
7 7
 
8 8
 resources:
9 9
   - src: advent-of-code.png

+ 1
- 1
site/content/post/2019-04-01-understanding-docker-volume-mounts/index.md View File

@@ -3,7 +3,7 @@ date: 2019-04-01
3 3
 title: Understanding Docker volume mounts
4 4
 description: It's basically magic.
5 5
 area: Docker
6
-url: /2019/04/01/understanding-docker-volume-mounts/
6
+slug: understanding-docker-volume-mounts
7 7
 
8 8
 resources:
9 9
   - src: logo.png

+ 1
- 1
site/content/post/2019-05-08-debugging-beyond-the-debugger/index.md View File

@@ -3,7 +3,7 @@ date: 2019-05-08
3 3
 title: Debugging beyond the debugger
4 4
 description: What happens when your usual approach fails you?
5 5
 area: troubleshooting
6
-url: /2019/05/08/debugging-beyond-the-debugger/
6
+slug: debugging-beyond-the-debugger
7 7
 
8 8
 resources:
9 9
   - src: strace.png

+ 1
- 1
site/content/post/2019-10-21-obfuscating-kotlin-proguard/index.md View File

@@ -3,7 +3,7 @@ date: 2019-10-21
3 3
 title: Obfuscating Kotlin code with ProGuard
4 4
 description: In which Kotlin tries to be helpful, and we smite it
5 5
 area: Android
6
-url: /2019/10/21/obfuscating-kotlin-proguard/
6
+slug: obfuscating-kotlin-proguard
7 7
 
8 8
 resources:
9 9
   - src: obfuscated.png

Loading…
Cancel
Save