Skip to content

Commit fac6aab

Browse files
committed
docs: fix redirect
1 parent cbfdb69 commit fac6aab

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

docs/deploy.jl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,18 @@ bases_file = joinpath(dist_root, "bases.txt")
179179
println("Creating bases.txt with subfolder: $(deploy_decision.subfolder)")
180180
write(bases_file, "$(deploy_decision.subfolder)\n")
181181

182+
# Create redirect index.html at root to redirect to dev
183+
# Only do this when deploying to dev (not for version tags)
184+
# Once there are tagged versions, DocumenterVitepress will handle this automatically
185+
if deploy_decision.subfolder == "dev"
186+
redirect_html = """<!--This file is automatically generated by DocumenterVitepress.jl-->
187+
<meta http-equiv="refresh" content="0; url=./dev/"/>
188+
"""
189+
redirect_file = joinpath(dist_root, "index.html")
190+
println("Creating redirect index.html to ./dev/")
191+
write(redirect_file, redirect_html)
192+
end
193+
182194
if deployment_target == "secondary"
183195
# Secondary deployment to ai.damtp.cam.ac.uk
184196
println("Deploying to secondary repository (ai.damtp.cam.ac.uk)")

0 commit comments

Comments
 (0)