Commit 650b6a7e authored by Dan Allen's avatar Dan Allen
Browse files

document the page.fileUri property in the UI model and the role it plays in...

document the page.fileUri property in the UI model and the role it plays in the Edit this Page link [skip ci]
parent 6592cbad
......@@ -133,8 +133,14 @@ 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).
You can force the link to be shown by setting the environment variable `FORCE_SHOW_EDIT_PAGE_LINK` or by customizing the UI template.
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.
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
| The local file:// URI to edit the current page if the page originates from the local filesystem (i.e., the worktree).
If this property is set, the default UI shows an "Edit this Page" link that points to this URI (instead of the `page.editUrl` value) unless the `CI` environment variable is set (e.g., `CI=true`).
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.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment