Skip to content

Conversation

@LuisBL
Copy link

@LuisBL LuisBL commented Jan 21, 2023

Related to #1069

provide a show_code_download key to conf.py, if False do not expose "Download Python source code" neither Jupyter notebook

@larsoner
Copy link
Contributor

See #949, I think we've decided this is not necessary

@SimenZhor
Copy link

@larsoner as a user I think it would be a lot more convenient to have this as an option in conf.py rather than having to make custom css rules to hide the buttons. Especially as that would eliminate the need for uploading the _downloads folder to my host (this PR should probably make sure that folder does not be generated in the first place).

@larsoner
Copy link
Contributor

larsoner commented Mar 8, 2023

@lucyleeow WDYT?

@lucyleeow
Copy link
Contributor

I understand it would be easier to users but I am reluctant to add to our already large list of config options (though it probably doesn't add much maintenance).
How about adding a part to our documentation about how to hide this via CSS? Maybe expanding the section 'And some things can be tweaked directly in CSS:' (here). I vaguely recall a few issues about other things that can be tweaked via CSS.

@larsoner
Copy link
Contributor

larsoner commented Nov 5, 2025

Actually I hadn't considered the fact that we could avoid generating a bunch of files in the first place by having this as a config option... that might make it worth having over just a CSS trick. In MNE-Python for example I would probably turn this on for PRs to reduce Artifact upload time on CircleCI (which could also be done by some code plus CSS but it's a pain)... @lucyleeow WDYT?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants