feat: use environment modes
| | |
| | | - name: Build Hugo example site with image |
| | | run: | |
| | | cd tests/exampleSiteWithImage/ |
| | | hugo --logLevel=info --baseURL= --themesDir=../../../ |
| | | hugo --environment=development --logLevel=info --baseURL= --themesDir=../../../ |
| | | |
| | | - name: Upload Hugo example site with image |
| | | uses: actions/upload-artifact@v4 |
| | |
| | | - name: Build Hugo example site with video |
| | | run: | |
| | | cd tests/exampleSiteWithVideo/ |
| | | hugo --logLevel=info --baseURL= --themesDir=../../../ |
| | | hugo --environment=development --logLevel=info --baseURL= --themesDir=../../../ |
| | | |
| | | - name: Upload Hugo example site with video |
| | | uses: actions/upload-artifact@v4 |
| | |
| | | {{ with .Site.Params.favicon }}<link rel="icon" href="{{ . | absURL }}" />{{ end }} |
| | | |
| | | <!-- Styles --> |
| | | {{ if hugo.IsServer }} |
| | | {{ if hugo.IsDevelopment }} |
| | | {{ $cssOpts := (dict "targetPath" "css/split.css" "enableSourceMap" true ) }} |
| | | {{ $styles := resources.Get "scss/split.scss" | resources.ExecuteAsTemplate "split.css" . | toCSS $cssOpts }} |
| | | <link rel="stylesheet" href="{{ $styles.RelPermalink }}" media="screen" /> |
| | |
| | | {{ end }} |
| | | |
| | | <!-- Google Analytics --> |
| | | {{ if and (.Site.Config.Services.GoogleAnalytics.ID) (not (in (printf "%#v" .Site.BaseURL) "localhost")) }} |
| | | {{ if and (.Site.Config.Services.GoogleAnalytics.ID) (not hugo.IsDevelopment) }} |
| | | {{ template "_internal/google_analytics.html" . }} |
| | | {{ end }} |
| | |
| | | - type: bind |
| | | source: ../../../ |
| | | target: /src |
| | | command: ["hugo", "server", "--logLevel=info", "--bind=0.0.0.0", "--baseURL=http://hugo", "--disableLiveReload", "--source=/src/hugo-split-theme/tests/exampleSiteWithImage", "--themesDir=/src"] |
| | | command: ["hugo", "server", "--environment=production", "--logLevel=info", "--bind=0.0.0.0", "--baseURL=http://hugo", "--disableLiveReload", "--source=/src/hugo-split-theme/tests/exampleSiteWithImage", "--themesDir=/src"] |
| | | ports: |
| | | - "1313:1313" |
| | | |
| | |
| | | - type: bind |
| | | source: ../../../ |
| | | target: /src |
| | | command: ["hugo", "server", "--logLevel=info", "--bind=0.0.0.0", "--baseURL=http://hugo", "--disableLiveReload", "--source=/src/hugo-split-theme/tests/exampleSiteWithImage", "--themesDir=/src"] |
| | | command: ["hugo", "server", "--environment=production", "--logLevel=info", "--bind=0.0.0.0", "--baseURL=http://hugo", "--disableLiveReload", "--source=/src/hugo-split-theme/tests/exampleSiteWithImage", "--themesDir=/src"] |
| | | ports: |
| | | - "1313:1313" |
| | | |
| | |
| | | - type: bind |
| | | source: ../../../ |
| | | target: /src |
| | | command: ["hugo", "server", "--logLevel=info", "--bind=0.0.0.0", "--baseURL=http://hugo", "--disableLiveReload", "--source=/src/hugo-split-theme/tests/exampleSiteWithVideo", "--themesDir=/src"] |
| | | command: ["hugo", "server", "--environment=production", "--logLevel=info", "--bind=0.0.0.0", "--baseURL=http://hugo", "--disableLiveReload", "--source=/src/hugo-split-theme/tests/exampleSiteWithVideo", "--themesDir=/src"] |
| | | ports: |
| | | - "1313:1313" |
| | | |
| | |
| | | - type: bind |
| | | source: ../../../ |
| | | target: /src |
| | | command: ["hugo", "server", "--logLevel=info", "--bind=0.0.0.0", "--baseURL=http://hugo", "--disableLiveReload", "--source=/src/hugo-split-theme/tests/exampleSiteWithVideo", "--themesDir=/src"] |
| | | command: ["hugo", "server", "--environment=production", "--logLevel=info", "--bind=0.0.0.0", "--baseURL=http://hugo", "--disableLiveReload", "--source=/src/hugo-split-theme/tests/exampleSiteWithVideo", "--themesDir=/src"] |
| | | ports: |
| | | - "1313:1313" |
| | | |