mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-29 22:29:56 +02:00
@@ -62,7 +62,8 @@ func (h *HugoSites) newPage(m *pageMeta) (*pageState, *paths.Path, error) {
|
||||
|
||||
if pcfg.Path != "" {
|
||||
s := m.pageConfig.Path
|
||||
if !paths.HasExt(s) {
|
||||
// Paths from content adapters should never have any extension.
|
||||
if pcfg.IsFromContentAdapter || !paths.HasExt(s) {
|
||||
var (
|
||||
isBranch bool
|
||||
isBranchSet bool
|
||||
|
@@ -477,3 +477,20 @@ baseURL = "https://example.com"
|
||||
b.AssertFileExists("public/docs/p1/index.html", true)
|
||||
b.AssertFileExists("public/docs/p2/index.html", false)
|
||||
}
|
||||
|
||||
func TestPagesFromGoPathsWithDotsIssue12493(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
files := `
|
||||
-- hugo.toml --
|
||||
disableKinds = ['home','section','rss','sitemap','taxonomy','term']
|
||||
-- content/_content.gotmpl --
|
||||
{{ .AddPage (dict "path" "s-1.2.3/p-4.5.6" "title" "p-4.5.6") }}
|
||||
-- layouts/_default/single.html --
|
||||
{{ .Title }}
|
||||
`
|
||||
|
||||
b := hugolib.Test(t, files)
|
||||
|
||||
b.AssertFileExists("public/s-1.2.3/p-4.5.6/index.html", true)
|
||||
}
|
||||
|
Reference in New Issue
Block a user