diff --git a/docs/managing-data/core-concepts/shards.md b/docs/managing-data/core-concepts/shards.md
index 89c1dab34b4..e2f9c48d11e 100644
--- a/docs/managing-data/core-concepts/shards.md
+++ b/docs/managing-data/core-concepts/shards.md
@@ -50,7 +50,7 @@ ENGINE = Distributed('test_cluster', 'uk', 'uk_price_paid_simple', rand())
The `ON CLUSTER` clause makes the DDL statement a [distributed DDL statement](/docs/sql-reference/distributed-ddl), instructing ClickHouse to create the table on all servers listed in the `test_cluster` [cluster definition](/docs/architecture/horizontal-scaling#replication-and-sharding-configuration). Distributed DDL requires an additional [Keeper](https://clickhouse.com/clickhouse/keeper) component in the [cluster architecture](/docs/architecture/horizontal-scaling#architecture-diagram).
-For the [distributed engine parameters](/docs/engines/table-engines/special/distributed#distributed-parameters), we specify the cluster name (`test_cluster`), the database name (`uk`) for the sharded target table, the sharded target table's name (`uk_price_paid_simple`), and the **sharding key** for INSERT routing. In this example, we use the [rand]((/sql-reference/functions/random-functions#rand)) function to randomly assign rows to shards. However, any expression—even complex ones—can be used as a sharding key, depending on the use case. The next section illustrates how INSERT routing works.
+For the [distributed engine parameters](/docs/engines/table-engines/special/distributed#distributed-parameters), we specify the cluster name (`test_cluster`), the database name (`uk`) for the sharded target table, the sharded target table's name (`uk_price_paid_simple`), and the **sharding key** for INSERT routing. In this example, we use the [rand](/sql-reference/functions/random-functions#rand) function to randomly assign rows to shards. However, any expression—even complex ones—can be used as a sharding key, depending on the use case. The next section illustrates how INSERT routing works.
## INSERT routing {#insert-routing}
diff --git a/scripts/generate-changelog.sh b/scripts/generate-changelog.sh
index 0e6b3986b86..4ad5b671738 100755
--- a/scripts/generate-changelog.sh
+++ b/scripts/generate-changelog.sh
@@ -9,9 +9,13 @@ if grep -q "^# $(date +%Y) Changelog" "$parent_dir/tmp/CHANGELOG.md"; then
echo "Generating $(date +%Y) Changelog..."
sed "/^# $(date +%Y) Changelog/d" "$parent_dir/tmp/CHANGELOG.md" > temp.txt
echo "Changelog copied to temp.txt"
+ # Changelog has in it which docusaurus onBrokenAnchor will fail on
+ # This line is to swap them out for explicit anchor ids rather
+ sed -i.bak -E 's/### <\/a> (.*)/### \2 {#\1}/g' temp.txt
cat temp.txt >> "$parent_dir/../docs/whats-new/changelog/index.md"
echo "Changelog written to docs/en/whats-new/changelog/index.md"
rm -f temp.txt
+ rm -f temp.txt.bak
echo "$(date +%Y) Changelog was updated."
else
current_year="$(date +%Y)"