|
|
|
@ -318,28 +318,19 @@ function markdown(inputfile, outputdir; preprocess = identity, postprocess = ide |
|
|
|
if documenter |
|
|
|
if documenter |
|
|
|
# change the Edit on GitHub link |
|
|
|
# change the Edit on GitHub link |
|
|
|
repo = get(ENV, "TRAVIS_REPO_SLUG", nothing) |
|
|
|
repo = get(ENV, "TRAVIS_REPO_SLUG", nothing) |
|
|
|
build_dir = get(ENV, "TRAVIS_BUILD_DIR", nothing) |
|
|
|
|
|
|
|
@show repo |
|
|
|
|
|
|
|
@show build_dir |
|
|
|
|
|
|
|
if repo === nothing |
|
|
|
if repo === nothing |
|
|
|
path = "" |
|
|
|
path = "" |
|
|
|
else |
|
|
|
else |
|
|
|
pkg = String(first(split(last(split(repo, '/')), '.'))) |
|
|
|
pkg = String(first(split(last(split(repo, '/')), '.'))) |
|
|
|
@show pkg |
|
|
|
|
|
|
|
pkgsrc = Base.find_package(pkg) |
|
|
|
pkgsrc = Base.find_package(pkg) |
|
|
|
@show pkgsrc |
|
|
|
|
|
|
|
if pkgsrc === nothing |
|
|
|
if pkgsrc === nothing |
|
|
|
path = "" |
|
|
|
path = "" |
|
|
|
else |
|
|
|
else |
|
|
|
repo_root = first(split(pkgsrc, joinpath("src", pkg * ".jl"))) |
|
|
|
repo_root = first(split(pkgsrc, joinpath("src", pkg * ".jl"))) |
|
|
|
@show repo_root |
|
|
|
|
|
|
|
path = relpath(inputfile, repo_root) |
|
|
|
path = relpath(inputfile, repo_root) |
|
|
|
@show path |
|
|
|
|
|
|
|
path = replace(path, "\\" => "/") |
|
|
|
path = replace(path, "\\" => "/") |
|
|
|
@show path |
|
|
|
|
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
@show path |
|
|
|
|
|
|
|
content = """ |
|
|
|
content = """ |
|
|
|
# ```@meta |
|
|
|
# ```@meta |
|
|
|
# EditURL = "@__REPO_ROOT_URL__$(path)" |
|
|
|
# EditURL = "@__REPO_ROOT_URL__$(path)" |
|
|
|
|