Skip to content

Commit 6742a3e

Browse files
GuessWhoSamFooEdwardAngert
authored andcommitted
Fix preview pathing with Netlify URL rewrite (linode#1624)
1 parent 7a90a29 commit 6742a3e

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
__pycache__/
2+
public/
23
.cache/
34
.scrapy
45
.pynb_checkpoints

_redirects

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Netlify URL rewrite for Hugo's baseURL
2+
/docs/* /:splat

netlify.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
HUGO_VERSION = "0.37.1"
33

44
[context.deploy-preview]
5-
command = "hugo --buildDrafts --buildFuture --baseURL $DEPLOY_PRIME_URL"
5+
command = "hugo --buildDrafts --buildFuture --baseURL $DEPLOY_PRIME_URL && mv _redirects public/"

0 commit comments

Comments
 (0)