Skip to content

Commit 1828ed5

Browse files
committed
feat: add sphinx-click and nbsphinx support
1 parent 802d9bf commit 1828ed5

File tree

14 files changed

+525
-19
lines changed

14 files changed

+525
-19
lines changed

docs/_code/__init__.py

Whitespace-only changes.

docs/_code/click_example.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
"""Example Click CLI application for sphinx-click documentation."""
2+
3+
import click
4+
5+
6+
@click.group()
7+
def greet():
8+
"""A sample command group."""
9+
pass
10+
11+
12+
@greet.command()
13+
@click.argument("user", envvar="USER")
14+
def hello(user):
15+
"""Greet a user."""
16+
click.echo("Hello %s" % user)
17+
18+
19+
@greet.command()
20+
def world():
21+
"""Greet the world."""
22+
click.echo("Hello world!")

docs/conf.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
"""Configuration file for the Sphinx documentation builder."""
22

33
import os
4+
import sys
5+
6+
sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)), "_code"))
47

58
# -- Project information -----------------------------------------------------
69
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

0 commit comments

Comments
 (0)