diff options
author | Mai-Lapyst <[email protected]> | 2023-06-26 15:31:01 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2023-06-26 15:31:01 +0200 |
commit | cc14c6a52c215fc43716f7b266c4c340b3d28230 (patch) | |
tree | 0d371fe0f9421d52a42e203ade99127c2d11806d /source | |
parent | e3308a0bbc2de1cb4d7571521abeab07049ce31f (diff) | |
download | hugo-cc14c6a52c215fc43716f7b266c4c340b3d28230.tar.gz hugo-cc14c6a52c215fc43716f7b266c4c340b3d28230.zip |
resources/page: Allow section and taxonomy pages to have a permalink configuration
Allows using permalink configuration for sections (branch bundles) and
also for taxonomy pages. Extends the current permalink configuration to
be able to specified per page kind while also staying backward compatible:
all permalink patterns not dedicated to a certain kind, get automatically
added for both normal pages and term pages.
Fixes #8523
Diffstat (limited to 'source')
-rw-r--r-- | source/fileInfo.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/fileInfo.go b/source/fileInfo.go index c58a0c3b9..03bb1b16c 100644 --- a/source/fileInfo.go +++ b/source/fileInfo.go @@ -92,6 +92,9 @@ type FileWithoutOverlap interface { // if file is a leaf bundle. ContentBaseName() string + // Classifier is the ContentClass of the file + Classifier() files.ContentClass + // UniqueID is the MD5 hash of the file's path and is for most practical applications, // Hugo content files being one of them, considered to be unique. UniqueID() string @@ -170,6 +173,11 @@ func (fi *FileInfo) ContentBaseName() string { return fi.contentBaseName } +// Classifier is the ContentClass of the file +func (fi *FileInfo) Classifier() files.ContentClass { + return fi.classifier; +} + // Section returns a file's section. func (fi *FileInfo) Section() string { fi.init() |