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

Force download of source files #863

Open
afeld opened this issue Oct 31, 2024 · 0 comments
Open

Force download of source files #863

afeld opened this issue Oct 31, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@afeld
Copy link
Contributor

afeld commented Oct 31, 2024

Context

See readthedocs/readthedocs.org#11728 for the background. In short: When I click the .md or .ipynb download links, I would expect the files to be downloaded, rather than shown as plain text.

Proposal

While this can be set server-side using the Content-Disposition header, ReadTheDocs doesn't plan to do so. I imagine they are a common host for users of this theme, so that's a shame. Thankfully there's a workaround that can be implemented by the theme, using the download attribute on the anchor tags.

I glanced at the relevant source, and there wasn't a super-obvious place to add that attribute. I'm open to doing the work, but not sure when I can get to it. Would welcome guidance.

Thanks!

Tasks and updates

No response

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

No branches or pull requests

1 participant