mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-11 20:03:58 +02:00
Don't use the baseURL /path as part of the resource cache key
As that prevents Hugo projects with sub paths in their `baseURL` to use themes with cached resources. Fixes #9787
This commit is contained in:
@@ -20,6 +20,7 @@ import (
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/gohugoio/hugo/resources/internal"
|
||||
@@ -267,7 +268,10 @@ func (l *genericResource) Data() any {
|
||||
}
|
||||
|
||||
func (l *genericResource) Key() string {
|
||||
return l.RelPermalink()
|
||||
if l.spec.BasePath == "" {
|
||||
return l.RelPermalink()
|
||||
}
|
||||
return strings.TrimPrefix(l.RelPermalink(), l.spec.BasePath)
|
||||
}
|
||||
|
||||
func (l *genericResource) MediaType() media.Type {
|
||||
|
Reference in New Issue
Block a user