Forbid migration alias in new posts #1629
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The change is explained in a comment, copying it here for convenience:
Make sure that posts created after the migration to Zola don't have
the alias for preserving permalinks.
Blog authors would often copy-paste an old post, reusing the
boilerplate for a new one. In that process, they'd usually preserve
that alias as well, probably not knowing what it's for. Technically
such an alias doesn't hurt much, it's just a redirect that isn't
referenced anywhere. So these aliases were allowed, preferring not to
bother blog authors with such unimportant stuff.
However, there was a situation where a blog post was merged with
the wrong publication date because of this. Shortly before merging,
the date was updated, but it was accidentally changed in the useless
alias instead of the authoritative
path
key. Because of thisfootgun, we don't allow creating these new aliases anymore.
Blog authors who copy-paste old boilerplate will run into failed CI
and have to fix it by removing the alias. It's annoying, but better
than publishing a post with the wrong publication date.
Rendered