fix the documentation for the page.origin.private property in the UI model

This commit is contained in:
Dan Allen
2022-10-13 14:08:12 -06:00
parent d439b1ddee
commit 1a4ffae8d2

View File

@@ -146,7 +146,7 @@ If there's only a single version of the component, the canonical URL is the qual
This value is derived automatically for the hosts github.com, gitlab.com, pagure.io, and bitbucket.org, even if the repository is private.
If the host is not recognized, or you want to customize the value, you can use the `edit_url` key on the content source in the playbook.
The default UI shows an "Edit this Page" link that points to this URL unless the repository is private (i.e., `page.origin.private` is true) or `page.fileUri` is set.
The default UI shows an "Edit this Page" link that points to this URL unless the repository is private (i.e., `page.origin.private` is truthy) or `page.fileUri` is set.
You can force this link to be shown by setting the environment variable `FORCE_SHOW_EDIT_PAGE_LINK` (e.g., `FORCE_SHOW_EDIT_PAGE_LINK=true`) or by customizing the logic in the UI template.
| page.fileUri
@@ -156,9 +156,9 @@ If this property is set, the default UI shows an "Edit this Page" link that poin
When the `CI` environment variable is set, the default UI ignores this property (since linking to a local file:// URI in a published site doesn't make any sense).
| page.origin.private
| This value will be true if the repository requires authentication or the repository URL embeds credentials.
In the default UI, if this value is `true`, the "Edit this Page" link is disabled.
A quick way to force this property to be `true` (even if the repository is public) is to begin the content source URL in the playbook with empty credentials, as in `\https://@`.
| This value will be `auth-required` if the git server requests authentication credentials, otherwise `auth-embedded` if credentials are embedded in the content source URL in the playbook, otherwise unset.
In the default UI, if this value is truthy, the "Edit this Page" link is not shown.
A quick way to force this property to be truthy (even if the repository is public) is to begin the content source URL in the playbook with empty credentials, as in `\https://@`.
Then, the "Edit the Page" link will not appear.
| page.home