@@ -135,6 +135,31 @@ pub fn normalize(
135
135
}
136
136
}
137
137
138
+ let path = front_matter. path . as_str ( ) ;
139
+ let date = path. strip_prefix ( "inside-rust/" ) . unwrap_or ( path) ;
140
+ if date > "2025/04/14" {
141
+ // Make sure that posts created after the migration to Zola don't have
142
+ // the alias for preserving permalinks.
143
+ //
144
+ // Blog authors would often copy-paste an old post, reusing the
145
+ // boilerplate for a new one. In that process, they'd usually preserve
146
+ // that alias as well, probably not knowing what it's for. Technically
147
+ // such an alias doesn't hurt much, it's just a redirect that isn't
148
+ // referenced anywhere. So these aliases were allowed, preferring not to
149
+ // bother blog authors with such unimportant stuff.
150
+ //
151
+ // However, there was a situation where a blog post was merged with
152
+ // the wrong publication date because of this. Shortly before merging,
153
+ // the date was updated, but it was accidentally changed in the useless
154
+ // alias instead of the authoritative `path` key. Because of this
155
+ // footgun, we don't allow creating these new aliases anymore.
156
+ //
157
+ // Blog authors who copy-paste old boilerplate will run into failed CI
158
+ // and have to fix it by removing the alias. It's annoying, but better
159
+ // than publishing a post with the wrong publication date.
160
+ front_matter. aliases . retain ( |a| !a. contains ( ".html" ) ) ;
161
+ }
162
+
138
163
if front_matter. extra . team . is_some ( ) ^ front_matter. extra . team_url . is_some ( ) {
139
164
bail ! ( "extra.team and extra.team_url must always come in a pair" ) ;
140
165
}
0 commit comments