Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set some environment variables when building docs #74

Closed
fredrikekre opened this issue Jul 17, 2019 · 0 comments · Fixed by #76
Closed

Set some environment variables when building docs #74

fredrikekre opened this issue Jul 17, 2019 · 0 comments · Fixed by #76
Labels
enhancement New feature or request

Comments

@fredrikekre
Copy link
Member

fredrikekre commented Jul 17, 2019

Sometimes you need to detect who is building the docs. For example, for Literate.jl I want to predict URLs to the final output. On Travis this is easy; I detect that code is running on Travis, and use TRAVIS_REPO_SLUG to guess a GitHub URL, and similar for embedding links to nbviewer.org for generated notebook files, see e.g. @__REPO__ROOT_URL__ from https://fredrikekre.github.io/Literate.jl/stable/fileformat/#Default-Replacements-1

The problem now is that the docs built by DocumentationGenerator have wrong links, since its not beeing built on Travis, compare e.g. the show nbviewer links here https://fredrikekre.github.io/Literate.jl/stable/generated/example/ and here https://pkg.julialang.org/docs/Literate/XPnWG/1.1.0/generated/example/

I think what I need from DocumentationGenerator is the following:

  • Some way to detect that docs are being built by DocumentationGenerator e.g. DOCUMENTATIONGENERATOR="true"
  • Some environment variable for the final base URL where the docs will be deployed, e.g. DOCUMENTATIONGENERATOR_BASEURL="pkg.julialang.org/docs/Literate/XPnWG/1.1.0/" so that I can query where the docs currently beeing built will be deployed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant