From e77bc7115a6376e46d83a30d5104e1a7806f8773 Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Sat, 9 Jul 2022 14:03:44 +0200 Subject: Setup baseUrl at build stage --- exampleSite/config/_default/config.yaml | 2 +- exampleSite/content/env.md | 5 ----- netlify.toml | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) delete mode 100644 exampleSite/content/env.md diff --git a/exampleSite/config/_default/config.yaml b/exampleSite/config/_default/config.yaml index 1b67277..45fabfd 100644 --- a/exampleSite/config/_default/config.yaml +++ b/exampleSite/config/_default/config.yaml @@ -1,5 +1,5 @@ # You may need to change this line for your real project. -baseURL: 'https://gohugo-theme-ed.netlify.app/' +baseURL: / languageCode: en-us defaultContentLanguage: en diff --git a/exampleSite/content/env.md b/exampleSite/content/env.md deleted file mode 100644 index be905dc..0000000 --- a/exampleSite/content/env.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -env ---- - -~~~ bash diff --git a/netlify.toml b/netlify.toml index 716b6dc..ad12e64 100644 --- a/netlify.toml +++ b/netlify.toml @@ -18,7 +18,7 @@ # here but we recommend using the Netlify UI for sensitive # values to keep them out of your source repository. [context.production] - command = 'echo "$(env)\n~~~" > exampleSite/content/env.md; hugo --source=exampleSite --destination ../public' + command = 'hugo --source=exampleSite --baseURL ${URL} --destination ../public' [context.production.environment] HUGO_ENV = 'production' -- cgit v1.2.3