Browse Source

add placeholders for links instead

pull/5/head
Fredrik Ekre 8 years ago
parent
commit
08e025c8b2
  1. 10
      src/Examples.jl

10
src/Examples.jl

@ -462,10 +462,9 @@ function execute_notebook(nb) @@ -462,10 +462,9 @@ function execute_notebook(nb)
end
function fixlinks(content; branch = "gh-pages", commit = "master")
if get(ENV, "HAS_JOSH_K_SEAL_OF_APPROVAL", "") == "true"
travis_repo_slug = get(ENV, "TRAVIS_REPO_SLUG", "")
travis_repo_slug = get(ENV, "TRAVIS_REPO_SLUG", "TRAVIS_REPO_SLUG")
# use same logic as Documenter to figure out the deploy folder
travis_tag = get(ENV, "TRAVIS_TAG", "")
travis_tag = get(ENV, "TRAVIS_TAG", "TRAVIS_TAG")
if isempty(travis_tag)
folder = "latest"
else
@ -479,8 +478,9 @@ function fixlinks(content; branch = "gh-pages", commit = "master") @@ -479,8 +478,9 @@ function fixlinks(content; branch = "gh-pages", commit = "master")
# replace @__NBVIEWER_ROOT_URL__ to latest or version directory
nbviewer_root_url = "https://nbviewer.jupyter.org/github/$(travis_repo_slug)/blob/$(branch)/$(folder)/"
content = replace(content, "@__NBVIEWER_ROOT_URL__" => nbviewer_root_url)
else
@info "not running on Travis, skipping link-fix."
if get(ENV, "HAS_JOSH_K_SEAL_OF_APPROVAL", "") != "true"
@info "not running on Travis, skipping links will not be correct."
end
return content
end

Loading…
Cancel
Save