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

Build: expose env var with the full URL from the current version #8260

Closed
stsewd opened this issue Jun 14, 2021 · 3 comments · Fixed by #10166
Closed

Build: expose env var with the full URL from the current version #8260

stsewd opened this issue Jun 14, 2021 · 3 comments · Fixed by #10166
Labels
Improvement Minor improvement to code Needed: design decision A core team decision is required

Comments

@stsewd
Copy link
Member

stsewd commented Jun 14, 2021

We expose some env vars in our builds https://docs.readthedocs.io/en/stable/builds.html#build-environment, I think it should be useful to add a READTHEDOCS_VERSION_URL or similar. (think we add the full url in the sphinx context, but having an env var would be more general)

Ref #8256 (comment)

@mootari
Copy link

mootari commented Sep 9, 2021

This would be really great to have. What open problems / questions are currently blocking this issue?

@humitos
Copy link
Member

humitos commented Sep 13, 2021

Hi @mootari! Can you comment here what's the use case you want to handle? I'm curious about how people will use this value.

Also, note there is a current workaround for this that's linked in the description of this issue. That may solve your case for now.

What open problems / questions are currently blocking this issue?

I don't think there is anything blocking this, but it hasn't been a priority for our roadmap and we haven't had the time to implement it.

@mootari
Copy link

mootari commented Sep 13, 2021

@humitos The ddev project uses mkdocs in combination with the Material theme. The theme requires a proper site_url in mkdocs.yml, otherwise its error page is completely broken (wrong resource paths, invalid relative navigation links on error pages).

Since mkdocs now supports environment variables in its config, the last missing piece for a straightforward fix of the above problem would be an env var that provides the entire path, since multiple YAML tags / env vars cannot be concatenated.

Related issue: ddev/ddev#2939

j1elo added a commit to OpenVidu/openvidu.io-docs that referenced this issue Sep 29, 2021
MkDocs requires that `site_url` is set to the complete URL of the docs,
this means the domain and any subdirectory. But RTD doesn't yet provide
any way to check what is the correct directory that should be set here.

Related: readthedocs/readthedocs.org#8260
j1elo added a commit to OpenVidu/openvidu.io-docs that referenced this issue Sep 30, 2021
MkDocs requires that `site_url` is set to the complete URL of the docs,
this means the domain and any subdirectory. But RTD doesn't yet provide
any way to check what is the correct directory that should be set here.

Related: readthedocs/readthedocs.org#8260
@humitos humitos changed the title Exposer env var with the full url from the current version in builds Build: expose env var with the full URL from the current version Jan 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Improvement Minor improvement to code Needed: design decision A core team decision is required
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants