Skip to content

Commit

Permalink
Revert "Document PAGE.String"
Browse files Browse the repository at this point in the history
This reverts commit bb30e7c.

We don't want to document this, at least not this way.

The PAGE.String method is currently meant to be used to give contextual information about a page (path, filename).

It's meant for error messages, so you can do

```
{{ warnf "foo not found in %q" .Page }}
```

But when documented as "Returns the absolute path to the file backing the given page", that is

1. Not entirely correct.
2. Makes it a formal API that people will use as a filename/path, and we can never change it (e.g. to add more contextual information)
  • Loading branch information
bep committed Dec 17, 2024
1 parent bb30e7c commit 9e1c85b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 45 deletions.
1 change: 1 addition & 0 deletions content/en/methods/page/Store.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Store
linktitle: PAGE.Store
description: Returns a persistent "scratch pad" on the given page to store and manipulate data.
categories: []
keywords: []
Expand Down
45 changes: 0 additions & 45 deletions content/en/methods/page/String.md

This file was deleted.

1 comment on commit 9e1c85b

@jmooring
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added this because you changed the link render hook on the docs site to use it... which kind of makes it publicly visible.

gohugoio/gohugoioTheme@f5fea3a

Please sign in to comment.