Skip to content

Commit

Permalink
🔨 Migration script to find http links (#2519)
Browse files Browse the repository at this point in the history
  • Loading branch information
VarunVAshrit authored Nov 8, 2024
1 parent d677f1e commit 7f1140c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions sanityv3/migrations/issue-2496/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import {defineMigration, set} from 'sanity/migrate'

export default defineMigration({
title: 'Issue 2496',
documentTypes: ["page", "news", "magazine", "event"],

migrate: {
string(node, path, context) {
if(node.startsWith("http:")){
return set(node.replace("http:", "https:"));
}
},

},
})

0 comments on commit 7f1140c

Please sign in to comment.