Skip to content
This repository has been archived by the owner on Aug 25, 2024. It is now read-only.

docs: hiding of python prompts #529

Merged
merged 6 commits into from
Apr 7, 2020
Merged

Conversation

sk-ip
Copy link
Contributor

@sk-ip sk-ip commented Apr 5, 2020

The python prompt >>> can be enabled or disabled. this way users can easily copy paste code in interactive sessions.
closes #438

@sk-ip
Copy link
Contributor Author

sk-ip commented Apr 5, 2020

@pdxjohnny , the only left is to add copybutton.js file to the static directory. but the static directory cannot be found. i found one in the pages directory after running ./scripts/docs.sh and it worked fine. but i don't think its the best place to add that file, since it is also getting ignored. So where should i add the copybutton.js file.

@johnandersen777
Copy link

johnandersen777 commented Apr 5, 2020

We want ./scripts/docs.sh to download it from https://github.com/python/python-docs-theme/raw/master/python_docs_theme/static/copybutton.js (if it doesn't exist already in some directory, sounds like maybe _static, you'll want to figure out where _static is supposed to go) and then patch it with any needed adjustments for the read the docs theme (which may or may not be needed, you'll need to read the thread and test it out until it works.

@sk-ip
Copy link
Contributor Author

sk-ip commented Apr 6, 2020

@pdxjohnny , i added a link to download the copybutton.js file to the path pages/_static and then ran ./scripts.docs.sh and it worked : )
here's how it looks

ezgif com-optimize

@sk-ip sk-ip changed the title WIP: docs: hiding of python prompts docs: hiding of python prompts Apr 6, 2020
@sk-ip
Copy link
Contributor Author

sk-ip commented Apr 6, 2020

@pdxjohnny , this is ready for review. i don;t know why some tests are failing.

scripts/docs.sh Outdated Show resolved Hide resolved
Copy link

@johnandersen777 johnandersen777 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!!

@johnandersen777 johnandersen777 merged commit c0946b2 into intel:master Apr 7, 2020
@sk-ip sk-ip deleted the docs_improvement branch April 8, 2020 16:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

docs: Enable hiding of Python prompts
2 participants