diff --git a/exampleSite/config/testing/config.toml b/exampleSite/config/testing/config.toml index 4b1fe304eb9..3a2045e423b 100644 --- a/exampleSite/config/testing/config.toml +++ b/exampleSite/config/testing/config.toml @@ -9,7 +9,7 @@ disableHugoGeneratorInject = true # enableMissingTranslationPlaceholders = true # Audit your published site for problems -# https://discourse.gohugo.io/t/audit-your-published-site-for-problems/35184/12?u=mcshelby +# https://discourse.gohugo.io/t/audit-your-published-site-for-problems/35184/12 [minify] [minify.tdewolff] [minify.tdewolff.html] diff --git a/exampleSite/test-hugo.bat b/exampleSite/test-hugo.bat index ff05f4910f9..cbe13e689ca 100644 --- a/exampleSite/test-hugo.bat +++ b/exampleSite/test-hugo.bat @@ -15,7 +15,20 @@ if not exist "%versionFile%" ( set /p version=<"%versionFile%" echo %version%>"metrics.%version%%hugo_prefix%%hugo_version%.log" -hugo%hugo_version% --environment testing --templateMetrics --templateMetricsHints --cleanDestinationDir --destination "public.%version%%hugo_prefix%%hugo_version%" >> "metrics.%version%%hugo_prefix%%hugo_version%.log" +set config=--environment testing +if exist "config\testing" ( + rem Seems we are in the themes exampleSite, no need to copy anything +) else if exist "config.toml" ( + set config=--config config.toml,..\hugo-theme-relearn\exampleSite\config\testing\config.toml +) else if exist "hugo.toml" ( + set config=--config hugo.toml,..\hugo-theme-relearn\exampleSite\config\testing\config.toml +) else if exist "config" ( + copy /e /i /y "..\hugo-theme-relearn\exampleSite\config\testing" "config\testing" +) else if exist "hugo" ( + copy /e /i /y "..\hugo-theme-relearn\exampleSite\config\testing" "hugo\testing" +) + +hugo%hugo_version% %config% --templateMetrics --templateMetricsHints --cleanDestinationDir --destination "public.%version%%hugo_prefix%%hugo_version%" >> "metrics.%version%%hugo_prefix%%hugo_version%.log" set "start_dir=%CD%\public.%version%%hugo_prefix%%hugo_version%" set "output_file=dir.%version%%hugo_prefix%%hugo_version%.log"