Skip to content

Commit

Permalink
Add copy button for code in docs (pyg-team#489)
Browse files Browse the repository at this point in the history
  • Loading branch information
akihironitta authored Jan 18, 2025
1 parent 1456fab commit fc7c7c3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
'sphinx.ext.mathjax',
'sphinx.ext.napoleon',
'sphinx.ext.viewcode',
'sphinx_copybutton',
'pyg',
]

Expand All @@ -45,6 +46,9 @@
'xgboost': ('https://xgboost.readthedocs.io/en/stable/', None),
}

copybutton_prompt_text = r">>> |\.\.\. "
copybutton_prompt_is_regexp = True


def setup(app):
def rst_jinja_render(app, _, source):
Expand Down

0 comments on commit fc7c7c3

Please sign in to comment.