test: apply testing config for foreign projects #685

This commit is contained in:
Sören Weber 2023-10-13 23:12:32 +02:00
parent b0c3f96b29
commit 507237f690
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D
2 changed files with 15 additions and 2 deletions

View file

@ -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]

View file

@ -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"