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
     }
51
     }
52
 
52
 
53
     map $request_uri $redirect_uri {
53
     map $request_uri $redirect_uri {
54
+        # Preserve image paths after move to page bundles
54
         /res/images/sense/sense.jpg                     /2016/04/10/sense-api/sense.jpg;
55
         /res/images/sense/sense.jpg                     /2016/04/10/sense-api/sense.jpg;
55
         /res/images/wemo/switch.jpg                     /2016/05/02/monitoring-power-with-wemo/switch.jpg;
56
         /res/images/wemo/switch.jpg                     /2016/05/02/monitoring-power-with-wemo/switch.jpg;
56
         /res/images/wemo/desk-1d.png                    /2016/05/02/monitoring-power-with-wemo/desk-1d.png;
57
         /res/images/wemo/desk-1d.png                    /2016/05/02/monitoring-power-with-wemo/desk-1d.png;
74
         /res/images/unsplash/tools.jpg                  /2019/05/08/debugging-beyond-the-debugger/tools.jpg;
75
         /res/images/unsplash/tools.jpg                  /2019/05/08/debugging-beyond-the-debugger/tools.jpg;
75
         /res/images/obfuscation/kotlin-proguard.png     /2019/10/21/obfuscating-kotlin-proguard/kotlin-proguard.png;
76
         /res/images/obfuscation/kotlin-proguard.png     /2019/10/21/obfuscating-kotlin-proguard/kotlin-proguard.png;
76
         /res/images/obfuscation/obfuscated.png          /2019/10/21/obfuscating-kotlin-proguard/obfuscated.png;
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
     server {
83
     server {

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

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

+ 2
- 1
site/config.yaml View File

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

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

3
 title: Reverse engineering the Sense API
3
 title: Reverse engineering the Sense API
4
 description: How to retrieve data from a Hello Sense without using the official apps.
4
 description: How to retrieve data from a Hello Sense without using the official apps.
5
 area: REST APIs
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
 resources:
8
 resources:
10
   - src: sense.jpg
9
   - src: sense.jpg

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

3
 title: Monitoring power draw with WeMo Insight Switches
3
 title: Monitoring power draw with WeMo Insight Switches
4
 description: Using SOAP requests to get raw data, and rrdtool to produce graphs.
4
 description: Using SOAP requests to get raw data, and rrdtool to produce graphs.
5
 area: data analysis
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
 resources:
8
 resources:
10
   - src: switch.jpg
9
   - src: switch.jpg

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

3
 title: Automatic reverse proxying with Docker and nginx
3
 title: Automatic reverse proxying with Docker and nginx
4
 description: Automatically retrieve certificates from Let's Encrypt and configure an SSL-terminating reverse proxy based on running containers.
4
 description: Automatically retrieve certificates from Let's Encrypt and configure an SSL-terminating reverse proxy based on running containers.
5
 area: Docker
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
 resources:
8
 resources:
10
   - src: reverse-proxy.png
9
   - src: reverse-proxy.png

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

3
 title: Why you should be using HTTPS
3
 title: Why you should be using HTTPS
4
 description: There's no good reason for sites to avoid HTTPS any more, and lots of reasons they should be actively encouraging it.
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
 area: security
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
 resources:
8
 resources:
9
   - src: https-everywhere.jpg
9
   - src: https-everywhere.jpg

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

3
 title: Creating an offline GnuPG master key with Yubikey-stored subkeys
3
 title: Creating an offline GnuPG master key with Yubikey-stored subkeys
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.
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
 area: security
5
 area: security
6
-url: /2016/08/11/offline-gnupg-master-yubikey-subkeys/
6
+slug: offline-gnupg-master-yubikey-subkeys
7
 
7
 
8
 resources:
8
 resources:
9
   - src: keys.png
9
   - src: keys.png

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

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

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

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

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

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

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

3
 title: DNS-over-TLS on the EdgeRouter Lite
3
 title: DNS-over-TLS on the EdgeRouter Lite
4
 description: Installing and configuring Unbound on an Edgerouter Lite to enable encrypoted DNS requests.
4
 description: Installing and configuring Unbound on an Edgerouter Lite to enable encrypoted DNS requests.
5
 area: security
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
 resources:
8
 resources:
9
   - src: edgerouter.jpg
9
   - src: edgerouter.jpg

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

3
 title: Over-the-top optimisations with Nim
3
 title: Over-the-top optimisations with Nim
4
 description: Sometimes its fun to just abandon good practice and make something *fast*.
4
 description: Sometimes its fun to just abandon good practice and make something *fast*.
5
 area: optimisation
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
 resources:
8
 resources:
9
   - src: advent-of-code.png
9
   - src: advent-of-code.png

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

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

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

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

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

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

Loading…
Cancel
Save