diff options
author | Bjørn Erik Pedersen <[email protected]> | 2024-05-02 10:41:58 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2024-05-02 10:49:02 +0200 |
commit | c892e75fbce3a0ed04cd4edcda7a480a4e36836c (patch) | |
tree | edf7862034e6072cf9ce70901c83fcde75371852 /resources | |
parent | 4255d13d3e2e64f6ca9d29b640081992eb31161e (diff) | |
download | hugo-c892e75fbce3a0ed04cd4edcda7a480a4e36836c.tar.gz hugo-c892e75fbce3a0ed04cd4edcda7a480a4e36836c.zip |
resources/page: Pull internal Page methods into its own interface
So it doesn't get visible when passing it to `jsonify`.
Diffstat (limited to 'resources')
-rw-r--r-- | resources/page/page.go | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/resources/page/page.go b/resources/page/page.go index f995ee641..9647a916b 100644 --- a/resources/page/page.go +++ b/resources/page/page.go @@ -225,9 +225,6 @@ type PageMetaProvider interface { // to the source of this Page. It will be relative to any content root. Path() string - // This is for internal use only. - PathInfo() *paths.Path - // The slug, typically defined in front matter. Slug() string @@ -253,6 +250,12 @@ type PageMetaProvider interface { Weight() int } +// PageMetaInternalProvider provides internal page metadata. +type PageMetaInternalProvider interface { + // This is for internal use only. + PathInfo() *paths.Path +} + // PageRenderProvider provides a way for a Page to render content. type PageRenderProvider interface { // Render renders the given layout with this Page as context. @@ -273,6 +276,7 @@ type PageWithoutContent interface { RenderShortcodesProvider resource.Resource PageMetaProvider + PageMetaInternalProvider resource.LanguageProvider // For pages backed by a file. |