mirror of
https://github.com/by-jp/www.byjp.me.git
synced 2025-08-23 23:13:13 +01:00
Don't create shortlinks for non-regular pages
This commit is contained in:
parent
6a9d43e5ea
commit
b4586a52d8
1 changed files with 1 additions and 1 deletions
|
@ -2,7 +2,7 @@
|
|||
{{- $chars := split "123456789bcdfghjkmnpqrstuvwxyz" "" -}}{{/* Omit vowels and confusing characters to prevent accidental spelling of words */}}
|
||||
{{- $base := len $chars -}}
|
||||
{{- $size := 8 -}}{{/* 8 chars with 30 possibilities means 0.0091% chance of collision with 10k posts; I currently have 3,213 */}}
|
||||
{{- if and (not $shortlink) true -}}{{/* .IsPage Don't make dynamic shortlinks for list taxonomy/list/non-regular pages */}}
|
||||
{{- if and (not $shortlink) .IsPage -}}{{/* Don't make dynamic shortlinks for list taxonomy/list/non-regular pages */}}
|
||||
{{- $hex := .RelPermalink | crypto.MD5 -}}
|
||||
|
||||
{{- $idx := 0 -}}
|
||||
|
|
Loading…
Reference in a new issue