提交 9f3f9ec7 编写于 作者: A Andrea Frittoli 提交者: tekton-robot

Fix the baseURL for dev and prod use caes

The baseURL is not set for dev and prod which causes the following
issues:
- for dev, the URL shown on the console is not the correct one
- for prod, the generated sitemap.xml uses relative URLs, which
  makes it not parsable by the search engine

This is already setup correctly for deploy-previews.
Signed-off-by: NAndrea Frittoli <andrea.frittoli@gmail.com>
上级 17a47432
......@@ -5,6 +5,7 @@ sync:
.PHONY: serve
serve:
hugo server \
--baseURL $(URL) \
--buildDrafts \
--buildFuture \
--disableFastRender \
......@@ -13,7 +14,7 @@ serve:
.PHONY: production-build
production-build: sync
hugo
hugo --baseURL $(URL)
.PHONY: preview-build
preview-build: sync
......
[build]
publish = "public"
command = "make production-build"
publish = "public"
command = "make production-build"
[build.environment]
HUGO_VERSION = "0.53"
HUGO_VERSION = "0.53"
[dev]
command = "make serve URL=http://localhost:8888/"
[context.deploy-preview]
command = "make preview-build"
command = "make preview-build"
[context.branch-deploy]
command = "make preview-build"
command = "make preview-build"
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册