mirror of
https://github.com/gohugoio/hugo.git
synced 2026-09-03 20:22:38 +00:00
Compare commits
60 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| bd1657c360 | |||
| 62567d3820 | |||
| e10915f80a | |||
| ec3890affe | |||
| 46cccb021b | |||
| cb6e27b32a | |||
| 5bbe95f9c5 | |||
| 31d19b505d | |||
| bfa2fd683e | |||
| 88d598a049 | |||
| 352be5ba87 | |||
| d37606d2c2 | |||
| f5e54d9c7d | |||
| 42f37b4e98 | |||
| e971b7d866 | |||
| ad985550a4 | |||
| b5852d0e68 | |||
| b5801d8b6a | |||
| 64d1865c1e | |||
| e4ad0c5271 | |||
| a2f666b586 | |||
| b1b3bbcdbd | |||
| 1cfe9741b9 | |||
| 2939270a3b | |||
| 5db27b19c1 | |||
| b7d62d76c5 | |||
| 6e1c5b61b3 | |||
| e7d0757f95 | |||
| 6b5e117a12 | |||
| 4985be1a4a | |||
| db653a8485 | |||
| 05bbd2c515 | |||
| 21366e0411 | |||
| ea633dd809 | |||
| 57151a5e91 | |||
| 5bb22b6b4e | |||
| 41f69a7255 | |||
| 4a79956276 | |||
| 039845804f | |||
| 9b635522e2 | |||
| 3223a65c9b | |||
| bc6fc47727 | |||
| ffb41d1111 | |||
| 5b0b663ec3 | |||
| 3f68309148 | |||
| ab03588db9 | |||
| 0450d69fc6 | |||
| 1158e63072 | |||
| d1ba52f3c3 | |||
| d0dca65625 | |||
| f30603c47f | |||
| 12c9ce34bb | |||
| 47b055589c | |||
| e56ea40666 | |||
| 4c02a52f7c | |||
| 578442f892 | |||
| 0d390d7eb8 | |||
| da72ac2db9 | |||
| 0ea796dad1 | |||
| 1e690c0f23 |
@@ -4,7 +4,7 @@ parameters:
|
|||||||
defaults: &defaults
|
defaults: &defaults
|
||||||
resource_class: large
|
resource_class: large
|
||||||
docker:
|
docker:
|
||||||
- image: bepsays/ci-hugoreleaser:1.22300.20000
|
- image: bepsays/ci-hugoreleaser:1.22300.20200
|
||||||
environment: &buildenv
|
environment: &buildenv
|
||||||
GOMODCACHE: /root/project/gomodcache
|
GOMODCACHE: /root/project/gomodcache
|
||||||
version: 2
|
version: 2
|
||||||
@@ -14,9 +14,7 @@ jobs:
|
|||||||
environment: &buildenv
|
environment: &buildenv
|
||||||
GOMODCACHE: /root/project/gomodcache
|
GOMODCACHE: /root/project/gomodcache
|
||||||
steps:
|
steps:
|
||||||
- &remote-docker
|
- setup_remote_docker
|
||||||
setup_remote_docker:
|
|
||||||
version: 20.10.14
|
|
||||||
- checkout:
|
- checkout:
|
||||||
path: hugo
|
path: hugo
|
||||||
- &git-config
|
- &git-config
|
||||||
@@ -60,7 +58,7 @@ jobs:
|
|||||||
environment:
|
environment:
|
||||||
<<: [*buildenv]
|
<<: [*buildenv]
|
||||||
docker:
|
docker:
|
||||||
- image: bepsays/ci-hugoreleaser-linux-arm64:1.22300.20000
|
- image: bepsays/ci-hugoreleaser-linux-arm64:1.22300.20200
|
||||||
steps:
|
steps:
|
||||||
- *restore-cache
|
- *restore-cache
|
||||||
- &attach-workspace
|
- &attach-workspace
|
||||||
|
|||||||
+10
-79
@@ -1,10 +1,9 @@
|
|||||||
name: Build Docker image
|
name: Build Docker image
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
release:
|
||||||
tags:
|
types: [published]
|
||||||
- "*"
|
pull_request:
|
||||||
workflow_dispatch:
|
|
||||||
permissions:
|
permissions:
|
||||||
packages: write
|
packages: write
|
||||||
|
|
||||||
@@ -14,18 +13,8 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
platform:
|
|
||||||
- linux/amd64
|
|
||||||
- linux/arm64
|
|
||||||
steps:
|
|
||||||
- name: Prepare
|
|
||||||
run: |
|
|
||||||
platform=${{ matrix.platform }}
|
|
||||||
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
||||||
|
|
||||||
@@ -35,9 +24,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
images: ${{ env.REGISTRY_IMAGE }}
|
images: ${{ env.REGISTRY_IMAGE }}
|
||||||
|
|
||||||
- name: Set up QEMU
|
|
||||||
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1
|
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1
|
||||||
|
|
||||||
@@ -49,69 +35,14 @@ jobs:
|
|||||||
username: ${{ github.repository_owner }}
|
username: ${{ github.repository_owner }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Build and push by digest
|
- name: Build and push
|
||||||
id: build
|
id: build
|
||||||
uses: docker/build-push-action@16ebe778df0e7752d2cfcbd924afdbbd89c1a755 # v6.6.1
|
uses: docker/build-push-action@16ebe778df0e7752d2cfcbd924afdbbd89c1a755 # v6.6.1
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
push: ${{ startsWith(github.ref, 'refs/tags') }}
|
provenance: mode=max
|
||||||
platforms: ${{ matrix.platform }}
|
sbom: true
|
||||||
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true
|
|
||||||
|
|
||||||
- name: Export digest
|
|
||||||
run: |
|
|
||||||
mkdir -p /tmp/digests
|
|
||||||
digest="${{ steps.build.outputs.digest }}"
|
|
||||||
touch "/tmp/digests/${digest#sha256:}"
|
|
||||||
|
|
||||||
- name: Upload digest
|
|
||||||
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
|
|
||||||
with:
|
|
||||||
name: digests-${{ env.PLATFORM_PAIR }}
|
|
||||||
path: /tmp/digests/*
|
|
||||||
if-no-files-found: error
|
|
||||||
retention-days: 1
|
|
||||||
|
|
||||||
merge:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs:
|
|
||||||
- build
|
|
||||||
steps:
|
|
||||||
- name: Download digests
|
|
||||||
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
|
|
||||||
with:
|
|
||||||
path: /tmp/digests
|
|
||||||
pattern: digests-*
|
|
||||||
merge-multiple: true
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1
|
|
||||||
|
|
||||||
- name: Docker meta
|
|
||||||
id: meta
|
|
||||||
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1
|
|
||||||
with:
|
|
||||||
images: ${{ env.REGISTRY_IMAGE }}
|
|
||||||
|
|
||||||
flavor: |
|
|
||||||
latest=false
|
|
||||||
|
|
||||||
- name: Login to GHCR
|
|
||||||
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
|
|
||||||
with:
|
|
||||||
registry: ghcr.io
|
|
||||||
username: ${{ github.repository_owner }}
|
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Create manifest list and push
|
|
||||||
if: ${{ startsWith(github.ref, 'refs/tags') }}
|
|
||||||
working-directory: /tmp/digests
|
|
||||||
run: |
|
|
||||||
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
|
|
||||||
$(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)
|
|
||||||
|
|
||||||
- name: Inspect image
|
|
||||||
if: ${{ startsWith(github.ref, 'refs/tags') }}
|
|
||||||
run: |
|
|
||||||
docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }}
|
|
||||||
|
|||||||
@@ -112,17 +112,17 @@ jobs:
|
|||||||
sass --version;
|
sass --version;
|
||||||
mage -v check;
|
mage -v check;
|
||||||
env:
|
env:
|
||||||
HUGO_BUILD_TAGS: extended
|
HUGO_BUILD_TAGS: extended,withdeploy
|
||||||
- if: matrix.os == 'windows-latest'
|
- if: matrix.os == 'windows-latest'
|
||||||
# See issue #11052. We limit the build to regular test (no -race flag) on Windows for now.
|
# See issue #11052. We limit the build to regular test (no -race flag) on Windows for now.
|
||||||
name: Test
|
name: Test
|
||||||
run: |
|
run: |
|
||||||
mage -v test;
|
mage -v test;
|
||||||
env:
|
env:
|
||||||
HUGO_BUILD_TAGS: extended
|
HUGO_BUILD_TAGS: extended,withdeploy
|
||||||
- name: Build tags
|
- name: Build tags
|
||||||
run: |
|
run: |
|
||||||
go install -tags extended,nodeploy
|
go install -tags extended
|
||||||
- if: matrix.os == 'ubuntu-latest'
|
- if: matrix.os == 'ubuntu-latest'
|
||||||
name: Build for dragonfly
|
name: Build for dragonfly
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
+3
-1
@@ -1,3 +1,5 @@
|
|||||||
|
|
||||||
*.test
|
*.test
|
||||||
imports.*
|
imports.*
|
||||||
|
dist/
|
||||||
|
public/
|
||||||
|
|||||||
+78
-24
@@ -2,44 +2,98 @@
|
|||||||
# Twitter: https://twitter.com/gohugoio
|
# Twitter: https://twitter.com/gohugoio
|
||||||
# Website: https://gohugo.io/
|
# Website: https://gohugo.io/
|
||||||
|
|
||||||
FROM golang:1.22.6-alpine AS build
|
ARG GO_VERSION="1.23.2"
|
||||||
|
ARG ALPINE_VERSION="3.20"
|
||||||
|
ARG DART_SASS_VERSION="1.79.3"
|
||||||
|
|
||||||
# Optionally set HUGO_BUILD_TAGS to "extended" or "nodeploy" when building like so:
|
FROM --platform=$BUILDPLATFORM tonistiigi/xx:1.5.0 AS xx
|
||||||
# docker build --build-arg HUGO_BUILD_TAGS=extended .
|
FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS gobuild
|
||||||
ARG HUGO_BUILD_TAGS
|
FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS gorun
|
||||||
|
|
||||||
ARG CGO=1
|
|
||||||
ENV CGO_ENABLED=${CGO}
|
FROM gobuild AS build
|
||||||
ENV GOOS=linux
|
|
||||||
ENV GO111MODULE=on
|
RUN apk add clang lld
|
||||||
|
|
||||||
|
# Set up cross-compilation helpers
|
||||||
|
COPY --from=xx / /
|
||||||
|
|
||||||
|
ARG TARGETPLATFORM
|
||||||
|
RUN xx-apk add musl-dev gcc g++
|
||||||
|
|
||||||
|
# Optionally set HUGO_BUILD_TAGS to "none" or "withdeploy" when building like so:
|
||||||
|
# docker build --build-arg HUGO_BUILD_TAGS=withdeploy .
|
||||||
|
#
|
||||||
|
# We build the extended version by default.
|
||||||
|
ARG HUGO_BUILD_TAGS="extended"
|
||||||
|
ENV CGO_ENABLED=1
|
||||||
|
ENV GOPROXY=https://proxy.golang.org
|
||||||
|
ENV GOCACHE=/root/.cache/go-build
|
||||||
|
ENV GOMODCACHE=/go/pkg/mod
|
||||||
|
ARG TARGETPLATFORM
|
||||||
|
|
||||||
WORKDIR /go/src/github.com/gohugoio/hugo
|
WORKDIR /go/src/github.com/gohugoio/hugo
|
||||||
|
|
||||||
COPY . /go/src/github.com/gohugoio/hugo/
|
# For --mount=type=cache the value of target is the default cache id, so
|
||||||
|
# for the go mod cache it would be good if we could share it with other Go images using the same setup,
|
||||||
|
# but the go build cache needs to be per platform.
|
||||||
|
# See this comment: https://github.com/moby/buildkit/issues/1706#issuecomment-702238282
|
||||||
|
RUN --mount=target=. \
|
||||||
|
--mount=type=cache,target=/go/pkg/mod \
|
||||||
|
--mount=type=cache,target=/root/.cache/go-build,id=go-build-$TARGETPLATFORM <<EOT
|
||||||
|
set -ex
|
||||||
|
xx-go build -tags "$HUGO_BUILD_TAGS" -ldflags "-s -w -X github.com/gohugoio/hugo/common/hugo.vendorInfo=docker" -o /usr/bin/hugo
|
||||||
|
xx-verify /usr/bin/hugo
|
||||||
|
EOT
|
||||||
|
|
||||||
# gcc/g++ are required to build SASS libraries for extended version
|
# dart-sass downloads the dart-sass runtime dependency
|
||||||
RUN apk update && \
|
FROM alpine:${ALPINE_VERSION} AS dart-sass
|
||||||
apk add --no-cache gcc g++ musl-dev git && \
|
ARG TARGETARCH
|
||||||
go install github.com/magefile/mage
|
ARG DART_SASS_VERSION
|
||||||
|
ARG DART_ARCH=${TARGETARCH/amd64/x64}
|
||||||
|
WORKDIR /out
|
||||||
|
ADD https://github.com/sass/dart-sass/releases/download/${DART_SASS_VERSION}/dart-sass-${DART_SASS_VERSION}-linux-${DART_ARCH}.tar.gz .
|
||||||
|
RUN tar -xf dart-sass-${DART_SASS_VERSION}-linux-${DART_ARCH}.tar.gz
|
||||||
|
|
||||||
RUN mage hugo && mage install
|
FROM gorun AS final
|
||||||
|
|
||||||
# ---
|
COPY --from=build /usr/bin/hugo /usr/bin/hugo
|
||||||
|
|
||||||
FROM alpine:3.18
|
# libc6-compat are required for extended libraries (libsass, libwebp).
|
||||||
|
RUN apk add --no-cache \
|
||||||
|
libc6-compat \
|
||||||
|
git \
|
||||||
|
runuser \
|
||||||
|
nodejs \
|
||||||
|
npm
|
||||||
|
|
||||||
COPY --from=build /go/bin/hugo /usr/bin/hugo
|
RUN mkdir -p /var/hugo/bin /cache && \
|
||||||
|
addgroup -Sg 1000 hugo && \
|
||||||
|
adduser -Sg hugo -u 1000 -h /var/hugo hugo && \
|
||||||
|
chown -R hugo: /var/hugo /cache && \
|
||||||
|
# For the Hugo's Git integration to work.
|
||||||
|
runuser -u hugo -- git config --global --add safe.directory /project && \
|
||||||
|
# See https://github.com/gohugoio/hugo/issues/9810
|
||||||
|
runuser -u hugo -- git config --global core.quotepath false
|
||||||
|
|
||||||
# libc6-compat & libstdc++ are required for extended SASS libraries
|
USER hugo:hugo
|
||||||
# ca-certificates are required to fetch outside resources (like Twitter oEmbeds)
|
VOLUME /project
|
||||||
RUN apk update && \
|
WORKDIR /project
|
||||||
apk add --no-cache ca-certificates libc6-compat libstdc++ git
|
ENV HUGO_CACHEDIR=/cache
|
||||||
|
ENV PATH="/var/hugo/bin:$PATH"
|
||||||
|
|
||||||
VOLUME /site
|
COPY scripts/docker/entrypoint.sh /entrypoint.sh
|
||||||
WORKDIR /site
|
COPY --from=dart-sass /out/dart-sass /var/hugo/bin/dart-sass
|
||||||
|
|
||||||
|
# Update PATH to reflect the new dependencies.
|
||||||
|
# For more complex setups, we should probably find a way to
|
||||||
|
# delegate this to the script itself, but this will have to do for now.
|
||||||
|
# Also, the dart-sass binary is a little special, other binaries can be put/linked
|
||||||
|
# directly in /var/hugo/bin.
|
||||||
|
ENV PATH="/var/hugo/bin/dart-sass:$PATH"
|
||||||
|
|
||||||
# Expose port for live server
|
# Expose port for live server
|
||||||
EXPOSE 1313
|
EXPOSE 1313
|
||||||
|
|
||||||
ENTRYPOINT ["hugo"]
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
CMD ["--help"]
|
CMD ["--help"]
|
||||||
|
|||||||
Vendored
+19
-6
@@ -430,12 +430,25 @@ func (p *Partition[K, V]) doGetOrCreateWitTimeout(key K, duration time.Duration,
|
|||||||
errch := make(chan error, 1)
|
errch := make(chan error, 1)
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
v, _, err := p.c.GetOrCreate(key, create)
|
var (
|
||||||
if err != nil {
|
v V
|
||||||
errch <- err
|
err error
|
||||||
return
|
)
|
||||||
}
|
defer func() {
|
||||||
resultch <- v
|
if r := recover(); r != nil {
|
||||||
|
if rerr, ok := r.(error); ok {
|
||||||
|
err = rerr
|
||||||
|
} else {
|
||||||
|
err = fmt.Errorf("panic: %v", r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if err != nil {
|
||||||
|
errch <- err
|
||||||
|
} else {
|
||||||
|
resultch <- v
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
v, _, err = p.c.GetOrCreate(key, create)
|
||||||
}()
|
}()
|
||||||
|
|
||||||
select {
|
select {
|
||||||
|
|||||||
Vendored
+55
@@ -14,8 +14,11 @@
|
|||||||
package dynacache
|
package dynacache
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"errors"
|
||||||
|
"fmt"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"testing"
|
"testing"
|
||||||
|
"time"
|
||||||
|
|
||||||
qt "github.com/frankban/quicktest"
|
qt "github.com/frankban/quicktest"
|
||||||
"github.com/gohugoio/hugo/common/loggers"
|
"github.com/gohugoio/hugo/common/loggers"
|
||||||
@@ -165,6 +168,58 @@ func TestClear(t *testing.T) {
|
|||||||
cache.adjustCurrentMaxSize()
|
cache.adjustCurrentMaxSize()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestPanicInCreate(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
|
c := qt.New(t)
|
||||||
|
cache := newTestCache(t)
|
||||||
|
|
||||||
|
p1 := GetOrCreatePartition[string, testItem](cache, "/aaaa/bbbb", OptionsPartition{Weight: 30, ClearWhen: ClearOnRebuild})
|
||||||
|
|
||||||
|
willPanic := func(i int) func() {
|
||||||
|
return func() {
|
||||||
|
p1.GetOrCreate(fmt.Sprintf("panic-%d", i), func(key string) (testItem, error) {
|
||||||
|
panic(errors.New(key))
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetOrCreateWitTimeout needs to recover from panics in the create func.
|
||||||
|
willErr := func(i int) error {
|
||||||
|
_, err := p1.GetOrCreateWitTimeout(fmt.Sprintf("error-%d", i), 10*time.Second, func(key string) (testItem, error) {
|
||||||
|
return testItem{}, errors.New(key)
|
||||||
|
})
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
for i := 0; i < 3; i++ {
|
||||||
|
for j := 0; j < 3; j++ {
|
||||||
|
c.Assert(willPanic(i), qt.PanicMatches, fmt.Sprintf("panic-%d", i))
|
||||||
|
c.Assert(willErr(i), qt.ErrorMatches, fmt.Sprintf("error-%d", i))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Test the same keys again without the panic.
|
||||||
|
for i := 0; i < 3; i++ {
|
||||||
|
for j := 0; j < 3; j++ {
|
||||||
|
v, err := p1.GetOrCreate(fmt.Sprintf("panic-%d", i), func(key string) (testItem, error) {
|
||||||
|
return testItem{
|
||||||
|
name: key,
|
||||||
|
}, nil
|
||||||
|
})
|
||||||
|
c.Assert(err, qt.IsNil)
|
||||||
|
c.Assert(v.name, qt.Equals, fmt.Sprintf("panic-%d", i))
|
||||||
|
|
||||||
|
v, err = p1.GetOrCreateWitTimeout(fmt.Sprintf("error-%d", i), 10*time.Second, func(key string) (testItem, error) {
|
||||||
|
return testItem{
|
||||||
|
name: key,
|
||||||
|
}, nil
|
||||||
|
})
|
||||||
|
c.Assert(err, qt.IsNil)
|
||||||
|
c.Assert(v.name, qt.Equals, fmt.Sprintf("error-%d", i))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func TestAdjustCurrentMaxSize(t *testing.T) {
|
func TestAdjustCurrentMaxSize(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
c := qt.New(t)
|
c := qt.New(t)
|
||||||
|
|||||||
+33
-4
@@ -42,6 +42,7 @@ import (
|
|||||||
"github.com/gohugoio/hugo/common/hugo"
|
"github.com/gohugoio/hugo/common/hugo"
|
||||||
"github.com/gohugoio/hugo/common/loggers"
|
"github.com/gohugoio/hugo/common/loggers"
|
||||||
"github.com/gohugoio/hugo/common/paths"
|
"github.com/gohugoio/hugo/common/paths"
|
||||||
|
"github.com/gohugoio/hugo/common/types"
|
||||||
"github.com/gohugoio/hugo/config"
|
"github.com/gohugoio/hugo/config"
|
||||||
"github.com/gohugoio/hugo/config/allconfig"
|
"github.com/gohugoio/hugo/config/allconfig"
|
||||||
"github.com/gohugoio/hugo/deps"
|
"github.com/gohugoio/hugo/deps"
|
||||||
@@ -66,6 +67,12 @@ func Execute(args []string) error {
|
|||||||
}
|
}
|
||||||
args = mapLegacyArgs(args)
|
args = mapLegacyArgs(args)
|
||||||
cd, err := x.Execute(context.Background(), args)
|
cd, err := x.Execute(context.Background(), args)
|
||||||
|
if cd != nil {
|
||||||
|
if closer, ok := cd.Root.Command.(types.Closer); ok {
|
||||||
|
closer.Close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if err == errHelp {
|
if err == errHelp {
|
||||||
cd.CobraCommand.Help()
|
cd.CobraCommand.Help()
|
||||||
@@ -149,6 +156,18 @@ func (r *rootCommand) isVerbose() bool {
|
|||||||
return r.logger.Level() <= logg.LevelInfo
|
return r.logger.Level() <= logg.LevelInfo
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (r *rootCommand) Close() error {
|
||||||
|
if r.hugoSites != nil {
|
||||||
|
r.hugoSites.DeleteFunc(func(key configKey, value *hugolib.HugoSites) bool {
|
||||||
|
if value != nil {
|
||||||
|
value.Close()
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
func (r *rootCommand) Build(cd *simplecobra.Commandeer, bcfg hugolib.BuildCfg, cfg config.Provider) (*hugolib.HugoSites, error) {
|
func (r *rootCommand) Build(cd *simplecobra.Commandeer, bcfg hugolib.BuildCfg, cfg config.Provider) (*hugolib.HugoSites, error) {
|
||||||
h, err := r.Hugo(cfg)
|
h, err := r.Hugo(cfg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -488,7 +507,7 @@ func (r *rootCommand) createLogger(running bool) (loggers.Logger, error) {
|
|||||||
return loggers.New(optsLogger), nil
|
return loggers.New(optsLogger), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *rootCommand) Reset() {
|
func (r *rootCommand) resetLogs() {
|
||||||
r.logger.Reset()
|
r.logger.Reset()
|
||||||
loggers.Log().Reset()
|
loggers.Log().Reset()
|
||||||
}
|
}
|
||||||
@@ -499,16 +518,26 @@ func (r *rootCommand) IsTestRun() bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (r *rootCommand) Init(cd *simplecobra.Commandeer) error {
|
func (r *rootCommand) Init(cd *simplecobra.Commandeer) error {
|
||||||
|
return r.initRootCommand("", cd)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r *rootCommand) initRootCommand(subCommandName string, cd *simplecobra.Commandeer) error {
|
||||||
cmd := cd.CobraCommand
|
cmd := cd.CobraCommand
|
||||||
cmd.Use = "hugo [flags]"
|
commandName := "hugo"
|
||||||
cmd.Short = "hugo builds your site"
|
if subCommandName != "" {
|
||||||
cmd.Long = `hugo is the main command, used to build your Hugo site.
|
commandName = subCommandName
|
||||||
|
}
|
||||||
|
cmd.Use = fmt.Sprintf("%s [flags]", commandName)
|
||||||
|
cmd.Short = "Build your site"
|
||||||
|
cmd.Long = `COMMAND_NAME is the main command, used to build your Hugo site.
|
||||||
|
|
||||||
Hugo is a Fast and Flexible Static Site Generator
|
Hugo is a Fast and Flexible Static Site Generator
|
||||||
built with love by spf13 and friends in Go.
|
built with love by spf13 and friends in Go.
|
||||||
|
|
||||||
Complete documentation is available at https://gohugo.io/.`
|
Complete documentation is available at https://gohugo.io/.`
|
||||||
|
|
||||||
|
cmd.Long = strings.ReplaceAll(cmd.Long, "COMMAND_NAME", commandName)
|
||||||
|
|
||||||
// Configure persistent flags
|
// Configure persistent flags
|
||||||
cmd.PersistentFlags().StringVarP(&r.source, "source", "s", "", "filesystem path to read files relative from")
|
cmd.PersistentFlags().StringVarP(&r.source, "source", "s", "", "filesystem path to read files relative from")
|
||||||
_ = cmd.MarkFlagDirname("source")
|
_ = cmd.MarkFlagDirname("source")
|
||||||
|
|||||||
@@ -14,6 +14,8 @@
|
|||||||
package commands
|
package commands
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"context"
|
||||||
|
|
||||||
"github.com/bep/simplecobra"
|
"github.com/bep/simplecobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -21,6 +23,7 @@ import (
|
|||||||
func newExec() (*simplecobra.Exec, error) {
|
func newExec() (*simplecobra.Exec, error) {
|
||||||
rootCmd := &rootCommand{
|
rootCmd := &rootCommand{
|
||||||
commands: []simplecobra.Commander{
|
commands: []simplecobra.Commander{
|
||||||
|
newHugoBuildCmd(),
|
||||||
newVersionCmd(),
|
newVersionCmd(),
|
||||||
newEnvCommand(),
|
newEnvCommand(),
|
||||||
newServerCommand(),
|
newServerCommand(),
|
||||||
@@ -38,3 +41,33 @@ func newExec() (*simplecobra.Exec, error) {
|
|||||||
|
|
||||||
return simplecobra.New(rootCmd)
|
return simplecobra.New(rootCmd)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func newHugoBuildCmd() simplecobra.Commander {
|
||||||
|
return &hugoBuildCommand{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// hugoBuildCommand just delegates to the rootCommand.
|
||||||
|
type hugoBuildCommand struct {
|
||||||
|
rootCmd *rootCommand
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *hugoBuildCommand) Commands() []simplecobra.Commander {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *hugoBuildCommand) Name() string {
|
||||||
|
return "build"
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *hugoBuildCommand) Init(cd *simplecobra.Commandeer) error {
|
||||||
|
c.rootCmd = cd.Root.Command.(*rootCommand)
|
||||||
|
return c.rootCmd.initRootCommand("build", cd)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *hugoBuildCommand) PreRun(cd, runner *simplecobra.Commandeer) error {
|
||||||
|
return c.rootCmd.PreRun(cd, runner)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *hugoBuildCommand) Run(ctx context.Context, cd *simplecobra.Commandeer, args []string) error {
|
||||||
|
return c.rootCmd.Run(ctx, cd, args)
|
||||||
|
}
|
||||||
|
|||||||
+2
-2
@@ -110,8 +110,8 @@ func (c *configCommand) Run(ctx context.Context, cd *simplecobra.Commandeer, arg
|
|||||||
func (c *configCommand) Init(cd *simplecobra.Commandeer) error {
|
func (c *configCommand) Init(cd *simplecobra.Commandeer) error {
|
||||||
c.r = cd.Root.Command.(*rootCommand)
|
c.r = cd.Root.Command.(*rootCommand)
|
||||||
cmd := cd.CobraCommand
|
cmd := cd.CobraCommand
|
||||||
cmd.Short = "Print the site configuration"
|
cmd.Short = "Display site configuration"
|
||||||
cmd.Long = `Print the site configuration, both default and custom settings.`
|
cmd.Long = `Display site configuration, both default and custom settings.`
|
||||||
cmd.Flags().StringVar(&c.format, "format", "toml", "preferred file format (toml, yaml or json)")
|
cmd.Flags().StringVar(&c.format, "format", "toml", "preferred file format (toml, yaml or json)")
|
||||||
_ = cmd.RegisterFlagCompletionFunc("format", cobra.FixedCompletions([]string{"toml", "yaml", "json"}, cobra.ShellCompDirectiveNoFileComp))
|
_ = cmd.RegisterFlagCompletionFunc("format", cobra.FixedCompletions([]string{"toml", "yaml", "json"}, cobra.ShellCompDirectiveNoFileComp))
|
||||||
cmd.Flags().StringVar(&c.lang, "lang", "", "the language to display config for. Defaults to the first language defined.")
|
cmd.Flags().StringVar(&c.lang, "lang", "", "the language to display config for. Defaults to the first language defined.")
|
||||||
|
|||||||
+2
-2
@@ -105,8 +105,8 @@ func (c *convertCommand) Run(ctx context.Context, cd *simplecobra.Commandeer, ar
|
|||||||
|
|
||||||
func (c *convertCommand) Init(cd *simplecobra.Commandeer) error {
|
func (c *convertCommand) Init(cd *simplecobra.Commandeer) error {
|
||||||
cmd := cd.CobraCommand
|
cmd := cd.CobraCommand
|
||||||
cmd.Short = "Convert your content to different formats"
|
cmd.Short = "Convert front matter to another format"
|
||||||
cmd.Long = `Convert your content (e.g. front matter) to different formats.
|
cmd.Long = `Convert front matter to another format.
|
||||||
|
|
||||||
See convert's subcommands toJSON, toTOML and toYAML for more information.`
|
See convert's subcommands toJSON, toTOML and toYAML for more information.`
|
||||||
|
|
||||||
|
|||||||
+4
-17
@@ -11,21 +11,8 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
//go:build !nodeploy
|
//go:build withdeploy
|
||||||
// +build !nodeploy
|
// +build withdeploy
|
||||||
|
|
||||||
// Copyright 2024 The Hugo Authors. All rights reserved.
|
|
||||||
//
|
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
// you may not use this file except in compliance with the License.
|
|
||||||
// You may obtain a copy of the License at
|
|
||||||
// http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
//
|
|
||||||
// Unless required by applicable law or agreed to in writing, software
|
|
||||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
// See the License for the specific language governing permissions and
|
|
||||||
// limitations under the License.
|
|
||||||
|
|
||||||
package commands
|
package commands
|
||||||
|
|
||||||
@@ -42,8 +29,8 @@ import (
|
|||||||
func newDeployCommand() simplecobra.Commander {
|
func newDeployCommand() simplecobra.Commander {
|
||||||
return &simpleCommand{
|
return &simpleCommand{
|
||||||
name: "deploy",
|
name: "deploy",
|
||||||
short: "Deploy your site to a Cloud provider.",
|
short: "Deploy your site to a cloud provider",
|
||||||
long: `Deploy your site to a Cloud provider.
|
long: `Deploy your site to a cloud provider
|
||||||
|
|
||||||
See https://gohugo.io/hosting-and-deployment/hugo-deploy/ for detailed
|
See https://gohugo.io/hosting-and-deployment/hugo-deploy/ for detailed
|
||||||
documentation.
|
documentation.
|
||||||
|
|||||||
@@ -11,8 +11,8 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
//go:build nodeploy
|
//go:build !withdeploy
|
||||||
// +build nodeploy
|
// +build !withdeploy
|
||||||
|
|
||||||
// Copyright 2024 The Hugo Authors. All rights reserved.
|
// Copyright 2024 The Hugo Authors. All rights reserved.
|
||||||
//
|
//
|
||||||
@@ -31,6 +31,7 @@ package commands
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"errors"
|
||||||
|
|
||||||
"github.com/bep/simplecobra"
|
"github.com/bep/simplecobra"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
@@ -40,7 +41,7 @@ func newDeployCommand() simplecobra.Commander {
|
|||||||
return &simpleCommand{
|
return &simpleCommand{
|
||||||
name: "deploy",
|
name: "deploy",
|
||||||
run: func(ctx context.Context, cd *simplecobra.Commandeer, r *rootCommand, args []string) error {
|
run: func(ctx context.Context, cd *simplecobra.Commandeer, r *rootCommand, args []string) error {
|
||||||
return nil
|
return errors.New("deploy not supported in this version of Hugo; install a release with 'withdeploy' in the archive filename or build yourself with the 'withdeploy' build tag. Also see https://github.com/gohugoio/hugo/pull/12995")
|
||||||
},
|
},
|
||||||
withc: func(cmd *cobra.Command, r *rootCommand) {
|
withc: func(cmd *cobra.Command, r *rootCommand) {
|
||||||
cmd.Hidden = true
|
cmd.Hidden = true
|
||||||
|
|||||||
+4
-4
@@ -25,8 +25,8 @@ import (
|
|||||||
func newEnvCommand() simplecobra.Commander {
|
func newEnvCommand() simplecobra.Commander {
|
||||||
return &simpleCommand{
|
return &simpleCommand{
|
||||||
name: "env",
|
name: "env",
|
||||||
short: "Print Hugo version and environment info",
|
short: "Display version and environment info",
|
||||||
long: "Print Hugo version and environment info. This is useful in Hugo bug reports",
|
long: "Display version and environment info. This is useful in Hugo bug reports",
|
||||||
run: func(ctx context.Context, cd *simplecobra.Commandeer, r *rootCommand, args []string) error {
|
run: func(ctx context.Context, cd *simplecobra.Commandeer, r *rootCommand, args []string) error {
|
||||||
r.Printf("%s\n", hugo.BuildVersionString())
|
r.Printf("%s\n", hugo.BuildVersionString())
|
||||||
r.Printf("GOOS=%q\n", runtime.GOOS)
|
r.Printf("GOOS=%q\n", runtime.GOOS)
|
||||||
@@ -61,8 +61,8 @@ func newVersionCmd() simplecobra.Commander {
|
|||||||
r.Println(hugo.BuildVersionString())
|
r.Println(hugo.BuildVersionString())
|
||||||
return nil
|
return nil
|
||||||
},
|
},
|
||||||
short: "Print Hugo version and environment info",
|
short: "Display version",
|
||||||
long: "Print Hugo version and environment info. This is useful in Hugo bug reports.",
|
long: "Display version and environment info. This is useful in Hugo bug reports.",
|
||||||
withc: func(cmd *cobra.Command, r *rootCommand) {
|
withc: func(cmd *cobra.Command, r *rootCommand) {
|
||||||
cmd.ValidArgsFunction = cobra.NoFileCompletions
|
cmd.ValidArgsFunction = cobra.NoFileCompletions
|
||||||
},
|
},
|
||||||
|
|||||||
+2
-1
@@ -273,7 +273,8 @@ func (c *genCommand) Run(ctx context.Context, cd *simplecobra.Commandeer, args [
|
|||||||
|
|
||||||
func (c *genCommand) Init(cd *simplecobra.Commandeer) error {
|
func (c *genCommand) Init(cd *simplecobra.Commandeer) error {
|
||||||
cmd := cd.CobraCommand
|
cmd := cd.CobraCommand
|
||||||
cmd.Short = "A collection of several useful generators."
|
cmd.Short = "Generate documentation and syntax highlighting styles"
|
||||||
|
cmd.Long = "Generate documentation for your project using Hugo's documentation engine, including syntax highlighting for various programming languages."
|
||||||
|
|
||||||
cmd.RunE = nil
|
cmd.RunE = nil
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
+34
-24
@@ -27,7 +27,6 @@ import (
|
|||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/bep/logg"
|
|
||||||
"github.com/bep/simplecobra"
|
"github.com/bep/simplecobra"
|
||||||
"github.com/fsnotify/fsnotify"
|
"github.com/fsnotify/fsnotify"
|
||||||
"github.com/gohugoio/hugo/common/herrors"
|
"github.com/gohugoio/hugo/common/herrors"
|
||||||
@@ -136,10 +135,6 @@ func (e *hugoBuilderErrState) wasErr() bool {
|
|||||||
return e.waserr
|
return e.waserr
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *hugoBuilder) errCount() int {
|
|
||||||
return c.r.logger.LoggCount(logg.LevelError) + loggers.Log().LoggCount(logg.LevelError)
|
|
||||||
}
|
|
||||||
|
|
||||||
// getDirList provides NewWatcher() with a list of directories to watch for changes.
|
// getDirList provides NewWatcher() with a list of directories to watch for changes.
|
||||||
func (c *hugoBuilder) getDirList() ([]string, error) {
|
func (c *hugoBuilder) getDirList() ([]string, error) {
|
||||||
h, err := c.hugo()
|
h, err := c.hugo()
|
||||||
@@ -345,7 +340,6 @@ func (c *hugoBuilder) newWatcher(pollIntervalStr string, dirList ...string) (*wa
|
|||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
case changes := <-c.r.changesFromBuild:
|
case changes := <-c.r.changesFromBuild:
|
||||||
c.errState.setBuildErr(nil)
|
|
||||||
unlock, err := h.LockBuild()
|
unlock, err := h.LockBuild()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
c.r.logger.Errorln("Failed to acquire a build lock: %s", err)
|
c.r.logger.Errorln("Failed to acquire a build lock: %s", err)
|
||||||
@@ -358,7 +352,7 @@ func (c *hugoBuilder) newWatcher(pollIntervalStr string, dirList ...string) (*wa
|
|||||||
}
|
}
|
||||||
if c.s != nil && c.s.doLiveReload {
|
if c.s != nil && c.s.doLiveReload {
|
||||||
doReload := c.changeDetector == nil || len(c.changeDetector.changed()) > 0
|
doReload := c.changeDetector == nil || len(c.changeDetector.changed()) > 0
|
||||||
doReload = doReload || c.showErrorInBrowser && c.errCount() > 0
|
doReload = doReload || c.showErrorInBrowser && c.errState.buildErr() != nil
|
||||||
if doReload {
|
if doReload {
|
||||||
livereload.ForceRefresh()
|
livereload.ForceRefresh()
|
||||||
}
|
}
|
||||||
@@ -372,7 +366,7 @@ func (c *hugoBuilder) newWatcher(pollIntervalStr string, dirList ...string) (*wa
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
c.handleEvents(watcher, staticSyncer, evs, configSet)
|
c.handleEvents(watcher, staticSyncer, evs, configSet)
|
||||||
if c.showErrorInBrowser && c.errCount() > 0 {
|
if c.showErrorInBrowser && c.errState.buildErr() != nil {
|
||||||
// Need to reload browser to show the error
|
// Need to reload browser to show the error
|
||||||
livereload.ForceRefresh()
|
livereload.ForceRefresh()
|
||||||
}
|
}
|
||||||
@@ -419,11 +413,17 @@ func (c *hugoBuilder) build() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *hugoBuilder) buildSites(noBuildLock bool) (err error) {
|
func (c *hugoBuilder) buildSites(noBuildLock bool) (err error) {
|
||||||
h, err := c.hugo()
|
defer func() {
|
||||||
|
c.errState.setBuildErr(err)
|
||||||
|
}()
|
||||||
|
|
||||||
|
var h *hugolib.HugoSites
|
||||||
|
h, err = c.hugo()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return
|
||||||
}
|
}
|
||||||
return h.Build(hugolib.BuildCfg{NoBuildLock: noBuildLock})
|
err = h.Build(hugolib.BuildCfg{NoBuildLock: noBuildLock})
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *hugoBuilder) copyStatic() (map[string]uint64, error) {
|
func (c *hugoBuilder) copyStatic() (map[string]uint64, error) {
|
||||||
@@ -619,6 +619,9 @@ func (c *hugoBuilder) fullRebuild(changeType string) {
|
|||||||
// Set the processing on pause until the state is recovered.
|
// Set the processing on pause until the state is recovered.
|
||||||
c.errState.setPaused(true)
|
c.errState.setPaused(true)
|
||||||
c.handleBuildErr(err, "Failed to reload config")
|
c.handleBuildErr(err, "Failed to reload config")
|
||||||
|
if c.s.doLiveReload {
|
||||||
|
livereload.ForceRefresh()
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
c.errState.setPaused(false)
|
c.errState.setPaused(false)
|
||||||
}
|
}
|
||||||
@@ -1081,37 +1084,44 @@ func (c *hugoBuilder) printChangeDetected(typ string) {
|
|||||||
c.r.logger.Println(htime.Now().Format(layout))
|
c.r.logger.Println(htime.Now().Format(layout))
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *hugoBuilder) rebuildSites(events []fsnotify.Event) error {
|
func (c *hugoBuilder) rebuildSites(events []fsnotify.Event) (err error) {
|
||||||
|
defer func() {
|
||||||
|
c.errState.setBuildErr(err)
|
||||||
|
}()
|
||||||
if err := c.errState.buildErr(); err != nil {
|
if err := c.errState.buildErr(); err != nil {
|
||||||
ferrs := herrors.UnwrapFileErrorsWithErrorContext(err)
|
ferrs := herrors.UnwrapFileErrorsWithErrorContext(err)
|
||||||
for _, err := range ferrs {
|
for _, err := range ferrs {
|
||||||
events = append(events, fsnotify.Event{Name: err.Position().Filename, Op: fsnotify.Write})
|
events = append(events, fsnotify.Event{Name: err.Position().Filename, Op: fsnotify.Write})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
c.errState.setBuildErr(nil)
|
var h *hugolib.HugoSites
|
||||||
h, err := c.hugo()
|
h, err = c.hugo()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return
|
||||||
}
|
}
|
||||||
|
err = h.Build(hugolib.BuildCfg{NoBuildLock: true, RecentlyVisited: c.visitedURLs, ErrRecovery: c.errState.wasErr()}, events...)
|
||||||
return h.Build(hugolib.BuildCfg{NoBuildLock: true, RecentlyVisited: c.visitedURLs, ErrRecovery: c.errState.wasErr()}, events...)
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *hugoBuilder) rebuildSitesForChanges(ids []identity.Identity) error {
|
func (c *hugoBuilder) rebuildSitesForChanges(ids []identity.Identity) (err error) {
|
||||||
c.errState.setBuildErr(nil)
|
defer func() {
|
||||||
h, err := c.hugo()
|
c.errState.setBuildErr(err)
|
||||||
|
}()
|
||||||
|
|
||||||
|
var h *hugolib.HugoSites
|
||||||
|
h, err = c.hugo()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return
|
||||||
}
|
}
|
||||||
whatChanged := &hugolib.WhatChanged{}
|
whatChanged := &hugolib.WhatChanged{}
|
||||||
whatChanged.Add(ids...)
|
whatChanged.Add(ids...)
|
||||||
err = h.Build(hugolib.BuildCfg{NoBuildLock: true, WhatChanged: whatChanged, RecentlyVisited: c.visitedURLs, ErrRecovery: c.errState.wasErr()})
|
err = h.Build(hugolib.BuildCfg{NoBuildLock: true, WhatChanged: whatChanged, RecentlyVisited: c.visitedURLs, ErrRecovery: c.errState.wasErr()})
|
||||||
c.errState.setBuildErr(err)
|
|
||||||
return err
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *hugoBuilder) reloadConfig() error {
|
func (c *hugoBuilder) reloadConfig() error {
|
||||||
c.r.Reset()
|
c.r.resetLogs()
|
||||||
c.r.configVersionID.Add(1)
|
c.r.configVersionID.Add(1)
|
||||||
|
|
||||||
if err := c.withConfE(func(conf *commonConfig) error {
|
if err := c.withConfE(func(conf *commonConfig) error {
|
||||||
|
|||||||
+2
-2
@@ -90,8 +90,8 @@ func (c *importCommand) Run(ctx context.Context, cd *simplecobra.Commandeer, arg
|
|||||||
|
|
||||||
func (c *importCommand) Init(cd *simplecobra.Commandeer) error {
|
func (c *importCommand) Init(cd *simplecobra.Commandeer) error {
|
||||||
cmd := cd.CobraCommand
|
cmd := cd.CobraCommand
|
||||||
cmd.Short = "Import your site from others."
|
cmd.Short = "Import a site from another system"
|
||||||
cmd.Long = `Import your site from other web site generators like Jekyll.
|
cmd.Long = `Import a site from another system.
|
||||||
|
|
||||||
Import requires a subcommand, e.g. ` + "`hugo import jekyll jekyll_root_path target_path`."
|
Import requires a subcommand, e.g. ` + "`hugo import jekyll jekyll_root_path target_path`."
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -199,8 +199,8 @@ func (c *listCommand) Run(ctx context.Context, cd *simplecobra.Commandeer, args
|
|||||||
|
|
||||||
func (c *listCommand) Init(cd *simplecobra.Commandeer) error {
|
func (c *listCommand) Init(cd *simplecobra.Commandeer) error {
|
||||||
cmd := cd.CobraCommand
|
cmd := cd.CobraCommand
|
||||||
cmd.Short = "Listing out various types of content"
|
cmd.Short = "List content"
|
||||||
cmd.Long = `Listing out various types of content.
|
cmd.Long = `List content.
|
||||||
|
|
||||||
List requires a subcommand, e.g. hugo list drafts`
|
List requires a subcommand, e.g. hugo list drafts`
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -328,7 +328,7 @@ func (c *modCommands) Run(ctx context.Context, cd *simplecobra.Commandeer, args
|
|||||||
|
|
||||||
func (c *modCommands) Init(cd *simplecobra.Commandeer) error {
|
func (c *modCommands) Init(cd *simplecobra.Commandeer) error {
|
||||||
cmd := cd.CobraCommand
|
cmd := cd.CobraCommand
|
||||||
cmd.Short = "Various Hugo Modules helpers."
|
cmd.Short = "Manage modules"
|
||||||
cmd.Long = `Various helpers to help manage the modules in your project's dependency graph.
|
cmd.Long = `Various helpers to help manage the modules in your project's dependency graph.
|
||||||
Most operations here requires a Go version installed on your system (>= Go 1.12) and the relevant VCS client (typically Git).
|
Most operations here requires a Go version installed on your system (>= Go 1.12) and the relevant VCS client (typically Git).
|
||||||
This is not needed if you only operate on modules inside /themes or if you have vendored them via "hugo mod vendor".
|
This is not needed if you only operate on modules inside /themes or if you have vendored them via "hugo mod vendor".
|
||||||
|
|||||||
+2
-2
@@ -40,7 +40,7 @@ func newNewCommand() *newCommand {
|
|||||||
&simpleCommand{
|
&simpleCommand{
|
||||||
name: "content",
|
name: "content",
|
||||||
use: "content [path]",
|
use: "content [path]",
|
||||||
short: "Create new content for your site",
|
short: "Create new content",
|
||||||
long: `Create a new content file and automatically set the date and title.
|
long: `Create a new content file and automatically set the date and title.
|
||||||
It will guess which kind of file to create based on the path provided.
|
It will guess which kind of file to create based on the path provided.
|
||||||
|
|
||||||
@@ -181,7 +181,7 @@ func (c *newCommand) Run(ctx context.Context, cd *simplecobra.Commandeer, args [
|
|||||||
|
|
||||||
func (c *newCommand) Init(cd *simplecobra.Commandeer) error {
|
func (c *newCommand) Init(cd *simplecobra.Commandeer) error {
|
||||||
cmd := cd.CobraCommand
|
cmd := cd.CobraCommand
|
||||||
cmd.Short = "Create new content for your site"
|
cmd.Short = "Create new content"
|
||||||
cmd.Long = `Create a new content file and automatically set the date and title.
|
cmd.Long = `Create a new content file and automatically set the date and title.
|
||||||
It will guess which kind of file to create based on the path provided.
|
It will guess which kind of file to create based on the path provided.
|
||||||
|
|
||||||
|
|||||||
+12
-14
@@ -508,7 +508,7 @@ func (c *serverCommand) Run(ctx context.Context, cd *simplecobra.Commandeer, arg
|
|||||||
|
|
||||||
func (c *serverCommand) Init(cd *simplecobra.Commandeer) error {
|
func (c *serverCommand) Init(cd *simplecobra.Commandeer) error {
|
||||||
cmd := cd.CobraCommand
|
cmd := cd.CobraCommand
|
||||||
cmd.Short = "A high performance webserver"
|
cmd.Short = "Start the embedded web server"
|
||||||
cmd.Long = `Hugo provides its own webserver which builds and serves the site.
|
cmd.Long = `Hugo provides its own webserver which builds and serves the site.
|
||||||
While hugo server is high performance, it is a webserver with limited options.
|
While hugo server is high performance, it is a webserver with limited options.
|
||||||
|
|
||||||
@@ -648,9 +648,8 @@ func (c *serverCommand) setServerInfoInConfig() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *serverCommand) getErrorWithContext() any {
|
func (c *serverCommand) getErrorWithContext() any {
|
||||||
errCount := c.errCount()
|
buildErr := c.errState.buildErr()
|
||||||
|
if buildErr == nil {
|
||||||
if errCount == 0 {
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -659,7 +658,7 @@ func (c *serverCommand) getErrorWithContext() any {
|
|||||||
m["Error"] = cleanErrorLog(c.r.logger.Errors())
|
m["Error"] = cleanErrorLog(c.r.logger.Errors())
|
||||||
|
|
||||||
m["Version"] = hugo.BuildVersionString()
|
m["Version"] = hugo.BuildVersionString()
|
||||||
ferrors := herrors.UnwrapFileErrorsWithErrorContext(c.errState.buildErr())
|
ferrors := herrors.UnwrapFileErrorsWithErrorContext(buildErr)
|
||||||
m["Files"] = ferrors
|
m["Files"] = ferrors
|
||||||
|
|
||||||
return m
|
return m
|
||||||
@@ -830,22 +829,25 @@ func (c *serverCommand) fixURL(baseURLFromConfig, baseURLFromFlag string, port i
|
|||||||
return u.String(), nil
|
return u.String(), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *serverCommand) partialReRender(urls ...string) error {
|
func (c *serverCommand) partialReRender(urls ...string) (err error) {
|
||||||
defer func() {
|
defer func() {
|
||||||
c.errState.setWasErr(false)
|
c.errState.setWasErr(false)
|
||||||
}()
|
}()
|
||||||
c.errState.setBuildErr(nil)
|
|
||||||
visited := types.NewEvictingStringQueue(len(urls))
|
visited := types.NewEvictingStringQueue(len(urls))
|
||||||
for _, url := range urls {
|
for _, url := range urls {
|
||||||
visited.Add(url)
|
visited.Add(url)
|
||||||
}
|
}
|
||||||
|
|
||||||
h, err := c.hugo()
|
var h *hugolib.HugoSites
|
||||||
|
h, err = c.hugo()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// Note: We do not set NoBuildLock as the file lock is not acquired at this stage.
|
// Note: We do not set NoBuildLock as the file lock is not acquired at this stage.
|
||||||
return h.Build(hugolib.BuildCfg{NoBuildLock: false, RecentlyVisited: visited, PartialReRender: true, ErrRecovery: c.errState.wasErr()})
|
err = h.Build(hugolib.BuildCfg{NoBuildLock: false, RecentlyVisited: visited, PartialReRender: true, ErrRecovery: c.errState.wasErr()})
|
||||||
|
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *serverCommand) serve() error {
|
func (c *serverCommand) serve() error {
|
||||||
@@ -1012,10 +1014,6 @@ func (c *serverCommand) serve() error {
|
|||||||
c.r.Println("Error:", err)
|
c.r.Println("Error:", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if h := c.hugoTry(); h != nil {
|
|
||||||
h.Close()
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
|
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
|
||||||
defer cancel()
|
defer cancel()
|
||||||
wg2, ctx := errgroup.WithContext(ctx)
|
wg2, ctx := errgroup.WithContext(ctx)
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ var nilPointerErrRe = regexp.MustCompile(`at <(.*)>: error calling (.*?): runtim
|
|||||||
|
|
||||||
const deferredPrefix = "__hdeferred/"
|
const deferredPrefix = "__hdeferred/"
|
||||||
|
|
||||||
var deferredStringToRemove = regexp.MustCompile(`executing "__hdeferred/.*" `)
|
var deferredStringToRemove = regexp.MustCompile(`executing "__hdeferred/.*?" `)
|
||||||
|
|
||||||
// ImproveRenderErr improves the error message for rendering errors.
|
// ImproveRenderErr improves the error message for rendering errors.
|
||||||
func ImproveRenderErr(inErr error) (outErr error) {
|
func ImproveRenderErr(inErr error) (outErr error) {
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ package hugo
|
|||||||
// This should be the only one.
|
// This should be the only one.
|
||||||
var CurrentVersion = Version{
|
var CurrentVersion = Version{
|
||||||
Major: 0,
|
Major: 0,
|
||||||
Minor: 135,
|
Minor: 137,
|
||||||
PatchLevel: 0,
|
PatchLevel: 0,
|
||||||
Suffix: "-DEV",
|
Suffix: "-DEV",
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -103,31 +103,7 @@ suffixes = ["html", "xhtml"]
|
|||||||
b.Assert(contentTypes.Markdown.Suffixes(), qt.DeepEquals, []string{"md", "mdown", "markdown"})
|
b.Assert(contentTypes.Markdown.Suffixes(), qt.DeepEquals, []string{"md", "mdown", "markdown"})
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestPaginationConfigOld(t *testing.T) {
|
func TestPaginationConfig(t *testing.T) {
|
||||||
files := `
|
|
||||||
-- hugo.toml --
|
|
||||||
[languages.en]
|
|
||||||
weight = 1
|
|
||||||
paginatePath = "page-en"
|
|
||||||
|
|
||||||
[languages.de]
|
|
||||||
weight = 2
|
|
||||||
paginatePath = "page-de"
|
|
||||||
paginate = 20
|
|
||||||
`
|
|
||||||
|
|
||||||
b := hugolib.Test(t, files)
|
|
||||||
|
|
||||||
confEn := b.H.Sites[0].Conf.Pagination()
|
|
||||||
confDe := b.H.Sites[1].Conf.Pagination()
|
|
||||||
|
|
||||||
b.Assert(confEn.Path, qt.Equals, "page-en")
|
|
||||||
b.Assert(confEn.PagerSize, qt.Equals, 10)
|
|
||||||
b.Assert(confDe.Path, qt.Equals, "page-de")
|
|
||||||
b.Assert(confDe.PagerSize, qt.Equals, 20)
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestPaginationConfigNew(t *testing.T) {
|
|
||||||
files := `
|
files := `
|
||||||
-- hugo.toml --
|
-- hugo.toml --
|
||||||
[languages.en]
|
[languages.en]
|
||||||
@@ -184,3 +160,18 @@ title: "p3"
|
|||||||
b.AssertFileExists("public/page/1/index.html", false)
|
b.AssertFileExists("public/page/1/index.html", false)
|
||||||
b.AssertFileContent("public/page/2/index.html", "pagination-default")
|
b.AssertFileContent("public/page/2/index.html", "pagination-default")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestMapUglyURLs(t *testing.T) {
|
||||||
|
files := `
|
||||||
|
-- hugo.toml --
|
||||||
|
[uglyurls]
|
||||||
|
posts = true
|
||||||
|
`
|
||||||
|
|
||||||
|
b := hugolib.Test(t, files)
|
||||||
|
|
||||||
|
c := b.H.Configs.Base
|
||||||
|
|
||||||
|
b.Assert(c.C.IsUglyURLSection("posts"), qt.IsTrue)
|
||||||
|
b.Assert(c.C.IsUglyURLSection("blog"), qt.IsFalse)
|
||||||
|
}
|
||||||
|
|||||||
@@ -419,6 +419,8 @@ var allDecoderSetups = map[string]decodeWeight{
|
|||||||
p.c.UglyURLs = vv
|
p.c.UglyURLs = vv
|
||||||
case string:
|
case string:
|
||||||
p.c.UglyURLs = vv == "true"
|
p.c.UglyURLs = vv == "true"
|
||||||
|
case maps.Params:
|
||||||
|
p.c.UglyURLs = cast.ToStringMapBool(maps.CleanConfigStringMap(vv))
|
||||||
default:
|
default:
|
||||||
p.c.UglyURLs = cast.ToStringMapBool(v)
|
p.c.UglyURLs = cast.ToStringMapBool(v)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
+++
|
|
||||||
title = '{{ replace .File.ContentBaseName "-" " " | title }}'
|
|
||||||
date = {{ .Date }}
|
|
||||||
draft = true
|
|
||||||
+++
|
|
||||||
@@ -76,6 +76,11 @@ func CreateSite(createpath string, sourceFs afero.Fs, force bool, format string)
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
err = newSiteCreateArchetype(sourceFs, createpath, format)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
return copyFiles(createpath, sourceFs, siteFs)
|
return copyFiles(createpath, sourceFs, siteFs)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -109,3 +114,19 @@ func newSiteCreateConfig(fs afero.Fs, createpath string, format string) (err err
|
|||||||
|
|
||||||
return helpers.WriteToDisk(filepath.Join(createpath, "hugo."+format), &buf, fs)
|
return helpers.WriteToDisk(filepath.Join(createpath, "hugo."+format), &buf, fs)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func newSiteCreateArchetype(fs afero.Fs, createpath string, format string) (err error) {
|
||||||
|
in := map[string]any{
|
||||||
|
"title": "{{ replace .File.ContentBaseName \"-\" \" \" | title }}",
|
||||||
|
"date": "{{ .Date }}",
|
||||||
|
"draft": true,
|
||||||
|
}
|
||||||
|
|
||||||
|
var buf bytes.Buffer
|
||||||
|
err = parser.InterfaceToFrontMatter(in, metadecoders.FormatFromString(format), &buf)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return helpers.WriteToDisk(filepath.Join(createpath, "archetypes", "default.md"), &buf, fs)
|
||||||
|
}
|
||||||
|
|||||||
@@ -11,8 +11,8 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
//go:build !nodeploy
|
//go:build withdeploy
|
||||||
// +build !nodeploy
|
// +build withdeploy
|
||||||
|
|
||||||
package deploy
|
package deploy
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -11,8 +11,8 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
//go:build !nodeploy
|
//go:build withdeploy
|
||||||
// +build !nodeploy
|
// +build withdeploy
|
||||||
|
|
||||||
package deploy
|
package deploy
|
||||||
|
|
||||||
|
|||||||
@@ -11,8 +11,8 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
//go:build !solaris && !nodeploy
|
//go:build !solaris && withdeploy
|
||||||
// +build !solaris,!nodeploy
|
// +build !solaris,withdeploy
|
||||||
|
|
||||||
package deploy
|
package deploy
|
||||||
|
|
||||||
|
|||||||
@@ -11,8 +11,8 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
//go:build !nodeploy
|
//go:build withdeploy
|
||||||
// +build !nodeploy
|
// +build withdeploy
|
||||||
|
|
||||||
package deploy
|
package deploy
|
||||||
|
|
||||||
|
|||||||
@@ -11,8 +11,8 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
//go:build !nodeploy
|
//go:build withdeploy
|
||||||
// +build !nodeploy
|
// +build withdeploy
|
||||||
|
|
||||||
package deployconfig
|
package deployconfig
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -11,8 +11,8 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
//go:build !nodeploy
|
//go:build withdeploy
|
||||||
// +build !nodeploy
|
// +build withdeploy
|
||||||
|
|
||||||
package deploy
|
package deploy
|
||||||
|
|
||||||
|
|||||||
Vendored
+7
@@ -98,6 +98,8 @@ type Deps struct {
|
|||||||
// TODO(bep) rethink this re. a plugin setup, but this will have to do for now.
|
// TODO(bep) rethink this re. a plugin setup, but this will have to do for now.
|
||||||
WasmDispatchers *warpc.Dispatchers
|
WasmDispatchers *warpc.Dispatchers
|
||||||
|
|
||||||
|
isClosed bool
|
||||||
|
|
||||||
*globalErrHandler
|
*globalErrHandler
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -345,6 +347,11 @@ func (d *Deps) TextTmpl() tpl.TemplateParseFinder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (d *Deps) Close() error {
|
func (d *Deps) Close() error {
|
||||||
|
if d.isClosed {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
d.isClosed = true
|
||||||
|
|
||||||
if d.MemCache != nil {
|
if d.MemCache != nil {
|
||||||
d.MemCache.Stop()
|
d.MemCache.Stop()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ url: /commands/hugo/
|
|||||||
---
|
---
|
||||||
## hugo
|
## hugo
|
||||||
|
|
||||||
hugo builds your site
|
Build your site
|
||||||
|
|
||||||
### Synopsis
|
### Synopsis
|
||||||
|
|
||||||
@@ -70,16 +70,17 @@ hugo [flags]
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
|
* [hugo build](/commands/hugo_build/) - Build your site
|
||||||
* [hugo completion](/commands/hugo_completion/) - Generate the autocompletion script for the specified shell
|
* [hugo completion](/commands/hugo_completion/) - Generate the autocompletion script for the specified shell
|
||||||
* [hugo config](/commands/hugo_config/) - Print the site configuration
|
* [hugo config](/commands/hugo_config/) - Display site configuration
|
||||||
* [hugo convert](/commands/hugo_convert/) - Convert your content to different formats
|
* [hugo convert](/commands/hugo_convert/) - Convert front matter to another format
|
||||||
* [hugo deploy](/commands/hugo_deploy/) - Deploy your site to a Cloud provider.
|
* [hugo deploy](/commands/hugo_deploy/) - Deploy your site to a cloud provider
|
||||||
* [hugo env](/commands/hugo_env/) - Print Hugo version and environment info
|
* [hugo env](/commands/hugo_env/) - Display version and environment info
|
||||||
* [hugo gen](/commands/hugo_gen/) - A collection of several useful generators.
|
* [hugo gen](/commands/hugo_gen/) - Generate documentation and syntax highlighting styles
|
||||||
* [hugo import](/commands/hugo_import/) - Import your site from others.
|
* [hugo import](/commands/hugo_import/) - Import a site from another system
|
||||||
* [hugo list](/commands/hugo_list/) - Listing out various types of content
|
* [hugo list](/commands/hugo_list/) - List content
|
||||||
* [hugo mod](/commands/hugo_mod/) - Various Hugo Modules helpers.
|
* [hugo mod](/commands/hugo_mod/) - Manage modules
|
||||||
* [hugo new](/commands/hugo_new/) - Create new content for your site
|
* [hugo new](/commands/hugo_new/) - Create new content
|
||||||
* [hugo server](/commands/hugo_server/) - A high performance webserver
|
* [hugo server](/commands/hugo_server/) - Start the embedded web server
|
||||||
* [hugo version](/commands/hugo_version/) - Print Hugo version and environment info
|
* [hugo version](/commands/hugo_version/) - Display version
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,74 @@
|
|||||||
|
---
|
||||||
|
title: "hugo build"
|
||||||
|
slug: hugo_build
|
||||||
|
url: /commands/hugo_build/
|
||||||
|
---
|
||||||
|
## hugo build
|
||||||
|
|
||||||
|
Build your site
|
||||||
|
|
||||||
|
### Synopsis
|
||||||
|
|
||||||
|
build is the main command, used to build your Hugo site.
|
||||||
|
|
||||||
|
Hugo is a Fast and Flexible Static Site Generator
|
||||||
|
built with love by spf13 and friends in Go.
|
||||||
|
|
||||||
|
Complete documentation is available at https://gohugo.io/.
|
||||||
|
|
||||||
|
```
|
||||||
|
hugo build [flags]
|
||||||
|
```
|
||||||
|
|
||||||
|
### Options
|
||||||
|
|
||||||
|
```
|
||||||
|
-b, --baseURL string hostname (and path) to the root, e.g. https://spf13.com/
|
||||||
|
-D, --buildDrafts include content marked as draft
|
||||||
|
-E, --buildExpired include expired content
|
||||||
|
-F, --buildFuture include content with publishdate in the future
|
||||||
|
--cacheDir string filesystem path to cache directory
|
||||||
|
--cleanDestinationDir remove files from destination not found in static directories
|
||||||
|
--clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00
|
||||||
|
--config string config file (default is hugo.yaml|json|toml)
|
||||||
|
--configDir string config dir (default "config")
|
||||||
|
-c, --contentDir string filesystem path to content directory
|
||||||
|
--debug debug output
|
||||||
|
-d, --destination string filesystem path to write files to
|
||||||
|
--disableKinds strings disable different kind of pages (home, RSS etc.)
|
||||||
|
--enableGitInfo add Git revision, date, author, and CODEOWNERS info to the pages
|
||||||
|
-e, --environment string build environment
|
||||||
|
--forceSyncStatic copy all files when static is changed.
|
||||||
|
--gc enable to run some cleanup tasks (remove unused cache files) after the build
|
||||||
|
-h, --help help for build
|
||||||
|
--ignoreCache ignores the cache directory
|
||||||
|
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
|
||||||
|
-l, --layoutDir string filesystem path to layout directory
|
||||||
|
--logLevel string log level (debug|info|warn|error)
|
||||||
|
--minify minify any supported output format (HTML, XML etc.)
|
||||||
|
--noBuildLock don't create .hugo_build.lock file
|
||||||
|
--noChmod don't sync permission mode of files
|
||||||
|
--noTimes don't sync modification time of files
|
||||||
|
--panicOnWarning panic on first WARNING log
|
||||||
|
--poll string set this to a poll interval, e.g --poll 700ms, to use a poll based approach to watch for file system changes
|
||||||
|
--printI18nWarnings print missing translations
|
||||||
|
--printMemoryUsage print memory usage to screen at intervals
|
||||||
|
--printPathWarnings print warnings on duplicate target paths etc.
|
||||||
|
--printUnusedTemplates print warnings on unused templates.
|
||||||
|
--quiet build in quiet mode
|
||||||
|
--renderSegments strings named segments to render (configured in the segments config)
|
||||||
|
-M, --renderToMemory render to memory (mostly useful when running the server)
|
||||||
|
-s, --source string filesystem path to read files relative from
|
||||||
|
--templateMetrics display metrics about template executions
|
||||||
|
--templateMetricsHints calculate some improvement hints when combined with --templateMetrics
|
||||||
|
-t, --theme strings themes to use (located in /themes/THEMENAME/)
|
||||||
|
--themesDir string filesystem path to themes directory
|
||||||
|
--trace file write trace to file (not useful in general)
|
||||||
|
-v, --verbose verbose output
|
||||||
|
-w, --watch watch filesystem for changes and recreate as needed
|
||||||
|
```
|
||||||
|
|
||||||
|
### SEE ALSO
|
||||||
|
|
||||||
|
* [hugo](/commands/hugo/) - Build your site
|
||||||
|
|
||||||
@@ -39,7 +39,7 @@ See each sub-command's help for details on how to use the generated script.
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
* [hugo](/commands/hugo/) - hugo builds your site
|
* [hugo](/commands/hugo/) - Build your site
|
||||||
* [hugo completion bash](/commands/hugo_completion_bash/) - Generate the autocompletion script for bash
|
* [hugo completion bash](/commands/hugo_completion_bash/) - Generate the autocompletion script for bash
|
||||||
* [hugo completion fish](/commands/hugo_completion_fish/) - Generate the autocompletion script for fish
|
* [hugo completion fish](/commands/hugo_completion_fish/) - Generate the autocompletion script for fish
|
||||||
* [hugo completion powershell](/commands/hugo_completion_powershell/) - Generate the autocompletion script for powershell
|
* [hugo completion powershell](/commands/hugo_completion_powershell/) - Generate the autocompletion script for powershell
|
||||||
|
|||||||
@@ -5,11 +5,11 @@ url: /commands/hugo_config/
|
|||||||
---
|
---
|
||||||
## hugo config
|
## hugo config
|
||||||
|
|
||||||
Print the site configuration
|
Display site configuration
|
||||||
|
|
||||||
### Synopsis
|
### Synopsis
|
||||||
|
|
||||||
Print the site configuration, both default and custom settings.
|
Display site configuration, both default and custom settings.
|
||||||
|
|
||||||
```
|
```
|
||||||
hugo config [command] [flags]
|
hugo config [command] [flags]
|
||||||
@@ -48,6 +48,6 @@ hugo config [command] [flags]
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
* [hugo](/commands/hugo/) - hugo builds your site
|
* [hugo](/commands/hugo/) - Build your site
|
||||||
* [hugo config mounts](/commands/hugo_config_mounts/) - Print the configured file mounts
|
* [hugo config mounts](/commands/hugo_config_mounts/) - Print the configured file mounts
|
||||||
|
|
||||||
|
|||||||
@@ -42,5 +42,5 @@ hugo config mounts [flags] [args]
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
* [hugo config](/commands/hugo_config/) - Print the site configuration
|
* [hugo config](/commands/hugo_config/) - Display site configuration
|
||||||
|
|
||||||
|
|||||||
@@ -5,11 +5,11 @@ url: /commands/hugo_convert/
|
|||||||
---
|
---
|
||||||
## hugo convert
|
## hugo convert
|
||||||
|
|
||||||
Convert your content to different formats
|
Convert front matter to another format
|
||||||
|
|
||||||
### Synopsis
|
### Synopsis
|
||||||
|
|
||||||
Convert your content (e.g. front matter) to different formats.
|
Convert front matter to another format.
|
||||||
|
|
||||||
See convert's subcommands toJSON, toTOML and toYAML for more information.
|
See convert's subcommands toJSON, toTOML and toYAML for more information.
|
||||||
|
|
||||||
@@ -41,7 +41,7 @@ See convert's subcommands toJSON, toTOML and toYAML for more information.
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
* [hugo](/commands/hugo/) - hugo builds your site
|
* [hugo](/commands/hugo/) - Build your site
|
||||||
* [hugo convert toJSON](/commands/hugo_convert_tojson/) - Convert front matter to JSON
|
* [hugo convert toJSON](/commands/hugo_convert_tojson/) - Convert front matter to JSON
|
||||||
* [hugo convert toTOML](/commands/hugo_convert_totoml/) - Convert front matter to TOML
|
* [hugo convert toTOML](/commands/hugo_convert_totoml/) - Convert front matter to TOML
|
||||||
* [hugo convert toYAML](/commands/hugo_convert_toyaml/) - Convert front matter to YAML
|
* [hugo convert toYAML](/commands/hugo_convert_toyaml/) - Convert front matter to YAML
|
||||||
|
|||||||
@@ -44,5 +44,5 @@ hugo convert toJSON [flags] [args]
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
* [hugo convert](/commands/hugo_convert/) - Convert your content to different formats
|
* [hugo convert](/commands/hugo_convert/) - Convert front matter to another format
|
||||||
|
|
||||||
|
|||||||
@@ -44,5 +44,5 @@ hugo convert toTOML [flags] [args]
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
* [hugo convert](/commands/hugo_convert/) - Convert your content to different formats
|
* [hugo convert](/commands/hugo_convert/) - Convert front matter to another format
|
||||||
|
|
||||||
|
|||||||
@@ -44,5 +44,5 @@ hugo convert toYAML [flags] [args]
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
* [hugo convert](/commands/hugo_convert/) - Convert your content to different formats
|
* [hugo convert](/commands/hugo_convert/) - Convert front matter to another format
|
||||||
|
|
||||||
|
|||||||
@@ -5,11 +5,11 @@ url: /commands/hugo_deploy/
|
|||||||
---
|
---
|
||||||
## hugo deploy
|
## hugo deploy
|
||||||
|
|
||||||
Deploy your site to a Cloud provider.
|
Deploy your site to a cloud provider
|
||||||
|
|
||||||
### Synopsis
|
### Synopsis
|
||||||
|
|
||||||
Deploy your site to a Cloud provider.
|
Deploy your site to a cloud provider
|
||||||
|
|
||||||
See https://gohugo.io/hosting-and-deployment/hugo-deploy/ for detailed
|
See https://gohugo.io/hosting-and-deployment/hugo-deploy/ for detailed
|
||||||
documentation.
|
documentation.
|
||||||
@@ -52,5 +52,5 @@ hugo deploy [flags] [args]
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
* [hugo](/commands/hugo/) - hugo builds your site
|
* [hugo](/commands/hugo/) - Build your site
|
||||||
|
|
||||||
|
|||||||
@@ -5,11 +5,11 @@ url: /commands/hugo_env/
|
|||||||
---
|
---
|
||||||
## hugo env
|
## hugo env
|
||||||
|
|
||||||
Print Hugo version and environment info
|
Display version and environment info
|
||||||
|
|
||||||
### Synopsis
|
### Synopsis
|
||||||
|
|
||||||
Print Hugo version and environment info. This is useful in Hugo bug reports
|
Display version and environment info. This is useful in Hugo bug reports
|
||||||
|
|
||||||
```
|
```
|
||||||
hugo env [flags] [args]
|
hugo env [flags] [args]
|
||||||
@@ -41,5 +41,5 @@ hugo env [flags] [args]
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
* [hugo](/commands/hugo/) - hugo builds your site
|
* [hugo](/commands/hugo/) - Build your site
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,11 @@ url: /commands/hugo_gen/
|
|||||||
---
|
---
|
||||||
## hugo gen
|
## hugo gen
|
||||||
|
|
||||||
A collection of several useful generators.
|
Generate documentation and syntax highlighting styles
|
||||||
|
|
||||||
|
### Synopsis
|
||||||
|
|
||||||
|
Generate documentation for your project using Hugo's documentation engine, including syntax highlighting for various programming languages.
|
||||||
|
|
||||||
### Options
|
### Options
|
||||||
|
|
||||||
@@ -33,7 +37,7 @@ A collection of several useful generators.
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
* [hugo](/commands/hugo/) - hugo builds your site
|
* [hugo](/commands/hugo/) - Build your site
|
||||||
* [hugo gen chromastyles](/commands/hugo_gen_chromastyles/) - Generate CSS stylesheet for the Chroma code highlighter
|
* [hugo gen chromastyles](/commands/hugo_gen_chromastyles/) - Generate CSS stylesheet for the Chroma code highlighter
|
||||||
* [hugo gen doc](/commands/hugo_gen_doc/) - Generate Markdown documentation for the Hugo CLI.
|
* [hugo gen doc](/commands/hugo_gen_doc/) - Generate Markdown documentation for the Hugo CLI.
|
||||||
* [hugo gen man](/commands/hugo_gen_man/) - Generate man pages for the Hugo CLI
|
* [hugo gen man](/commands/hugo_gen_man/) - Generate man pages for the Hugo CLI
|
||||||
|
|||||||
@@ -47,5 +47,5 @@ hugo gen chromastyles [flags] [args]
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
* [hugo gen](/commands/hugo_gen/) - A collection of several useful generators.
|
* [hugo gen](/commands/hugo_gen/) - Generate documentation and syntax highlighting styles
|
||||||
|
|
||||||
|
|||||||
@@ -47,5 +47,5 @@ hugo gen doc [flags] [args]
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
* [hugo gen](/commands/hugo_gen/) - A collection of several useful generators.
|
* [hugo gen](/commands/hugo_gen/) - Generate documentation and syntax highlighting styles
|
||||||
|
|
||||||
|
|||||||
@@ -44,5 +44,5 @@ hugo gen man [flags] [args]
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
* [hugo gen](/commands/hugo_gen/) - A collection of several useful generators.
|
* [hugo gen](/commands/hugo_gen/) - Generate documentation and syntax highlighting styles
|
||||||
|
|
||||||
|
|||||||
@@ -5,11 +5,11 @@ url: /commands/hugo_import/
|
|||||||
---
|
---
|
||||||
## hugo import
|
## hugo import
|
||||||
|
|
||||||
Import your site from others.
|
Import a site from another system
|
||||||
|
|
||||||
### Synopsis
|
### Synopsis
|
||||||
|
|
||||||
Import your site from other web site generators like Jekyll.
|
Import a site from another system.
|
||||||
|
|
||||||
Import requires a subcommand, e.g. `hugo import jekyll jekyll_root_path target_path`.
|
Import requires a subcommand, e.g. `hugo import jekyll jekyll_root_path target_path`.
|
||||||
|
|
||||||
@@ -39,6 +39,6 @@ Import requires a subcommand, e.g. `hugo import jekyll jekyll_root_path target_p
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
* [hugo](/commands/hugo/) - hugo builds your site
|
* [hugo](/commands/hugo/) - Build your site
|
||||||
* [hugo import jekyll](/commands/hugo_import_jekyll/) - hugo import from Jekyll
|
* [hugo import jekyll](/commands/hugo_import_jekyll/) - hugo import from Jekyll
|
||||||
|
|
||||||
|
|||||||
@@ -44,5 +44,5 @@ hugo import jekyll [flags] [args]
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
* [hugo import](/commands/hugo_import/) - Import your site from others.
|
* [hugo import](/commands/hugo_import/) - Import a site from another system
|
||||||
|
|
||||||
|
|||||||
@@ -5,11 +5,11 @@ url: /commands/hugo_list/
|
|||||||
---
|
---
|
||||||
## hugo list
|
## hugo list
|
||||||
|
|
||||||
Listing out various types of content
|
List content
|
||||||
|
|
||||||
### Synopsis
|
### Synopsis
|
||||||
|
|
||||||
Listing out various types of content.
|
List content.
|
||||||
|
|
||||||
List requires a subcommand, e.g. hugo list drafts
|
List requires a subcommand, e.g. hugo list drafts
|
||||||
|
|
||||||
@@ -39,7 +39,7 @@ List requires a subcommand, e.g. hugo list drafts
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
* [hugo](/commands/hugo/) - hugo builds your site
|
* [hugo](/commands/hugo/) - Build your site
|
||||||
* [hugo list all](/commands/hugo_list_all/) - List all content
|
* [hugo list all](/commands/hugo_list_all/) - List all content
|
||||||
* [hugo list drafts](/commands/hugo_list_drafts/) - List draft content
|
* [hugo list drafts](/commands/hugo_list_drafts/) - List draft content
|
||||||
* [hugo list expired](/commands/hugo_list_expired/) - List expired content
|
* [hugo list expired](/commands/hugo_list_expired/) - List expired content
|
||||||
|
|||||||
@@ -41,5 +41,5 @@ hugo list all [flags] [args]
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
* [hugo list](/commands/hugo_list/) - Listing out various types of content
|
* [hugo list](/commands/hugo_list/) - List content
|
||||||
|
|
||||||
|
|||||||
@@ -41,5 +41,5 @@ hugo list drafts [flags] [args]
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
* [hugo list](/commands/hugo_list/) - Listing out various types of content
|
* [hugo list](/commands/hugo_list/) - List content
|
||||||
|
|
||||||
|
|||||||
@@ -41,5 +41,5 @@ hugo list expired [flags] [args]
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
* [hugo list](/commands/hugo_list/) - Listing out various types of content
|
* [hugo list](/commands/hugo_list/) - List content
|
||||||
|
|
||||||
|
|||||||
@@ -41,5 +41,5 @@ hugo list future [flags] [args]
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
* [hugo list](/commands/hugo_list/) - Listing out various types of content
|
* [hugo list](/commands/hugo_list/) - List content
|
||||||
|
|
||||||
|
|||||||
@@ -41,5 +41,5 @@ hugo list published [flags] [args]
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
* [hugo list](/commands/hugo_list/) - Listing out various types of content
|
* [hugo list](/commands/hugo_list/) - List content
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ url: /commands/hugo_mod/
|
|||||||
---
|
---
|
||||||
## hugo mod
|
## hugo mod
|
||||||
|
|
||||||
Various Hugo Modules helpers.
|
Manage modules
|
||||||
|
|
||||||
### Synopsis
|
### Synopsis
|
||||||
|
|
||||||
@@ -48,7 +48,7 @@ See https://gohugo.io/hugo-modules/ for more information.
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
* [hugo](/commands/hugo/) - hugo builds your site
|
* [hugo](/commands/hugo/) - Build your site
|
||||||
* [hugo mod clean](/commands/hugo_mod_clean/) - Delete the Hugo Module cache for the current project.
|
* [hugo mod clean](/commands/hugo_mod_clean/) - Delete the Hugo Module cache for the current project.
|
||||||
* [hugo mod get](/commands/hugo_mod_get/) - Resolves dependencies in your current Hugo Project.
|
* [hugo mod get](/commands/hugo_mod_get/) - Resolves dependencies in your current Hugo Project.
|
||||||
* [hugo mod graph](/commands/hugo_mod_graph/) - Print a module dependency graph.
|
* [hugo mod graph](/commands/hugo_mod_graph/) - Print a module dependency graph.
|
||||||
|
|||||||
@@ -48,5 +48,5 @@ hugo mod clean [flags] [args]
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
* [hugo mod](/commands/hugo_mod/) - Various Hugo Modules helpers.
|
* [hugo mod](/commands/hugo_mod/) - Manage modules
|
||||||
|
|
||||||
|
|||||||
@@ -72,5 +72,5 @@ hugo mod get [flags] [args]
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
* [hugo mod](/commands/hugo_mod/) - Various Hugo Modules helpers.
|
* [hugo mod](/commands/hugo_mod/) - Manage modules
|
||||||
|
|
||||||
|
|||||||
@@ -49,5 +49,5 @@ hugo mod graph [flags] [args]
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
* [hugo mod](/commands/hugo_mod/) - Various Hugo Modules helpers.
|
* [hugo mod](/commands/hugo_mod/) - Manage modules
|
||||||
|
|
||||||
|
|||||||
@@ -53,5 +53,5 @@ hugo mod init [flags] [args]
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
* [hugo mod](/commands/hugo_mod/) - Various Hugo Modules helpers.
|
* [hugo mod](/commands/hugo_mod/) - Manage modules
|
||||||
|
|
||||||
|
|||||||
@@ -41,6 +41,6 @@ hugo mod npm [command] [flags]
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
* [hugo mod](/commands/hugo_mod/) - Various Hugo Modules helpers.
|
* [hugo mod](/commands/hugo_mod/) - Manage modules
|
||||||
* [hugo mod npm pack](/commands/hugo_mod_npm_pack/) - Experimental: Prepares and writes a composite package.json file for your project.
|
* [hugo mod npm pack](/commands/hugo_mod_npm_pack/) - Experimental: Prepares and writes a composite package.json file for your project.
|
||||||
|
|
||||||
|
|||||||
@@ -42,5 +42,5 @@ hugo mod tidy [flags] [args]
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
* [hugo mod](/commands/hugo_mod/) - Various Hugo Modules helpers.
|
* [hugo mod](/commands/hugo_mod/) - Manage modules
|
||||||
|
|
||||||
|
|||||||
@@ -48,5 +48,5 @@ hugo mod vendor [flags] [args]
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
* [hugo mod](/commands/hugo_mod/) - Various Hugo Modules helpers.
|
* [hugo mod](/commands/hugo_mod/) - Manage modules
|
||||||
|
|
||||||
|
|||||||
@@ -47,5 +47,5 @@ hugo mod verify [flags] [args]
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
* [hugo mod](/commands/hugo_mod/) - Various Hugo Modules helpers.
|
* [hugo mod](/commands/hugo_mod/) - Manage modules
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ url: /commands/hugo_new/
|
|||||||
---
|
---
|
||||||
## hugo new
|
## hugo new
|
||||||
|
|
||||||
Create new content for your site
|
Create new content
|
||||||
|
|
||||||
### Synopsis
|
### Synopsis
|
||||||
|
|
||||||
@@ -44,8 +44,8 @@ Ensure you run this within the root directory of your site.
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
* [hugo](/commands/hugo/) - hugo builds your site
|
* [hugo](/commands/hugo/) - Build your site
|
||||||
* [hugo new content](/commands/hugo_new_content/) - Create new content for your site
|
* [hugo new content](/commands/hugo_new_content/) - Create new content
|
||||||
* [hugo new site](/commands/hugo_new_site/) - Create a new site (skeleton)
|
* [hugo new site](/commands/hugo_new_site/) - Create a new site (skeleton)
|
||||||
* [hugo new theme](/commands/hugo_new_theme/) - Create a new theme (skeleton)
|
* [hugo new theme](/commands/hugo_new_theme/) - Create a new theme (skeleton)
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ url: /commands/hugo_new_content/
|
|||||||
---
|
---
|
||||||
## hugo new content
|
## hugo new content
|
||||||
|
|
||||||
Create new content for your site
|
Create new content
|
||||||
|
|
||||||
### Synopsis
|
### Synopsis
|
||||||
|
|
||||||
@@ -56,5 +56,5 @@ hugo new content [path] [flags]
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
* [hugo new](/commands/hugo_new/) - Create new content for your site
|
* [hugo new](/commands/hugo_new/) - Create new content
|
||||||
|
|
||||||
|
|||||||
@@ -45,5 +45,5 @@ hugo new site [path] [flags]
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
* [hugo new](/commands/hugo_new/) - Create new content for your site
|
* [hugo new](/commands/hugo_new/) - Create new content
|
||||||
|
|
||||||
|
|||||||
@@ -44,5 +44,5 @@ hugo new theme [name] [flags]
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
* [hugo new](/commands/hugo_new/) - Create new content for your site
|
* [hugo new](/commands/hugo_new/) - Create new content
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ url: /commands/hugo_server/
|
|||||||
---
|
---
|
||||||
## hugo server
|
## hugo server
|
||||||
|
|
||||||
A high performance webserver
|
Start the embedded web server
|
||||||
|
|
||||||
### Synopsis
|
### Synopsis
|
||||||
|
|
||||||
@@ -94,6 +94,6 @@ hugo server [command] [flags]
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
* [hugo](/commands/hugo/) - hugo builds your site
|
* [hugo](/commands/hugo/) - Build your site
|
||||||
* [hugo server trust](/commands/hugo_server_trust/) - Install the local CA in the system trust store.
|
* [hugo server trust](/commands/hugo_server_trust/) - Install the local CA in the system trust store.
|
||||||
|
|
||||||
|
|||||||
@@ -38,5 +38,5 @@ hugo server trust [flags] [args]
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
* [hugo server](/commands/hugo_server/) - A high performance webserver
|
* [hugo server](/commands/hugo_server/) - Start the embedded web server
|
||||||
|
|
||||||
|
|||||||
@@ -5,11 +5,11 @@ url: /commands/hugo_version/
|
|||||||
---
|
---
|
||||||
## hugo version
|
## hugo version
|
||||||
|
|
||||||
Print Hugo version and environment info
|
Display version
|
||||||
|
|
||||||
### Synopsis
|
### Synopsis
|
||||||
|
|
||||||
Print Hugo version and environment info. This is useful in Hugo bug reports.
|
Display version and environment info. This is useful in Hugo bug reports.
|
||||||
|
|
||||||
```
|
```
|
||||||
hugo version [flags] [args]
|
hugo version [flags] [args]
|
||||||
@@ -41,5 +41,5 @@ hugo version [flags] [args]
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
* [hugo](/commands/hugo/) - hugo builds your site
|
* [hugo](/commands/hugo/) - Build your site
|
||||||
|
|
||||||
|
|||||||
@@ -14,9 +14,9 @@ require (
|
|||||||
github.com/bep/godartsass/v2 v2.1.0
|
github.com/bep/godartsass/v2 v2.1.0
|
||||||
github.com/bep/golibsass v1.2.0
|
github.com/bep/golibsass v1.2.0
|
||||||
github.com/bep/gowebp v0.3.0
|
github.com/bep/gowebp v0.3.0
|
||||||
github.com/bep/helpers v0.4.0
|
github.com/bep/helpers v0.5.0
|
||||||
github.com/bep/imagemeta v0.8.1
|
github.com/bep/imagemeta v0.8.1
|
||||||
github.com/bep/lazycache v0.4.0
|
github.com/bep/lazycache v0.7.0
|
||||||
github.com/bep/logg v0.4.0
|
github.com/bep/logg v0.4.0
|
||||||
github.com/bep/mclib v1.20400.20402
|
github.com/bep/mclib v1.20400.20402
|
||||||
github.com/bep/overlayfs v0.9.2
|
github.com/bep/overlayfs v0.9.2
|
||||||
@@ -27,14 +27,14 @@ require (
|
|||||||
github.com/cli/safeexec v1.0.1
|
github.com/cli/safeexec v1.0.1
|
||||||
github.com/disintegration/gift v1.2.1
|
github.com/disintegration/gift v1.2.1
|
||||||
github.com/dustin/go-humanize v1.0.1
|
github.com/dustin/go-humanize v1.0.1
|
||||||
github.com/evanw/esbuild v0.23.1
|
github.com/evanw/esbuild v0.24.0
|
||||||
github.com/fatih/color v1.17.0
|
github.com/fatih/color v1.17.0
|
||||||
github.com/fortytw2/leaktest v1.3.0
|
github.com/fortytw2/leaktest v1.3.0
|
||||||
github.com/frankban/quicktest v1.14.6
|
github.com/frankban/quicktest v1.14.6
|
||||||
github.com/fsnotify/fsnotify v1.7.0
|
github.com/fsnotify/fsnotify v1.7.0
|
||||||
github.com/getkin/kin-openapi v0.123.0
|
github.com/getkin/kin-openapi v0.123.0
|
||||||
github.com/ghodss/yaml v1.0.0
|
github.com/ghodss/yaml v1.0.0
|
||||||
github.com/gobuffalo/flect v1.0.2
|
github.com/gobuffalo/flect v1.0.3
|
||||||
github.com/gobwas/glob v0.2.3
|
github.com/gobwas/glob v0.2.3
|
||||||
github.com/gohugoio/go-i18n/v2 v2.1.3-0.20230805085216-e63c13218d0e
|
github.com/gohugoio/go-i18n/v2 v2.1.3-0.20230805085216-e63c13218d0e
|
||||||
github.com/gohugoio/hashstructure v0.1.0
|
github.com/gohugoio/hashstructure v0.1.0
|
||||||
@@ -46,7 +46,7 @@ require (
|
|||||||
github.com/gohugoio/testmodBuilder/mods v0.0.0-20190520184928-c56af20f2e95
|
github.com/gohugoio/testmodBuilder/mods v0.0.0-20190520184928-c56af20f2e95
|
||||||
github.com/google/go-cmp v0.6.0
|
github.com/google/go-cmp v0.6.0
|
||||||
github.com/gorilla/websocket v1.5.3
|
github.com/gorilla/websocket v1.5.3
|
||||||
github.com/hairyhenderson/go-codeowners v0.5.0
|
github.com/hairyhenderson/go-codeowners v0.6.0
|
||||||
github.com/jdkato/prose v1.2.1
|
github.com/jdkato/prose v1.2.1
|
||||||
github.com/kylelemons/godebug v1.1.0
|
github.com/kylelemons/godebug v1.1.0
|
||||||
github.com/kyokomi/emoji/v2 v2.2.13
|
github.com/kyokomi/emoji/v2 v2.2.13
|
||||||
@@ -60,7 +60,7 @@ require (
|
|||||||
github.com/olekukonko/tablewriter v0.0.5
|
github.com/olekukonko/tablewriter v0.0.5
|
||||||
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58
|
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58
|
||||||
github.com/pelletier/go-toml/v2 v2.2.3
|
github.com/pelletier/go-toml/v2 v2.2.3
|
||||||
github.com/rogpeppe/go-internal v1.12.0
|
github.com/rogpeppe/go-internal v1.13.1
|
||||||
github.com/sanity-io/litter v1.5.5
|
github.com/sanity-io/litter v1.5.5
|
||||||
github.com/spf13/afero v1.11.0
|
github.com/spf13/afero v1.11.0
|
||||||
github.com/spf13/cast v1.7.0
|
github.com/spf13/cast v1.7.0
|
||||||
@@ -69,18 +69,18 @@ require (
|
|||||||
github.com/spf13/pflag v1.0.5
|
github.com/spf13/pflag v1.0.5
|
||||||
github.com/tdewolff/minify/v2 v2.20.37
|
github.com/tdewolff/minify/v2 v2.20.37
|
||||||
github.com/tdewolff/parse/v2 v2.7.15
|
github.com/tdewolff/parse/v2 v2.7.15
|
||||||
github.com/tetratelabs/wazero v1.8.0
|
github.com/tetratelabs/wazero v1.8.1
|
||||||
github.com/yuin/goldmark v1.7.4
|
github.com/yuin/goldmark v1.7.4
|
||||||
github.com/yuin/goldmark-emoji v1.0.3
|
github.com/yuin/goldmark-emoji v1.0.4
|
||||||
go.uber.org/automaxprocs v1.5.3
|
go.uber.org/automaxprocs v1.5.3
|
||||||
gocloud.dev v0.39.0
|
gocloud.dev v0.39.0
|
||||||
golang.org/x/exp v0.0.0-20221031165847-c99f073a8326
|
golang.org/x/exp v0.0.0-20221031165847-c99f073a8326
|
||||||
golang.org/x/image v0.19.0
|
golang.org/x/image v0.21.0
|
||||||
golang.org/x/mod v0.19.0
|
golang.org/x/mod v0.21.0
|
||||||
golang.org/x/net v0.28.0
|
golang.org/x/net v0.30.0
|
||||||
golang.org/x/sync v0.8.0
|
golang.org/x/sync v0.8.0
|
||||||
golang.org/x/text v0.17.0
|
golang.org/x/text v0.19.0
|
||||||
golang.org/x/tools v0.23.0
|
golang.org/x/tools v0.26.0
|
||||||
google.golang.org/api v0.191.0
|
google.golang.org/api v0.191.0
|
||||||
gopkg.in/yaml.v2 v2.4.0
|
gopkg.in/yaml.v2 v2.4.0
|
||||||
)
|
)
|
||||||
@@ -154,9 +154,9 @@ require (
|
|||||||
go.opentelemetry.io/otel v1.28.0 // indirect
|
go.opentelemetry.io/otel v1.28.0 // indirect
|
||||||
go.opentelemetry.io/otel/metric v1.28.0 // indirect
|
go.opentelemetry.io/otel/metric v1.28.0 // indirect
|
||||||
go.opentelemetry.io/otel/trace v1.28.0 // indirect
|
go.opentelemetry.io/otel/trace v1.28.0 // indirect
|
||||||
golang.org/x/crypto v0.26.0 // indirect
|
golang.org/x/crypto v0.28.0 // indirect
|
||||||
golang.org/x/oauth2 v0.22.0 // indirect
|
golang.org/x/oauth2 v0.22.0 // indirect
|
||||||
golang.org/x/sys v0.24.0 // indirect
|
golang.org/x/sys v0.26.0 // indirect
|
||||||
golang.org/x/time v0.6.0 // indirect
|
golang.org/x/time v0.6.0 // indirect
|
||||||
golang.org/x/xerrors v0.0.0-20240716161551-93cc26a95ae9 // indirect
|
golang.org/x/xerrors v0.0.0-20240716161551-93cc26a95ae9 // indirect
|
||||||
google.golang.org/genproto v0.0.0-20240812133136-8ffd90a71988 // indirect
|
google.golang.org/genproto v0.0.0-20240812133136-8ffd90a71988 // indirect
|
||||||
|
|||||||
@@ -133,18 +133,20 @@ github.com/bep/godartsass v1.2.0 h1:E2VvQrxAHAFwbjyOIExAMmogTItSKodoKuijNrGm5yU=
|
|||||||
github.com/bep/godartsass v1.2.0/go.mod h1:6LvK9RftsXMxGfsA0LDV12AGc4Jylnu6NgHL+Q5/pE8=
|
github.com/bep/godartsass v1.2.0/go.mod h1:6LvK9RftsXMxGfsA0LDV12AGc4Jylnu6NgHL+Q5/pE8=
|
||||||
github.com/bep/godartsass/v2 v2.1.0 h1:fq5Y1xYf4diu4tXABiekZUCA+5l/dmNjGKCeQwdy+s0=
|
github.com/bep/godartsass/v2 v2.1.0 h1:fq5Y1xYf4diu4tXABiekZUCA+5l/dmNjGKCeQwdy+s0=
|
||||||
github.com/bep/godartsass/v2 v2.1.0/go.mod h1:AcP8QgC+OwOXEq6im0WgDRYK7scDsmZCEW62o1prQLo=
|
github.com/bep/godartsass/v2 v2.1.0/go.mod h1:AcP8QgC+OwOXEq6im0WgDRYK7scDsmZCEW62o1prQLo=
|
||||||
github.com/bep/golibsass v1.1.1 h1:xkaet75ygImMYjM+FnHIT3xJn7H0xBA9UxSOJjk8Khw=
|
|
||||||
github.com/bep/golibsass v1.1.1/go.mod h1:DL87K8Un/+pWUS75ggYv41bliGiolxzDKWJAq3eJ1MA=
|
|
||||||
github.com/bep/golibsass v1.2.0 h1:nyZUkKP/0psr8nT6GR2cnmt99xS93Ji82ZD9AgOK6VI=
|
github.com/bep/golibsass v1.2.0 h1:nyZUkKP/0psr8nT6GR2cnmt99xS93Ji82ZD9AgOK6VI=
|
||||||
github.com/bep/golibsass v1.2.0/go.mod h1:DL87K8Un/+pWUS75ggYv41bliGiolxzDKWJAq3eJ1MA=
|
github.com/bep/golibsass v1.2.0/go.mod h1:DL87K8Un/+pWUS75ggYv41bliGiolxzDKWJAq3eJ1MA=
|
||||||
github.com/bep/gowebp v0.3.0 h1:MhmMrcf88pUY7/PsEhMgEP0T6fDUnRTMpN8OclDrbrY=
|
github.com/bep/gowebp v0.3.0 h1:MhmMrcf88pUY7/PsEhMgEP0T6fDUnRTMpN8OclDrbrY=
|
||||||
github.com/bep/gowebp v0.3.0/go.mod h1:ZhFodwdiFp8ehGJpF4LdPl6unxZm9lLFjxD3z2h2AgI=
|
github.com/bep/gowebp v0.3.0/go.mod h1:ZhFodwdiFp8ehGJpF4LdPl6unxZm9lLFjxD3z2h2AgI=
|
||||||
github.com/bep/helpers v0.4.0 h1:ab9veaAiWY4ST48Oxp5usaqivDmYdB744fz+tcZ3Ifs=
|
github.com/bep/helpers v0.5.0 h1:rneezhnG7GzLFlsEWO/EnleaBRuluBDGFimalO6Y50o=
|
||||||
github.com/bep/helpers v0.4.0/go.mod h1:/QpHdmcPagDw7+RjkLFCvnlUc8lQ5kg4KDrEkb2Yyco=
|
github.com/bep/helpers v0.5.0/go.mod h1:dSqCzIvHbzsk5YOesp1M7sKAq5xUcvANsRoKdawxH4Q=
|
||||||
github.com/bep/imagemeta v0.8.1 h1:tjZLPRftjxU7PTI87o5e5WKOFQ4S9S0engiP1OTpJTI=
|
github.com/bep/imagemeta v0.8.1 h1:tjZLPRftjxU7PTI87o5e5WKOFQ4S9S0engiP1OTpJTI=
|
||||||
github.com/bep/imagemeta v0.8.1/go.mod h1:5piPAq5Qomh07m/dPPCLN3mDJyFusvUG7VwdRD/vX0s=
|
github.com/bep/imagemeta v0.8.1/go.mod h1:5piPAq5Qomh07m/dPPCLN3mDJyFusvUG7VwdRD/vX0s=
|
||||||
github.com/bep/lazycache v0.4.0 h1:X8yVyWNVupPd4e1jV7efi3zb7ZV/qcjKQgIQ5aPbkYI=
|
github.com/bep/lazycache v0.4.0 h1:X8yVyWNVupPd4e1jV7efi3zb7ZV/qcjKQgIQ5aPbkYI=
|
||||||
github.com/bep/lazycache v0.4.0/go.mod h1:NmRm7Dexh3pmR1EignYR8PjO2cWybFQ68+QgY3VMCSc=
|
github.com/bep/lazycache v0.4.0/go.mod h1:NmRm7Dexh3pmR1EignYR8PjO2cWybFQ68+QgY3VMCSc=
|
||||||
|
github.com/bep/lazycache v0.6.0 h1:0vCgFo7TBtMQpSx64jnH1sagmw0ZougIFRpsqPHTa5U=
|
||||||
|
github.com/bep/lazycache v0.6.0/go.mod h1:NmRm7Dexh3pmR1EignYR8PjO2cWybFQ68+QgY3VMCSc=
|
||||||
|
github.com/bep/lazycache v0.7.0 h1:VM257SkkjcR9z55eslXTkUIX8QMNKoqQRNKV/4xIkCY=
|
||||||
|
github.com/bep/lazycache v0.7.0/go.mod h1:NmRm7Dexh3pmR1EignYR8PjO2cWybFQ68+QgY3VMCSc=
|
||||||
github.com/bep/logg v0.4.0 h1:luAo5mO4ZkhA5M1iDVDqDqnBBnlHjmtZF6VAyTp+nCQ=
|
github.com/bep/logg v0.4.0 h1:luAo5mO4ZkhA5M1iDVDqDqnBBnlHjmtZF6VAyTp+nCQ=
|
||||||
github.com/bep/logg v0.4.0/go.mod h1:Ccp9yP3wbR1mm++Kpxet91hAZBEQgmWgFgnXX3GkIV0=
|
github.com/bep/logg v0.4.0/go.mod h1:Ccp9yP3wbR1mm++Kpxet91hAZBEQgmWgFgnXX3GkIV0=
|
||||||
github.com/bep/mclib v1.20400.20402 h1:olpCE2WSPpOAbFE1R4hnftSEmQ34+xzy2HRzd0m69rA=
|
github.com/bep/mclib v1.20400.20402 h1:olpCE2WSPpOAbFE1R4hnftSEmQ34+xzy2HRzd0m69rA=
|
||||||
@@ -191,8 +193,8 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m
|
|||||||
github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po=
|
github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po=
|
||||||
github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
|
github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
|
||||||
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
||||||
github.com/evanw/esbuild v0.23.1 h1:ociewhY6arjTarKLdrXfDTgy25oxhTZmzP8pfuBTfTA=
|
github.com/evanw/esbuild v0.24.0 h1:GZ78naTLp7FKr+K7eNuM/SLs5maeiHYRPsTg6kmdsSE=
|
||||||
github.com/evanw/esbuild v0.23.1/go.mod h1:D2vIQZqV/vIf/VRHtViaUtViZmG7o+kKmlBfVQuRi48=
|
github.com/evanw/esbuild v0.24.0/go.mod h1:D2vIQZqV/vIf/VRHtViaUtViZmG7o+kKmlBfVQuRi48=
|
||||||
github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4=
|
github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4=
|
||||||
github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI=
|
github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI=
|
||||||
github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
|
github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
|
||||||
@@ -225,8 +227,8 @@ github.com/go-openapi/swag v0.22.8 h1:/9RjDSQ0vbFR+NyjGMkFTsA1IA0fmhKSThmfGZjicb
|
|||||||
github.com/go-openapi/swag v0.22.8/go.mod h1:6QT22icPLEqAM/z/TChgb4WAveCHF92+2gF0CNjHpPI=
|
github.com/go-openapi/swag v0.22.8/go.mod h1:6QT22icPLEqAM/z/TChgb4WAveCHF92+2gF0CNjHpPI=
|
||||||
github.com/go-test/deep v1.0.8 h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM=
|
github.com/go-test/deep v1.0.8 h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM=
|
||||||
github.com/go-test/deep v1.0.8/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE=
|
github.com/go-test/deep v1.0.8/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE=
|
||||||
github.com/gobuffalo/flect v1.0.2 h1:eqjPGSo2WmjgY2XlpGwo2NXgL3RucAKo4k4qQMNA5sA=
|
github.com/gobuffalo/flect v1.0.3 h1:xeWBM2nui+qnVvNM4S3foBhCAL2XgPU+a7FdpelbTq4=
|
||||||
github.com/gobuffalo/flect v1.0.2/go.mod h1:A5msMlrHtLqh9umBSnvabjsMrCcCpAyzglnDvkbYKHs=
|
github.com/gobuffalo/flect v1.0.3/go.mod h1:A5msMlrHtLqh9umBSnvabjsMrCcCpAyzglnDvkbYKHs=
|
||||||
github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y=
|
github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y=
|
||||||
github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8=
|
github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8=
|
||||||
github.com/gohugoio/go-i18n/v2 v2.1.3-0.20230805085216-e63c13218d0e h1:QArsSubW7eDh8APMXkByjQWvuljwPGAGQpJEFn0F0wY=
|
github.com/gohugoio/go-i18n/v2 v2.1.3-0.20230805085216-e63c13218d0e h1:QArsSubW7eDh8APMXkByjQWvuljwPGAGQpJEFn0F0wY=
|
||||||
@@ -331,8 +333,8 @@ github.com/googleapis/gax-go/v2 v2.13.0/go.mod h1:Z/fvTZXF8/uw7Xu5GuslPw+bplx6SS
|
|||||||
github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g=
|
github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g=
|
||||||
github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg=
|
github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg=
|
||||||
github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||||
github.com/hairyhenderson/go-codeowners v0.5.0 h1:dpQB+hVHiRc2VVvc2BHxkuM+tmu9Qej/as3apqUbsWc=
|
github.com/hairyhenderson/go-codeowners v0.6.0 h1:cRCtmNf9Ni1GIeiAAlHX5IEEB2gr61813Kx5JmXxAAk=
|
||||||
github.com/hairyhenderson/go-codeowners v0.5.0/go.mod h1:R3uW1OQXEj2Gu6/OvZ7bt6hr0qdkLvUWPiqNaWnexpo=
|
github.com/hairyhenderson/go-codeowners v0.6.0/go.mod h1:RFWbGcjlXhRKNezt7AQHmJucY0alk4osN0+RKOsIAa8=
|
||||||
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||||
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||||
github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k=
|
github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k=
|
||||||
@@ -421,8 +423,8 @@ github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:
|
|||||||
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
||||||
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
|
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
|
||||||
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
|
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
|
||||||
github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8=
|
github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII=
|
||||||
github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4=
|
github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o=
|
||||||
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
|
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
|
||||||
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||||
github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd h1:CmH9+J6ZSsIjUK3dcGsnCnO41eRBOnY12zwkn5qVwgc=
|
github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd h1:CmH9+J6ZSsIjUK3dcGsnCnO41eRBOnY12zwkn5qVwgc=
|
||||||
@@ -461,8 +463,8 @@ github.com/tdewolff/parse/v2 v2.7.15/go.mod h1:3FbJWZp3XT9OWVN3Hmfp0p/a08v4h8J9W
|
|||||||
github.com/tdewolff/test v1.0.11-0.20231101010635-f1265d231d52/go.mod h1:6DAvZliBAAnD7rhVgwaM7DE5/d9NMOAJ09SqYqeK4QE=
|
github.com/tdewolff/test v1.0.11-0.20231101010635-f1265d231d52/go.mod h1:6DAvZliBAAnD7rhVgwaM7DE5/d9NMOAJ09SqYqeK4QE=
|
||||||
github.com/tdewolff/test v1.0.11-0.20240106005702-7de5f7df4739 h1:IkjBCtQOOjIn03u/dMQK9g+Iw9ewps4mCl1nB8Sscbo=
|
github.com/tdewolff/test v1.0.11-0.20240106005702-7de5f7df4739 h1:IkjBCtQOOjIn03u/dMQK9g+Iw9ewps4mCl1nB8Sscbo=
|
||||||
github.com/tdewolff/test v1.0.11-0.20240106005702-7de5f7df4739/go.mod h1:XPuWBzvdUzhCuxWO1ojpXsyzsA5bFoS3tO/Q3kFuTG8=
|
github.com/tdewolff/test v1.0.11-0.20240106005702-7de5f7df4739/go.mod h1:XPuWBzvdUzhCuxWO1ojpXsyzsA5bFoS3tO/Q3kFuTG8=
|
||||||
github.com/tetratelabs/wazero v1.8.0 h1:iEKu0d4c2Pd+QSRieYbnQC9yiFlMS9D+Jr0LsRmcF4g=
|
github.com/tetratelabs/wazero v1.8.1 h1:NrcgVbWfkWvVc4UtT4LRLDf91PsOzDzefMdwhLfA550=
|
||||||
github.com/tetratelabs/wazero v1.8.0/go.mod h1:yAI0XTsMBhREkM/YDAK/zNou3GoiAce1P6+rp/wQhjs=
|
github.com/tetratelabs/wazero v1.8.1/go.mod h1:yAI0XTsMBhREkM/YDAK/zNou3GoiAce1P6+rp/wQhjs=
|
||||||
github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0=
|
github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0=
|
||||||
github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY=
|
github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY=
|
||||||
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||||
@@ -474,8 +476,8 @@ github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5t
|
|||||||
github.com/yuin/goldmark v1.7.1/go.mod h1:uzxRWxtg69N339t3louHJ7+O03ezfj6PlliRlaOzY1E=
|
github.com/yuin/goldmark v1.7.1/go.mod h1:uzxRWxtg69N339t3louHJ7+O03ezfj6PlliRlaOzY1E=
|
||||||
github.com/yuin/goldmark v1.7.4 h1:BDXOHExt+A7gwPCJgPIIq7ENvceR7we7rOS9TNoLZeg=
|
github.com/yuin/goldmark v1.7.4 h1:BDXOHExt+A7gwPCJgPIIq7ENvceR7we7rOS9TNoLZeg=
|
||||||
github.com/yuin/goldmark v1.7.4/go.mod h1:uzxRWxtg69N339t3louHJ7+O03ezfj6PlliRlaOzY1E=
|
github.com/yuin/goldmark v1.7.4/go.mod h1:uzxRWxtg69N339t3louHJ7+O03ezfj6PlliRlaOzY1E=
|
||||||
github.com/yuin/goldmark-emoji v1.0.3 h1:aLRkLHOuBR2czCY4R8olwMjID+tENfhyFDMCRhbIQY4=
|
github.com/yuin/goldmark-emoji v1.0.4 h1:vCwMkPZSNefSUnOW2ZKRUjBSD5Ok3W78IXhGxxAEF90=
|
||||||
github.com/yuin/goldmark-emoji v1.0.3/go.mod h1:tTkZEbwu5wkPmgTcitqddVxY9osFZiavD+r4AzQrh1U=
|
github.com/yuin/goldmark-emoji v1.0.4/go.mod h1:tTkZEbwu5wkPmgTcitqddVxY9osFZiavD+r4AzQrh1U=
|
||||||
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
|
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
|
||||||
go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
|
go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
|
||||||
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
||||||
@@ -511,8 +513,8 @@ golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5y
|
|||||||
golang.org/x/crypto v0.0.0-20220331220935-ae2d96664a29/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
golang.org/x/crypto v0.0.0-20220331220935-ae2d96664a29/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||||
golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc=
|
golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc=
|
||||||
golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg=
|
golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg=
|
||||||
golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw=
|
golang.org/x/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw=
|
||||||
golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54=
|
golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U=
|
||||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||||
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||||
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
|
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
|
||||||
@@ -528,8 +530,8 @@ golang.org/x/exp v0.0.0-20221031165847-c99f073a8326/go.mod h1:CxIveKay+FTh1D0yPZ
|
|||||||
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
|
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
|
||||||
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
||||||
golang.org/x/image v0.0.0-20210220032944-ac19c3e999fb/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
golang.org/x/image v0.0.0-20210220032944-ac19c3e999fb/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
||||||
golang.org/x/image v0.19.0 h1:D9FX4QWkLfkeqaC62SonffIIuYdOk/UE2XKUBgRIBIQ=
|
golang.org/x/image v0.21.0 h1:c5qV36ajHpdj4Qi0GnE0jUc/yuo33OLFaa0d+crTD5s=
|
||||||
golang.org/x/image v0.19.0/go.mod h1:y0zrRqlQRWQ5PXaYCOMLTW2fpsxZ8Qh9I/ohnInJEys=
|
golang.org/x/image v0.21.0/go.mod h1:vUbsLavqK/W303ZroQQVKQ+Af3Yl6Uz1Ppu5J/cLz78=
|
||||||
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||||
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
|
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
|
||||||
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||||
@@ -556,8 +558,8 @@ golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91
|
|||||||
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||||
golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||||
golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
|
golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
|
||||||
golang.org/x/mod v0.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8=
|
golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0=
|
||||||
golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
|
golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY=
|
||||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
@@ -597,8 +599,8 @@ golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
|||||||
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
|
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
|
||||||
golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk=
|
golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk=
|
||||||
golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY=
|
golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY=
|
||||||
golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE=
|
golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4=
|
||||||
golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg=
|
golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU=
|
||||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||||
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||||
@@ -674,8 +676,8 @@ golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|||||||
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||||
golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg=
|
golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo=
|
||||||
golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||||
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
|
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
|
||||||
@@ -694,8 +696,8 @@ golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
|||||||
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
||||||
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
||||||
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
||||||
golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc=
|
golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM=
|
||||||
golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
|
golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
|
||||||
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||||
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||||
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||||
@@ -753,8 +755,8 @@ golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc
|
|||||||
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
|
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
|
||||||
golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58=
|
golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58=
|
||||||
golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps=
|
golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps=
|
||||||
golang.org/x/tools v0.23.0 h1:SGsXPZ+2l4JsgaCKkx+FQ9YZ5XEtA1GZYuoDjenLjvg=
|
golang.org/x/tools v0.26.0 h1:v/60pFQmzmT9ExmjDv2gGIfi3OqfKoEP6I5+umXlbnQ=
|
||||||
golang.org/x/tools v0.23.0/go.mod h1:pnu6ufv6vQkll6szChhK3C3L/ruaIv5eBeztNG8wtsI=
|
golang.org/x/tools v0.26.0/go.mod h1:TPVVj70c7JJ3WCazhD8OdXcZg/og+b9+tH/KxylGwH0=
|
||||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
|
|||||||
+8
-18
@@ -276,11 +276,13 @@ func TestLoadMultiConfig(t *testing.T) {
|
|||||||
// Add a random config variable for testing.
|
// Add a random config variable for testing.
|
||||||
// side = page in Norwegian.
|
// side = page in Norwegian.
|
||||||
configContentBase := `
|
configContentBase := `
|
||||||
Paginate = 32
|
[pagination]
|
||||||
PaginatePath = "side"
|
pagerSize = 32
|
||||||
|
path = "side"
|
||||||
`
|
`
|
||||||
configContentSub := `
|
configContentSub := `
|
||||||
PaginatePath = "top"
|
[pagination]
|
||||||
|
path = "top"
|
||||||
`
|
`
|
||||||
mm := afero.NewMemMapFs()
|
mm := afero.NewMemMapFs()
|
||||||
|
|
||||||
@@ -292,8 +294,8 @@ func TestLoadMultiConfig(t *testing.T) {
|
|||||||
c.Assert(err, qt.IsNil)
|
c.Assert(err, qt.IsNil)
|
||||||
cfg := all.Base
|
cfg := all.Base
|
||||||
|
|
||||||
c.Assert(cfg.PaginatePath, qt.Equals, "top")
|
c.Assert(cfg.Pagination.Path, qt.Equals, "top")
|
||||||
c.Assert(cfg.Paginate, qt.Equals, 32)
|
c.Assert(cfg.Pagination.PagerSize, qt.Equals, 32)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestLoadConfigFromThemes(t *testing.T) {
|
func TestLoadConfigFromThemes(t *testing.T) {
|
||||||
@@ -698,10 +700,6 @@ func TestHugoConfig(t *testing.T) {
|
|||||||
filesTemplate := `
|
filesTemplate := `
|
||||||
-- hugo.toml --
|
-- hugo.toml --
|
||||||
theme = "mytheme"
|
theme = "mytheme"
|
||||||
[social]
|
|
||||||
twitter = "bepsays"
|
|
||||||
[author]
|
|
||||||
name = "bep"
|
|
||||||
[params]
|
[params]
|
||||||
rootparam = "rootvalue"
|
rootparam = "rootvalue"
|
||||||
-- config/_default/hugo.toml --
|
-- config/_default/hugo.toml --
|
||||||
@@ -718,9 +716,6 @@ rootparam: {{ site.Params.rootparam }}
|
|||||||
rootconfigparam: {{ site.Params.rootconfigparam }}
|
rootconfigparam: {{ site.Params.rootconfigparam }}
|
||||||
themeparam: {{ site.Params.themeparam }}
|
themeparam: {{ site.Params.themeparam }}
|
||||||
themeconfigdirparam: {{ site.Params.themeconfigdirparam }}
|
themeconfigdirparam: {{ site.Params.themeconfigdirparam }}
|
||||||
social: {{ site.Social }}
|
|
||||||
author: {{ site.Author }}
|
|
||||||
|
|
||||||
|
|
||||||
`
|
`
|
||||||
|
|
||||||
@@ -744,8 +739,6 @@ author: {{ site.Author }}
|
|||||||
"rootconfigparam: rootconfigvalue",
|
"rootconfigparam: rootconfigvalue",
|
||||||
"themeparam: themevalue",
|
"themeparam: themevalue",
|
||||||
"themeconfigdirparam: themeconfigdirvalue",
|
"themeconfigdirparam: themeconfigdirvalue",
|
||||||
"social: map[twitter:bepsays]",
|
|
||||||
"author: map[name:bep]",
|
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -918,11 +911,9 @@ title: "My Swedish Section"
|
|||||||
-- layouts/index.html --
|
-- layouts/index.html --
|
||||||
LanguageCode: {{ eq site.LanguageCode site.Language.LanguageCode }}|{{ site.Language.LanguageCode }}|
|
LanguageCode: {{ eq site.LanguageCode site.Language.LanguageCode }}|{{ site.Language.LanguageCode }}|
|
||||||
{{ range $i, $e := (slice site .Site) }}
|
{{ range $i, $e := (slice site .Site) }}
|
||||||
{{ $i }}|AllPages: {{ len .AllPages }}|Sections: {{ if .Sections }}true{{ end }}| Author: {{ .Authors }}|BuildDrafts: {{ .BuildDrafts }}|IsMultilingual: {{ .IsMultiLingual }}|Param: {{ .Language.Params.myparam }}|Language string: {{ .Language }}|Languages: {{ .Languages }}
|
{{ $i }}|AllPages: {{ len .AllPages }}|Sections: {{ if .Sections }}true{{ end }}|BuildDrafts: {{ .BuildDrafts }}|Param: {{ .Language.Params.myparam }}|Language string: {{ .Language }}|Languages: {{ .Languages }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
`
|
`
|
||||||
b := NewIntegrationTestBuilder(
|
b := NewIntegrationTestBuilder(
|
||||||
IntegrationTestConfig{
|
IntegrationTestConfig{
|
||||||
@@ -940,7 +931,6 @@ AllPages: 4|
|
|||||||
Sections: true|
|
Sections: true|
|
||||||
Param: enParamValue
|
Param: enParamValue
|
||||||
Param: enParamValue
|
Param: enParamValue
|
||||||
IsMultilingual: true
|
|
||||||
LanguageCode: true|en-US|
|
LanguageCode: true|en-US|
|
||||||
`)
|
`)
|
||||||
|
|
||||||
|
|||||||
+22
-23
@@ -28,8 +28,8 @@ func TestContentMapSite(t *testing.T) {
|
|||||||
pageTempl := `
|
pageTempl := `
|
||||||
---
|
---
|
||||||
title: "Page %d"
|
title: "Page %d"
|
||||||
date: "2019-06-0%d"
|
date: "2019-06-%02d"
|
||||||
lastMod: "2019-06-0%d"
|
lastMod: "2019-06-%02d"
|
||||||
categories: [%q]
|
categories: [%q]
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -55,7 +55,6 @@ draft: true
|
|||||||
title: "Hugo Home"
|
title: "Hugo Home"
|
||||||
cascade:
|
cascade:
|
||||||
description: "Common Description"
|
description: "Common Description"
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
Home Content.
|
Home Content.
|
||||||
@@ -64,24 +63,24 @@ Home Content.
|
|||||||
b.WithContent("blog/page1.md", createPage(1))
|
b.WithContent("blog/page1.md", createPage(1))
|
||||||
b.WithContent("blog/page2.md", createPage(2))
|
b.WithContent("blog/page2.md", createPage(2))
|
||||||
b.WithContent("blog/page3.md", createPage(3))
|
b.WithContent("blog/page3.md", createPage(3))
|
||||||
b.WithContent("blog/bundle/index.md", createPage(12))
|
b.WithContent("blog/bundle/index.md", createPage(4))
|
||||||
b.WithContent("blog/bundle/data.json", "data")
|
b.WithContent("blog/bundle/data.json", "data")
|
||||||
b.WithContent("blog/bundle/page.md", createPage(99))
|
b.WithContent("blog/bundle/page.md", createPage(5))
|
||||||
b.WithContent("blog/subsection/_index.md", createPage(3))
|
b.WithContent("blog/subsection/_index.md", createPage(6))
|
||||||
b.WithContent("blog/subsection/subdata.json", "data")
|
b.WithContent("blog/subsection/subdata.json", "data")
|
||||||
b.WithContent("blog/subsection/page4.md", createPage(8))
|
b.WithContent("blog/subsection/page4.md", createPage(7))
|
||||||
b.WithContent("blog/subsection/page5.md", createPage(10))
|
b.WithContent("blog/subsection/page5.md", createPage(8))
|
||||||
b.WithContent("blog/subsection/draft/index.md", draftTemplate)
|
b.WithContent("blog/subsection/draft/index.md", draftTemplate)
|
||||||
b.WithContent("blog/subsection/draft/data.json", "data")
|
b.WithContent("blog/subsection/draft/data.json", "data")
|
||||||
b.WithContent("blog/draftsection/_index.md", draftTemplate)
|
b.WithContent("blog/draftsection/_index.md", draftTemplate)
|
||||||
b.WithContent("blog/draftsection/page/index.md", createPage(12))
|
b.WithContent("blog/draftsection/page/index.md", createPage(9))
|
||||||
b.WithContent("blog/draftsection/page/folder/data.json", "data")
|
b.WithContent("blog/draftsection/page/folder/data.json", "data")
|
||||||
b.WithContent("blog/draftsection/sub/_index.md", createPage(12))
|
b.WithContent("blog/draftsection/sub/_index.md", createPage(10))
|
||||||
b.WithContent("blog/draftsection/sub/page.md", createPage(13))
|
b.WithContent("blog/draftsection/sub/page.md", createPage(11))
|
||||||
b.WithContent("docs/page6.md", createPage(11))
|
b.WithContent("docs/page6.md", createPage(12))
|
||||||
b.WithContent("tags/_index.md", createPageInCategory(32, "sad"))
|
b.WithContent("tags/_index.md", createPageInCategory(13, "sad"))
|
||||||
b.WithContent("overlap/_index.md", createPageInCategory(33, "sad"))
|
b.WithContent("overlap/_index.md", createPageInCategory(14, "sad"))
|
||||||
b.WithContent("overlap2/_index.md", createPage(34))
|
b.WithContent("overlap2/_index.md", createPage(15))
|
||||||
|
|
||||||
b.WithTemplatesAdded("layouts/index.html", `
|
b.WithTemplatesAdded("layouts/index.html", `
|
||||||
Num Regular: {{ len .Site.RegularPages }}|{{ range .Site.RegularPages }}{{ .RelPermalink }}|{{ end }}$
|
Num Regular: {{ len .Site.RegularPages }}|{{ range .Site.RegularPages }}{{ .RelPermalink }}|{{ end }}$
|
||||||
@@ -118,7 +117,7 @@ Pages: {{ range $blog.Pages }}{{ .RelPermalink }}|{{ end }}
|
|||||||
Sections: {{ range $home.Sections }}{{ .RelPermalink }}|{{ end }}:END
|
Sections: {{ range $home.Sections }}{{ .RelPermalink }}|{{ end }}:END
|
||||||
Categories: {{ range .Site.Taxonomies.categories }}{{ .Page.RelPermalink }}; {{ .Page.Title }}; {{ .Count }}|{{ end }}:END
|
Categories: {{ range .Site.Taxonomies.categories }}{{ .Page.RelPermalink }}; {{ .Page.Title }}; {{ .Count }}|{{ end }}:END
|
||||||
Category Terms: {{ $categories.Kind}}: {{ range $categories.Data.Terms.Alphabetical }}{{ .Page.RelPermalink }}; {{ .Page.Title }}; {{ .Count }}|{{ end }}:END
|
Category Terms: {{ $categories.Kind}}: {{ range $categories.Data.Terms.Alphabetical }}{{ .Page.RelPermalink }}; {{ .Page.Title }}; {{ .Count }}|{{ end }}:END
|
||||||
Category Funny: {{ $funny.Kind}}; {{ $funny.Data.Term }}: {{ range $funny.Pages }}{{ .RelPermalink }};|{{ end }}:END
|
Category Funny: {{ $funny.Kind}}; {{ $funny.Data.Term }}: {{ range $funny.Pages }}{{ .RelPermalink }}|{{ end }}:END
|
||||||
Pag Num Pages: {{ len .Paginator.Pages }}
|
Pag Num Pages: {{ len .Paginator.Pages }}
|
||||||
Pag Blog Num Pages: {{ len $blog.Paginator.Pages }}
|
Pag Blog Num Pages: {{ len $blog.Paginator.Pages }}
|
||||||
Blog Num RegularPages: {{ len $blog.RegularPages }}|{{ range $blog.RegularPages }}P: {{ .RelPermalink }}|{{ end }}
|
Blog Num RegularPages: {{ len $blog.RegularPages }}|{{ range $blog.RegularPages }}P: {{ .RelPermalink }}|{{ end }}
|
||||||
@@ -142,11 +141,11 @@ Draft5: {{ if (.Site.GetPage "blog/draftsection/sub/page") }}FOUND{{ end }}|
|
|||||||
Main Sections: [blog]
|
Main Sections: [blog]
|
||||||
Pag Num Pages: 9
|
Pag Num Pages: 9
|
||||||
|
|
||||||
Home: Hugo Home|/|2019-06-08|Current Section: /|Resources:
|
Home: Hugo Home|/|2019-06-15|Current Section: /|Resources:
|
||||||
Blog Section: Blogs|/blog/|2019-06-08|Current Section: /blog|Resources:
|
Blog Section: Blogs|/blog/|2019-06-11|Current Section: /blog|Resources:
|
||||||
Blog Sub Section: Page 3|/blog/subsection/|2019-06-03|Current Section: /blog/subsection|Resources: application: /blog/subsection/subdata.json|
|
Blog Sub Section: Page 6|/blog/subsection/|2019-06-06|Current Section: /blog/subsection|Resources: application: /blog/subsection/subdata.json|
|
||||||
Page: Page 1|/blog/page1/|2019-06-01|Current Section: /blog|Resources:
|
Page: Page 1|/blog/page1/|2019-06-01|Current Section: /blog|Resources:
|
||||||
Bundle: Page 12|/blog/bundle/|0001-01-01|Current Section: /blog|Resources: application: /blog/bundle/data.json|page: |
|
Bundle: Page 4|/blog/bundle/|2019-06-04|Current Section: /blog|Resources: application: /blog/bundle/data.json|page: |
|
||||||
IsDescendant: true: true true: true true: true true: true true: true false: false false: false
|
IsDescendant: true: true true: true true: true true: true true: true false: false false: false
|
||||||
IsAncestor: true: true true: true true: true true: true true: true true: true false: false false: false false: false false: false
|
IsAncestor: true: true true: true true: true true: true true: true true: true false: false false: false false: false false: false
|
||||||
IsDescendant overlap1: false: false
|
IsDescendant overlap1: false: false
|
||||||
@@ -157,11 +156,11 @@ Draft5: {{ if (.Site.GetPage "blog/draftsection/sub/page") }}FOUND{{ end }}|
|
|||||||
InSection: true: true false: false
|
InSection: true: true false: false
|
||||||
Next: /blog/page3/
|
Next: /blog/page3/
|
||||||
NextInSection: /blog/page3/
|
NextInSection: /blog/page3/
|
||||||
Pages: /blog/page3/|/blog/subsection/|/blog/page2/|/blog/page1/|/blog/bundle/|
|
Pages: /blog/subsection/|/blog/bundle/|/blog/page3/|/blog/page2/|/blog/page1/|
|
||||||
Sections: /blog/|/docs/|/overlap/|/overlap2/|:END
|
Sections: /overlap2/|/overlap/|/docs/|/blog/|:END
|
||||||
Categories: /categories/funny/; Funny; 12|/categories/sad/; Sad; 2|:END
|
Categories: /categories/funny/; Funny; 12|/categories/sad/; Sad; 2|:END
|
||||||
Category Terms: taxonomy: /categories/funny/; Funny; 12|/categories/sad/; Sad; 2|:END
|
Category Terms: taxonomy: /categories/funny/; Funny; 12|/categories/sad/; Sad; 2|:END
|
||||||
Category Funny: term; funny: /blog/subsection/page4/;|/blog/page3/;|/blog/subsection/;|/blog/page2/;|/blog/page1/;|/blog/subsection/page5/;|/docs/page6/;|/blog/bundle/;|/blog/draftsection/page/;|/blog/draftsection/sub/;|/blog/draftsection/sub/page/;|/overlap2/;|:END
|
Category Funny: term; funny: /overlap2/|/docs/page6/|/blog/draftsection/sub/page/|/blog/draftsection/sub/|/blog/draftsection/page/|/blog/subsection/page5/|/blog/subsection/page4/|/blog/subsection/|/blog/bundle/|/blog/page3/|/blog/page2/|/blog/page1/|:END
|
||||||
Pag Num Pages: 9
|
Pag Num Pages: 9
|
||||||
Pag Blog Num Pages: 4
|
Pag Blog Num Pages: 4
|
||||||
Blog Num RegularPages: 4
|
Blog Num RegularPages: 4
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ func TestEmbeddedPaginationTemplate(t *testing.T) {
|
|||||||
|
|
||||||
test := func(variant string, expectedOutput string) {
|
test := func(variant string, expectedOutput string) {
|
||||||
b := newTestSitesBuilder(t)
|
b := newTestSitesBuilder(t)
|
||||||
b.WithConfigFile("toml", `paginate = 1`)
|
b.WithConfigFile("toml", `pagination.pagerSize = 1`)
|
||||||
b.WithContent(
|
b.WithContent(
|
||||||
"s1/p01.md", "---\ntitle: p01\n---",
|
"s1/p01.md", "---\ntitle: p01\n---",
|
||||||
"s1/p02.md", "---\ntitle: p02\n---",
|
"s1/p02.md", "---\ntitle: p02\n---",
|
||||||
|
|||||||
@@ -179,9 +179,6 @@ type hugoSitesInit struct {
|
|||||||
// Loads the data from all of the /data folders.
|
// Loads the data from all of the /data folders.
|
||||||
data *lazy.Init
|
data *lazy.Init
|
||||||
|
|
||||||
// Performs late initialization (before render) of the templates.
|
|
||||||
layouts *lazy.Init
|
|
||||||
|
|
||||||
// Loads the Git info and CODEOWNERS for all the pages if enabled.
|
// Loads the Git info and CODEOWNERS for all the pages if enabled.
|
||||||
gitInfo *lazy.Init
|
gitInfo *lazy.Init
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -250,10 +250,6 @@ func (h *HugoSites) process(ctx context.Context, l logg.LevelLogger, config *Bui
|
|||||||
l = l.WithField("step", "process")
|
l = l.WithField("step", "process")
|
||||||
defer loggers.TimeTrackf(l, time.Now(), nil, "")
|
defer loggers.TimeTrackf(l, time.Now(), nil, "")
|
||||||
|
|
||||||
if _, err := h.init.layouts.Do(ctx); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(events) > 0 {
|
if len(events) > 0 {
|
||||||
// This is a rebuild triggered from file events.
|
// This is a rebuild triggered from file events.
|
||||||
return h.processPartialFileEvents(ctx, l, config, init, events)
|
return h.processPartialFileEvents(ctx, l, config, init, events)
|
||||||
@@ -1067,8 +1063,6 @@ func (h *HugoSites) processPartialFileEvents(ctx context.Context, l logg.LevelLo
|
|||||||
}
|
}
|
||||||
|
|
||||||
if tmplChanged || i18nChanged {
|
if tmplChanged || i18nChanged {
|
||||||
// TODO(bep) we should split this, but currently the loading of i18n and layout files are tied together. See #12048.
|
|
||||||
h.init.layouts.Reset()
|
|
||||||
if err := loggers.TimeTrackfn(func() (logg.LevelLogger, error) {
|
if err := loggers.TimeTrackfn(func() (logg.LevelLogger, error) {
|
||||||
// TODO(bep) this could probably be optimized to somehow
|
// TODO(bep) this could probably be optimized to somehow
|
||||||
// only load the changed templates and its dependencies, but that is non-trivial.
|
// only load the changed templates and its dependencies, but that is non-trivial.
|
||||||
@@ -1141,10 +1135,6 @@ func (s *Site) handleContentAdapterChanges(bi pagesfromdata.BuildInfo, buildConf
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (h *HugoSites) processContentAdaptersOnRebuild(ctx context.Context, buildConfig *BuildCfg) error {
|
func (h *HugoSites) processContentAdaptersOnRebuild(ctx context.Context, buildConfig *BuildCfg) error {
|
||||||
// Make sure the layouts are initialized.
|
|
||||||
if _, err := h.init.layouts.Do(context.Background()); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
g := rungroup.Run[*pagesfromdata.PagesFromTemplate](ctx, rungroup.Config[*pagesfromdata.PagesFromTemplate]{
|
g := rungroup.Run[*pagesfromdata.PagesFromTemplate](ctx, rungroup.Config[*pagesfromdata.PagesFromTemplate]{
|
||||||
NumWorkers: h.numWorkers,
|
NumWorkers: h.numWorkers,
|
||||||
Handle: func(ctx context.Context, p *pagesfromdata.PagesFromTemplate) error {
|
Handle: func(ctx context.Context, p *pagesfromdata.PagesFromTemplate) error {
|
||||||
|
|||||||
@@ -11,12 +11,14 @@ func TestMultihost(t *testing.T) {
|
|||||||
|
|
||||||
files := `
|
files := `
|
||||||
-- hugo.toml --
|
-- hugo.toml --
|
||||||
paginate = 1
|
|
||||||
defaultContentLanguage = "fr"
|
defaultContentLanguage = "fr"
|
||||||
defaultContentLanguageInSubdir = false
|
defaultContentLanguageInSubdir = false
|
||||||
staticDir = ["s1", "s2"]
|
staticDir = ["s1", "s2"]
|
||||||
enableRobotsTXT = true
|
enableRobotsTXT = true
|
||||||
|
|
||||||
|
[pagination]
|
||||||
|
pagerSize = 1
|
||||||
|
|
||||||
[permalinks]
|
[permalinks]
|
||||||
other = "/somewhere/else/:filename"
|
other = "/somewhere/else/:filename"
|
||||||
|
|
||||||
|
|||||||
@@ -107,10 +107,13 @@ func TestSmoke(t *testing.T) {
|
|||||||
baseURL = "https://example.com"
|
baseURL = "https://example.com"
|
||||||
title = "Smoke Site"
|
title = "Smoke Site"
|
||||||
rssLimit = 3
|
rssLimit = 3
|
||||||
paginate = 1
|
|
||||||
defaultContentLanguage = "en"
|
defaultContentLanguage = "en"
|
||||||
defaultContentLanguageInSubdir = true
|
defaultContentLanguageInSubdir = true
|
||||||
enableRobotsTXT = true
|
enableRobotsTXT = true
|
||||||
|
|
||||||
|
[pagination]
|
||||||
|
pagerSize = 1
|
||||||
|
|
||||||
[taxonomies]
|
[taxonomies]
|
||||||
category = 'categories'
|
category = 'categories'
|
||||||
tag = 'tags'
|
tag = 'tags'
|
||||||
@@ -434,10 +437,10 @@ func TestDataRace(t *testing.T) {
|
|||||||
---
|
---
|
||||||
title: "The Page"
|
title: "The Page"
|
||||||
outputs: ["HTML", "JSON"]
|
outputs: ["HTML", "JSON"]
|
||||||
---
|
---
|
||||||
|
|
||||||
The content.
|
The content.
|
||||||
|
|
||||||
|
|
||||||
`
|
`
|
||||||
|
|
||||||
@@ -450,10 +453,10 @@ The content.
|
|||||||
---
|
---
|
||||||
title: "The Home"
|
title: "The Home"
|
||||||
outputs: ["HTML", "JSON", "CSV", "RSS"]
|
outputs: ["HTML", "JSON", "CSV", "RSS"]
|
||||||
---
|
---
|
||||||
|
|
||||||
The content.
|
The content.
|
||||||
|
|
||||||
|
|
||||||
`)
|
`)
|
||||||
|
|
||||||
|
|||||||
@@ -246,11 +246,6 @@ func (s *IntegrationTestBuilder) AssertBuildCountGitInfo(count int) {
|
|||||||
s.Assert(s.H.init.gitInfo.InitCount(), qt.Equals, count)
|
s.Assert(s.H.init.gitInfo.InitCount(), qt.Equals, count)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *IntegrationTestBuilder) AssertBuildCountLayouts(count int) {
|
|
||||||
s.Helper()
|
|
||||||
s.Assert(s.H.init.layouts.InitCount(), qt.Equals, count)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *IntegrationTestBuilder) AssertFileCount(dirname string, expected int) {
|
func (s *IntegrationTestBuilder) AssertFileCount(dirname string, expected int) {
|
||||||
s.Helper()
|
s.Helper()
|
||||||
fs := s.fs.WorkingDirReadOnly
|
fs := s.fs.WorkingDirReadOnly
|
||||||
@@ -421,6 +416,12 @@ func (s *IntegrationTestBuilder) Build() *IntegrationTestBuilder {
|
|||||||
s.Assert(err, qt.IsNil)
|
s.Assert(err, qt.IsNil)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
s.Cleanup(func() {
|
||||||
|
if h := s.H; h != nil {
|
||||||
|
s.Assert(h.Close(), qt.IsNil)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -425,6 +425,7 @@ func (p *pageState) setMetaPostParams() error {
|
|||||||
ModTime: mtime,
|
ModTime: mtime,
|
||||||
GitAuthorDate: gitAuthorDate,
|
GitAuthorDate: gitAuthorDate,
|
||||||
Location: langs.GetLocation(pm.s.Language()),
|
Location: langs.GetLocation(pm.s.Language()),
|
||||||
|
PathOrTitle: p.pathOrTitle(),
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle the date separately
|
// Handle the date separately
|
||||||
|
|||||||
@@ -34,6 +34,15 @@ import (
|
|||||||
var pageIDCounter atomic.Uint64
|
var pageIDCounter atomic.Uint64
|
||||||
|
|
||||||
func (h *HugoSites) newPage(m *pageMeta) (*pageState, *paths.Path, error) {
|
func (h *HugoSites) newPage(m *pageMeta) (*pageState, *paths.Path, error) {
|
||||||
|
p, pth, err := h.doNewPage(m)
|
||||||
|
if err != nil {
|
||||||
|
// Make sure that any partially created page part is marked as stale.
|
||||||
|
m.MarkStale()
|
||||||
|
}
|
||||||
|
return p, pth, err
|
||||||
|
}
|
||||||
|
|
||||||
|
func (h *HugoSites) doNewPage(m *pageMeta) (*pageState, *paths.Path, error) {
|
||||||
m.Staler = &resources.AtomicStaler{}
|
m.Staler = &resources.AtomicStaler{}
|
||||||
if m.pageMetaParams == nil {
|
if m.pageMetaParams == nil {
|
||||||
m.pageMetaParams = &pageMetaParams{
|
m.pageMetaParams = &pageMetaParams{
|
||||||
@@ -231,10 +240,6 @@ func (h *HugoSites) newPage(m *pageMeta) (*pageState, *paths.Path, error) {
|
|||||||
}
|
}
|
||||||
return ps, nil
|
return ps, nil
|
||||||
}()
|
}()
|
||||||
// Make sure to evict any cached and now stale data.
|
|
||||||
if err != nil {
|
|
||||||
m.MarkStale()
|
|
||||||
}
|
|
||||||
|
|
||||||
if ps == nil {
|
if ps == nil {
|
||||||
return nil, nil, err
|
return nil, nil, err
|
||||||
|
|||||||
@@ -24,8 +24,10 @@ import (
|
|||||||
func TestPaginator(t *testing.T) {
|
func TestPaginator(t *testing.T) {
|
||||||
configFile := `
|
configFile := `
|
||||||
baseURL = "https://example.com/foo/"
|
baseURL = "https://example.com/foo/"
|
||||||
paginate = 3
|
|
||||||
paginatepath = "thepage"
|
[pagination]
|
||||||
|
pagerSize = 3
|
||||||
|
path = "thepage"
|
||||||
|
|
||||||
[languages.en]
|
[languages.en]
|
||||||
weight = 1
|
weight = 1
|
||||||
@@ -161,10 +163,11 @@ Len Pag: {{ len $pag.Pages }}
|
|||||||
func TestPaginatorNodePagesOnly(t *testing.T) {
|
func TestPaginatorNodePagesOnly(t *testing.T) {
|
||||||
files := `
|
files := `
|
||||||
-- hugo.toml --
|
-- hugo.toml --
|
||||||
paginate = 1
|
[pagination]
|
||||||
|
pagerSize = 1
|
||||||
-- content/p1.md --
|
-- content/p1.md --
|
||||||
-- layouts/_default/single.html --
|
-- layouts/_default/single.html --
|
||||||
Paginator: {{ .Paginator }}
|
Paginator: {{ .Paginator }}
|
||||||
`
|
`
|
||||||
b, err := TestE(t, files)
|
b, err := TestE(t, files)
|
||||||
b.Assert(err, qt.IsNotNil)
|
b.Assert(err, qt.IsNotNil)
|
||||||
|
|||||||
@@ -559,7 +559,8 @@ baseURL = "https://example.com"
|
|||||||
disableKinds = ["term", "taxonomy"]
|
disableKinds = ["term", "taxonomy"]
|
||||||
disableLiveReload = true
|
disableLiveReload = true
|
||||||
defaultContentLanguage = "nn"
|
defaultContentLanguage = "nn"
|
||||||
paginate = 20
|
[pagination]
|
||||||
|
pagerSize = 20
|
||||||
[security]
|
[security]
|
||||||
enableInlineShortcodes = true
|
enableInlineShortcodes = true
|
||||||
[languages]
|
[languages]
|
||||||
@@ -1431,7 +1432,7 @@ title: "My Sect"
|
|||||||
---
|
---
|
||||||
title: "P%d"
|
title: "P%d"
|
||||||
---
|
---
|
||||||
P%d Content.
|
P%d Content.
|
||||||
`
|
`
|
||||||
|
|
||||||
for i := 0; i < count; i++ {
|
for i := 0; i < count; i++ {
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ func TestSecurityPolicies(t *testing.T) {
|
|||||||
c.Skip()
|
c.Skip()
|
||||||
}
|
}
|
||||||
cb := func(b *sitesBuilder) {
|
cb := func(b *sitesBuilder) {
|
||||||
b.WithTemplatesAdded("index.html", `{{ $scss := "body { color: #333; }" | resources.FromString "foo.scss" | resources.ToCSS (dict "transpiler" "dartsass") }}`)
|
b.WithTemplatesAdded("index.html", `{{ $scss := "body { color: #333; }" | resources.FromString "foo.scss" | css.Sass (dict "transpiler" "dartsass") }}`)
|
||||||
}
|
}
|
||||||
testVariant(c, cb, "")
|
testVariant(c, cb, "")
|
||||||
})
|
})
|
||||||
@@ -137,10 +137,10 @@ func TestSecurityPolicies(t *testing.T) {
|
|||||||
b.WithConfigFile("toml", `
|
b.WithConfigFile("toml", `
|
||||||
[security]
|
[security]
|
||||||
[security.exec]
|
[security.exec]
|
||||||
allow="none"
|
allow="none"
|
||||||
|
|
||||||
`)
|
`)
|
||||||
b.WithTemplatesAdded("index.html", `{{ $scss := "body { color: #333; }" | resources.FromString "foo.scss" | resources.ToCSS (dict "transpiler" "dartsass") }}`)
|
b.WithTemplatesAdded("index.html", `{{ $scss := "body { color: #333; }" | resources.FromString "foo.scss" | css.Sass (dict "transpiler" "dartsass") }}`)
|
||||||
}
|
}
|
||||||
testVariant(c, cb, `(?s).*sass(-embedded)?" is not whitelisted in policy "security\.exec\.allow".*`)
|
testVariant(c, cb, `(?s).*sass(-embedded)?" is not whitelisted in policy "security\.exec\.allow".*`)
|
||||||
})
|
})
|
||||||
@@ -160,7 +160,7 @@ allow="none"
|
|||||||
httpTestVariant(c, `{{ $json := resources.GetRemote "%[1]s/fruits.json" }}{{ $json.Content }}`, `(?s).*is not whitelisted in policy "security\.http\.urls".*`,
|
httpTestVariant(c, `{{ $json := resources.GetRemote "%[1]s/fruits.json" }}{{ $json.Content }}`, `(?s).*is not whitelisted in policy "security\.http\.urls".*`,
|
||||||
func(b *sitesBuilder) {
|
func(b *sitesBuilder) {
|
||||||
b.WithConfigFile("toml", `
|
b.WithConfigFile("toml", `
|
||||||
[security]
|
[security]
|
||||||
[security.http]
|
[security.http]
|
||||||
urls="none"
|
urls="none"
|
||||||
`)
|
`)
|
||||||
@@ -181,7 +181,7 @@ urls="none"
|
|||||||
httpTestVariant(c, `{{ $json := resources.GetRemote "%[1]s/fakejson.json" }}{{ $json.Content }}`, ``,
|
httpTestVariant(c, `{{ $json := resources.GetRemote "%[1]s/fakejson.json" }}{{ $json.Content }}`, ``,
|
||||||
func(b *sitesBuilder) {
|
func(b *sitesBuilder) {
|
||||||
b.WithConfigFile("toml", `
|
b.WithConfigFile("toml", `
|
||||||
[security]
|
[security]
|
||||||
[security.http]
|
[security.http]
|
||||||
mediaTypes=["application/json"]
|
mediaTypes=["application/json"]
|
||||||
|
|
||||||
|
|||||||
@@ -126,10 +126,11 @@ func TestShortcodeMultipleOutputFormats(t *testing.T) {
|
|||||||
siteConfig := `
|
siteConfig := `
|
||||||
baseURL = "http://example.com/blog"
|
baseURL = "http://example.com/blog"
|
||||||
|
|
||||||
paginate = 1
|
|
||||||
|
|
||||||
disableKinds = ["section", "term", "taxonomy", "RSS", "sitemap", "robotsTXT", "404"]
|
disableKinds = ["section", "term", "taxonomy", "RSS", "sitemap", "robotsTXT", "404"]
|
||||||
|
|
||||||
|
[pagination]
|
||||||
|
pagerSize = 1
|
||||||
|
|
||||||
[outputs]
|
[outputs]
|
||||||
home = [ "HTML", "AMP", "Calendar" ]
|
home = [ "HTML", "AMP", "Calendar" ]
|
||||||
page = [ "HTML", "AMP", "JSON" ]
|
page = [ "HTML", "AMP", "JSON" ]
|
||||||
|
|||||||
+3
-13
@@ -344,7 +344,6 @@ func newHugoSites(cfg deps.DepsCfg, d *deps.Deps, pageTrees *pageTrees, sites []
|
|||||||
skipRebuildForFilenames: make(map[string]bool),
|
skipRebuildForFilenames: make(map[string]bool),
|
||||||
init: &hugoSitesInit{
|
init: &hugoSitesInit{
|
||||||
data: lazy.New(),
|
data: lazy.New(),
|
||||||
layouts: lazy.New(),
|
|
||||||
gitInfo: lazy.New(),
|
gitInfo: lazy.New(),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@@ -400,15 +399,6 @@ func newHugoSites(cfg deps.DepsCfg, d *deps.Deps, pageTrees *pageTrees, sites []
|
|||||||
return nil, nil
|
return nil, nil
|
||||||
})
|
})
|
||||||
|
|
||||||
h.init.layouts.Add(func(context.Context) (any, error) {
|
|
||||||
for _, s := range h.Sites {
|
|
||||||
if err := s.Tmpl().(tpl.TemplateManager).MarkReady(); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return nil, nil
|
|
||||||
})
|
|
||||||
|
|
||||||
h.init.gitInfo.Add(func(context.Context) (any, error) {
|
h.init.gitInfo.Add(func(context.Context) (any, error) {
|
||||||
err := h.loadGitInfo()
|
err := h.loadGitInfo()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -511,20 +501,20 @@ func (s *Site) Params() maps.Params {
|
|||||||
// Deprecated: Use taxonomies instead.
|
// Deprecated: Use taxonomies instead.
|
||||||
func (s *Site) Author() map[string]any {
|
func (s *Site) Author() map[string]any {
|
||||||
if len(s.conf.Author) != 0 {
|
if len(s.conf.Author) != 0 {
|
||||||
hugo.Deprecate(".Site.Author", "Use taxonomies instead.", "v0.124.0")
|
hugo.Deprecate(".Site.Author", "Implement taxonomy 'author' or use .Site.Params.Author instead.", "v0.124.0")
|
||||||
}
|
}
|
||||||
return s.conf.Author
|
return s.conf.Author
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deprecated: Use taxonomies instead.
|
// Deprecated: Use taxonomies instead.
|
||||||
func (s *Site) Authors() page.AuthorList {
|
func (s *Site) Authors() page.AuthorList {
|
||||||
hugo.Deprecate(".Site.Authors", "Use taxonomies instead.", "v0.124.0")
|
hugo.Deprecate(".Site.Authors", "Implement taxonomy 'authors' or use .Site.Params.Author instead.", "v0.124.0")
|
||||||
return page.AuthorList{}
|
return page.AuthorList{}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deprecated: Use .Site.Params instead.
|
// Deprecated: Use .Site.Params instead.
|
||||||
func (s *Site) Social() map[string]string {
|
func (s *Site) Social() map[string]string {
|
||||||
hugo.Deprecate(".Site.Social", "Use .Site.Params instead.", "v0.124.0")
|
hugo.Deprecate(".Site.Social", "Implement taxonomy 'social' or use .Site.Params.Social instead.", "v0.124.0")
|
||||||
return s.conf.Social
|
return s.conf.Social
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ package hugolib
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"html/template"
|
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
@@ -45,11 +44,13 @@ func doTestSiteWithPageOutputs(t *testing.T, outputs []string) {
|
|||||||
siteConfig := `
|
siteConfig := `
|
||||||
baseURL = "http://example.com/blog"
|
baseURL = "http://example.com/blog"
|
||||||
|
|
||||||
paginate = 1
|
|
||||||
defaultContentLanguage = "en"
|
defaultContentLanguage = "en"
|
||||||
|
|
||||||
disableKinds = ["section", "term", "taxonomy", "RSS", "sitemap", "robotsTXT", "404"]
|
disableKinds = ["section", "term", "taxonomy", "RSS", "sitemap", "robotsTXT", "404"]
|
||||||
|
|
||||||
|
[pagination]
|
||||||
|
pagerSize = 1
|
||||||
|
|
||||||
[Taxonomies]
|
[Taxonomies]
|
||||||
tag = "tags"
|
tag = "tags"
|
||||||
category = "categories"
|
category = "categories"
|
||||||
@@ -221,11 +222,13 @@ func TestRedefineRSSOutputFormat(t *testing.T) {
|
|||||||
siteConfig := `
|
siteConfig := `
|
||||||
baseURL = "http://example.com/blog"
|
baseURL = "http://example.com/blog"
|
||||||
|
|
||||||
paginate = 1
|
|
||||||
defaultContentLanguage = "en"
|
defaultContentLanguage = "en"
|
||||||
|
|
||||||
disableKinds = ["page", "section", "term", "taxonomy", "sitemap", "robotsTXT", "404"]
|
disableKinds = ["page", "section", "term", "taxonomy", "sitemap", "robotsTXT", "404"]
|
||||||
|
|
||||||
|
[pagination]
|
||||||
|
pagerSize = 1
|
||||||
|
|
||||||
[outputFormats]
|
[outputFormats]
|
||||||
[outputFormats.RSS]
|
[outputFormats.RSS]
|
||||||
mediatype = "application/rss"
|
mediatype = "application/rss"
|
||||||
@@ -249,7 +252,7 @@ baseName = "feed"
|
|||||||
s := h.Sites[0]
|
s := h.Sites[0]
|
||||||
|
|
||||||
// Issue #3450
|
// Issue #3450
|
||||||
c.Assert(s.RSSLink(), qt.Equals, template.URL("http://example.com/blog/feed.xml"))
|
c.Assert(s.Home().OutputFormats().Get("rss").Permalink(), qt.Equals, "http://example.com/blog/feed.xml")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Issue #3614
|
// Issue #3614
|
||||||
@@ -257,11 +260,13 @@ func TestDotLessOutputFormat(t *testing.T) {
|
|||||||
siteConfig := `
|
siteConfig := `
|
||||||
baseURL = "http://example.com/blog"
|
baseURL = "http://example.com/blog"
|
||||||
|
|
||||||
paginate = 1
|
|
||||||
defaultContentLanguage = "en"
|
defaultContentLanguage = "en"
|
||||||
|
|
||||||
disableKinds = ["page", "section", "term", "taxonomy", "sitemap", "robotsTXT", "404"]
|
disableKinds = ["page", "section", "term", "taxonomy", "sitemap", "robotsTXT", "404"]
|
||||||
|
|
||||||
|
[pagination]
|
||||||
|
pagerSize = 1
|
||||||
|
|
||||||
[mediaTypes]
|
[mediaTypes]
|
||||||
[mediaTypes."text/nodot"]
|
[mediaTypes."text/nodot"]
|
||||||
delimiter = ""
|
delimiter = ""
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ PAG|{{ .Title }}|{{ $sect.InSection . }}
|
|||||||
{{ $sections := (.Site.GetPage "section" .Section).Sections.ByWeight }}
|
{{ $sections := (.Site.GetPage "section" .Section).Sections.ByWeight }}
|
||||||
</html>`)
|
</html>`)
|
||||||
|
|
||||||
cfg.Set("paginate", 2)
|
cfg.Set("pagination.pagerSize", 2)
|
||||||
|
|
||||||
th, configs := newTestHelperFromProvider(cfg, fs, t)
|
th, configs := newTestHelperFromProvider(cfg, fs, t)
|
||||||
|
|
||||||
|
|||||||
@@ -32,9 +32,11 @@ func TestSiteStats(t *testing.T) {
|
|||||||
siteConfig := `
|
siteConfig := `
|
||||||
baseURL = "http://example.com/blog"
|
baseURL = "http://example.com/blog"
|
||||||
|
|
||||||
paginate = 1
|
|
||||||
defaultContentLanguage = "nn"
|
defaultContentLanguage = "nn"
|
||||||
|
|
||||||
|
[pagination]
|
||||||
|
pagerSize = 1
|
||||||
|
|
||||||
[languages]
|
[languages]
|
||||||
[languages.nn]
|
[languages.nn]
|
||||||
languageName = "Nynorsk"
|
languageName = "Nynorsk"
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ Do not go gentle into that good night.
|
|||||||
`
|
`
|
||||||
|
|
||||||
cfg, fs := newTestCfg()
|
cfg, fs := newTestCfg()
|
||||||
cfg.Set("paginate", 1)
|
cfg.Set("pagination.pagerSize", 1)
|
||||||
th, configs := newTestHelperFromProvider(cfg, fs, t)
|
th, configs := newTestHelperFromProvider(cfg, fs, t)
|
||||||
|
|
||||||
writeSource(t, fs, filepath.Join("content", "sect1", "_index.md"), fmt.Sprintf(st, "/ss1/"))
|
writeSource(t, fs, filepath.Join("content", "sect1", "_index.md"), fmt.Sprintf(st, "/ss1/"))
|
||||||
|
|||||||
@@ -80,8 +80,9 @@ func doTestTaxonomiesWithAndWithoutContentFile(t *testing.T, uglyURLs bool) {
|
|||||||
baseURL = "http://example.com/blog"
|
baseURL = "http://example.com/blog"
|
||||||
titleCaseStyle = "firstupper"
|
titleCaseStyle = "firstupper"
|
||||||
uglyURLs = %t
|
uglyURLs = %t
|
||||||
paginate = 1
|
|
||||||
defaultContentLanguage = "en"
|
defaultContentLanguage = "en"
|
||||||
|
[pagination]
|
||||||
|
pagerSize = 1
|
||||||
[Taxonomies]
|
[Taxonomies]
|
||||||
tag = "tags"
|
tag = "tags"
|
||||||
category = "categories"
|
category = "categories"
|
||||||
|
|||||||
@@ -377,7 +377,7 @@ func TestTemplateFuncs(t *testing.T) {
|
|||||||
b := newTestSitesBuilder(t).WithDefaultMultiSiteConfig()
|
b := newTestSitesBuilder(t).WithDefaultMultiSiteConfig()
|
||||||
|
|
||||||
homeTpl := `Site: {{ site.Language.Lang }} / {{ .Site.Language.Lang }} / {{ site.BaseURL }}
|
homeTpl := `Site: {{ site.Language.Lang }} / {{ .Site.Language.Lang }} / {{ site.BaseURL }}
|
||||||
Sites: {{ site.Sites.First.Home.Language.Lang }}
|
Sites: {{ site.Sites.Default.Home.Language.Lang }}
|
||||||
Hugo: {{ hugo.Generator }}
|
Hugo: {{ hugo.Generator }}
|
||||||
`
|
`
|
||||||
|
|
||||||
@@ -460,7 +460,7 @@ complex: 80: 80
|
|||||||
func TestPartialWithZeroedArgs(t *testing.T) {
|
func TestPartialWithZeroedArgs(t *testing.T) {
|
||||||
b := newTestSitesBuilder(t)
|
b := newTestSitesBuilder(t)
|
||||||
b.WithTemplatesAdded("index.html",
|
b.WithTemplatesAdded("index.html",
|
||||||
`
|
`
|
||||||
X{{ partial "retval" dict }}X
|
X{{ partial "retval" dict }}X
|
||||||
X{{ partial "retval" slice }}X
|
X{{ partial "retval" slice }}X
|
||||||
X{{ partial "retval" "" }}X
|
X{{ partial "retval" "" }}X
|
||||||
@@ -696,7 +696,7 @@ func TestApplyWithNamespace(t *testing.T) {
|
|||||||
|
|
||||||
b.WithTemplates(
|
b.WithTemplates(
|
||||||
"index.html", `
|
"index.html", `
|
||||||
{{ $b := slice " a " " b " " c" }}
|
{{ $b := slice " a " " b " " c" }}
|
||||||
{{ $a := apply $b "strings.Trim" "." " " }}
|
{{ $a := apply $b "strings.Trim" "." " " }}
|
||||||
a: {{ $a }}
|
a: {{ $a }}
|
||||||
`,
|
`,
|
||||||
|
|||||||
@@ -292,11 +292,13 @@ func (s *sitesBuilder) WithDefaultMultiSiteConfig() *sitesBuilder {
|
|||||||
defaultMultiSiteConfig := `
|
defaultMultiSiteConfig := `
|
||||||
baseURL = "http://example.com/blog"
|
baseURL = "http://example.com/blog"
|
||||||
|
|
||||||
paginate = 1
|
|
||||||
disablePathToLower = true
|
disablePathToLower = true
|
||||||
defaultContentLanguage = "en"
|
defaultContentLanguage = "en"
|
||||||
defaultContentLanguageInSubdir = true
|
defaultContentLanguageInSubdir = true
|
||||||
|
|
||||||
|
[pagination]
|
||||||
|
pagerSize = 1
|
||||||
|
|
||||||
[permalinks]
|
[permalinks]
|
||||||
other = "/somewhere/else/:filename"
|
other = "/somewhere/else/:filename"
|
||||||
|
|
||||||
@@ -324,7 +326,8 @@ plaque = "plaques"
|
|||||||
weight = 30
|
weight = 30
|
||||||
title = "På nynorsk"
|
title = "På nynorsk"
|
||||||
languageName = "Nynorsk"
|
languageName = "Nynorsk"
|
||||||
paginatePath = "side"
|
[Languages.nn.pagination]
|
||||||
|
path = "side"
|
||||||
[Languages.nn.Taxonomies]
|
[Languages.nn.Taxonomies]
|
||||||
lag = "lag"
|
lag = "lag"
|
||||||
[[Languages.nn.menu.main]]
|
[[Languages.nn.menu.main]]
|
||||||
@@ -336,7 +339,8 @@ weight = 1
|
|||||||
weight = 40
|
weight = 40
|
||||||
title = "På bokmål"
|
title = "På bokmål"
|
||||||
languageName = "Bokmål"
|
languageName = "Bokmål"
|
||||||
paginatePath = "side"
|
[Languages.nb.pagination]
|
||||||
|
path = "side"
|
||||||
[Languages.nb.Taxonomies]
|
[Languages.nb.Taxonomies]
|
||||||
lag = "lag"
|
lag = "lag"
|
||||||
` + commonConfigSections
|
` + commonConfigSections
|
||||||
|
|||||||
+8
-2
@@ -1,7 +1,13 @@
|
|||||||
# Release env.
|
# Release env.
|
||||||
# These will be replaced by script before release.
|
# These will be replaced by script before release.
|
||||||
HUGORELEASER_TAG=v0.134.3
|
HUGORELEASER_TAG=v0.136.5
|
||||||
HUGORELEASER_COMMITISH=5fb333b9f5ff4ec018f9d78910177d0bec1befb0
|
HUGORELEASER_COMMITISH=46cccb021bc6425455f4eec093f5cc4a32f1d12c
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -119,6 +119,24 @@ archive_alias_replacements = { "linux-amd64.tar.gz" = "Linux-64bit.tar.gz" }
|
|||||||
[[builds.os.archs]]
|
[[builds.os.archs]]
|
||||||
goarch = "amd64"
|
goarch = "amd64"
|
||||||
|
|
||||||
|
[[builds]]
|
||||||
|
path = "container1/unix/extended-withdeploy"
|
||||||
|
|
||||||
|
[builds.build_settings]
|
||||||
|
flags = ["-buildmode", "exe", "-tags", "extended,withdeploy"]
|
||||||
|
env = ["CGO_ENABLED=1"]
|
||||||
|
|
||||||
|
[[builds.os]]
|
||||||
|
goos = "darwin"
|
||||||
|
[builds.os.build_settings]
|
||||||
|
env = ["CGO_ENABLED=1", "CC=o64-clang", "CXX=o64-clang++"]
|
||||||
|
[[builds.os.archs]]
|
||||||
|
goarch = "universal"
|
||||||
|
[[builds.os]]
|
||||||
|
goos = "linux"
|
||||||
|
[[builds.os.archs]]
|
||||||
|
goarch = "amd64"
|
||||||
|
|
||||||
[[builds]]
|
[[builds]]
|
||||||
path = "container2/linux/extended"
|
path = "container2/linux/extended"
|
||||||
|
|
||||||
@@ -173,6 +191,10 @@ archive_alias_replacements = { "linux-amd64.tar.gz" = "Linux-64bit.tar.gz" }
|
|||||||
paths = ["builds/container1/unix/extended/**"]
|
paths = ["builds/container1/unix/extended/**"]
|
||||||
[archives.archive_settings]
|
[archives.archive_settings]
|
||||||
name_template = "{{ .Project }}_extended_{{ .Tag | trimPrefix `v` }}_{{ .Goos }}-{{ .Goarch }}"
|
name_template = "{{ .Project }}_extended_{{ .Tag | trimPrefix `v` }}_{{ .Goos }}-{{ .Goarch }}"
|
||||||
|
[[archives]]
|
||||||
|
paths = ["builds/container1/unix/extended-withdeploy/**"]
|
||||||
|
[archives.archive_settings]
|
||||||
|
name_template = "{{ .Project }}_extended_withdeploy_{{ .Tag | trimPrefix `v` }}_{{ .Goos }}-{{ .Goarch }}"
|
||||||
[[archives]]
|
[[archives]]
|
||||||
# Only extended builds in container2.
|
# Only extended builds in container2.
|
||||||
paths = ["builds/container2/**"]
|
paths = ["builds/container2/**"]
|
||||||
|
|||||||
+1
-1
@@ -334,7 +334,7 @@ func buildFlags() []string {
|
|||||||
func buildTags() string {
|
func buildTags() string {
|
||||||
// To build the extended Hugo SCSS/SASS enabled version, build with
|
// To build the extended Hugo SCSS/SASS enabled version, build with
|
||||||
// HUGO_BUILD_TAGS=extended mage install etc.
|
// HUGO_BUILD_TAGS=extended mage install etc.
|
||||||
// To build without `hugo deploy` for smaller binary, use HUGO_BUILD_TAGS=nodeploy
|
// To build with `hugo deploy`, use HUGO_BUILD_TAGS=withdeploy
|
||||||
if envtags := os.Getenv("HUGO_BUILD_TAGS"); envtags != "" {
|
if envtags := os.Getenv("HUGO_BUILD_TAGS"); envtags != "" {
|
||||||
return envtags
|
return envtags
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user