mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2025-01-19 03:10:24 +00:00
test: apply testing config for foreign projects #685
This commit is contained in:
parent
b0c3f96b29
commit
507237f690
2 changed files with 15 additions and 2 deletions
|
@ -9,7 +9,7 @@ disableHugoGeneratorInject = true
|
||||||
# enableMissingTranslationPlaceholders = true
|
# enableMissingTranslationPlaceholders = true
|
||||||
|
|
||||||
# Audit your published site for problems
|
# 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]
|
||||||
[minify.tdewolff]
|
[minify.tdewolff]
|
||||||
[minify.tdewolff.html]
|
[minify.tdewolff.html]
|
||||||
|
|
|
@ -15,7 +15,20 @@ if not exist "%versionFile%" (
|
||||||
set /p version=<"%versionFile%"
|
set /p version=<"%versionFile%"
|
||||||
echo %version%>"metrics.%version%%hugo_prefix%%hugo_version%.log"
|
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 "start_dir=%CD%\public.%version%%hugo_prefix%%hugo_version%"
|
||||||
set "output_file=dir.%version%%hugo_prefix%%hugo_version%.log"
|
set "output_file=dir.%version%%hugo_prefix%%hugo_version%.log"
|
||||||
|
|
Loading…
Reference in a new issue