Skip to contents

The MST is four things a reader moves between — two apps, the book, and the project home — and each has been a dead end from the others: the scores table links out to a species map with no way back, and the book's app links sit only on its Preface (apps#11, docs#6). This is the one definition of that link set, so a nav added to any of them cannot disagree with the rest.

Usage

product_urls(
  ver,
  access = "public",
  app_base = "https://app.marinesensitivity.org",
  docs_base = "https://marinesensitivity.org/docs",
  home = "https://marinesensitivity.org"
)

Arguments

ver

version label, e.g. v8

access

public or restricted — from atlas_ver_access()

app_base

public app host

docs_base

public docs base (GitHub Pages)

home

project landing page

Value

named character vector: scores, species, docs, home

Details

Version-preserving is the point. A bare link to /scores from a v7 session silently moves the reader to the promoted release, which is precisely the confusion these navs exist to remove — so ?ver= is always carried. On a restricted release the version is the URL PATH on the signed-in preview host instead (preview_app_url()), because Cloudflare Access scopes its per-version policies by path; sending such a reviewer to ?ver= on the public host would show them nothing.

Examples

product_urls("v7")
#>                                          scores 
#>  "https://app.marinesensitivity.org/v7/scores/" 
#>                                         species 
#> "https://app.marinesensitivity.org/v7/species/" 
#>                                            docs 
#>        "https://marinesensitivity.org/docs/v7/" 
#>                                            home 
#>                 "https://marinesensitivity.org" 
product_urls("v9", access = "restricted")
#>                                              scores 
#>  "https://preview.marinesensitivity.org/v9/scores/" 
#>                                             species 
#> "https://preview.marinesensitivity.org/v9/species/" 
#>                                                docs 
#>    "https://preview.marinesensitivity.org/docs/v9/" 
#>                                                home 
#>                     "https://marinesensitivity.org"