theme: make theme testable #380

generate versioned reference folders
This commit is contained in:
Sören Weber 2022-11-13 12:19:49 +01:00
parent 55822e8741
commit 47f1f4c2f3
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D
2 changed files with 28 additions and 21 deletions

View file

@ -34,27 +34,6 @@ defaultContentLanguage = "en"
# the site's title of this showcase; you should change this ;-) # the site's title of this showcase; you should change this ;-)
title = "Hugo Relearn Documentation" title = "Hugo Relearn Documentation"
# settings specific to this theme's features; choose to your likings and
# consult this documentation for explaination
[params]
editURL = "https://github.com/McShelby/hugo-theme-relearn/edit/main/exampleSite/content/"
description = "Documentation for Hugo Relearn Theme"
author = "Sören Weber"
showVisitedLinks = true
collapsibleMenu = true
disableBreadcrumb = false
disableInlineCopyToClipBoard = true
disableNextPrev = false
disableLandingPageButton = true
titleSeparator = "::"
themeVariant = [ "relearn-light", "relearn-dark", "learn", "neon", "blue", "green", "red" ]
disableSeoHiddenPages = true
# this is for the stylesheet generator to allow for interactivity in Mermaid
# graphs; you usually will not need it and you should remove this for
# security reasons
mermaidInitialize = "{ \"securityLevel\": \"loose\" }"
additionalContentLanguage = [ "en" ]
[outputs] [outputs]
# add JSON to the home to support lunr search; This is a mandatory setting # add JSON to the home to support lunr search; This is a mandatory setting
# for the search functionality # for the search functionality
@ -170,3 +149,24 @@ title = "Hugo Relearn Documentation"
name = "<i class='fas fa-fw fa-tags'></i> Arrr! Tags" name = "<i class='fas fa-fw fa-tags'></i> Arrr! Tags"
url = "tags/" url = "tags/"
weight = 40 weight = 40
# settings specific to this theme's features; choose to your likings and
# consult this documentation for explaination
[params]
editURL = "https://github.com/McShelby/hugo-theme-relearn/edit/main/exampleSite/content/"
description = "Documentation for Hugo Relearn Theme"
author = "Sören Weber"
showVisitedLinks = true
collapsibleMenu = true
disableBreadcrumb = false
disableInlineCopyToClipBoard = true
disableNextPrev = false
disableLandingPageButton = true
titleSeparator = "::"
themeVariant = [ "relearn-light", "relearn-dark", "learn", "neon", "blue", "green", "red" ]
disableSeoHiddenPages = true
# this is for the stylesheet generator to allow for interactivity in Mermaid
# graphs; you usually will not need it and you should remove this for
# security reasons
mermaidInitialize = "{ \"securityLevel\": \"loose\" }"
additionalContentLanguage = [ "en" ]

7
exampleSite/test.bat Normal file
View file

@ -0,0 +1,7 @@
set /p version=<..\layouts\partials\version.txt
echo %version%>metrics.%version%.txt
echo disableAssetsBusting=true>>config.toml
echo disableGeneratorVersion=true>>config.toml
hugo --templateMetrics --templateMetricsHints --cleanDestinationDir --destination public.%version% >> metrics.%version%.txt
move /Y metrics.%version%.txt public.%version%\metrics.txt
git restore config.toml