sphinx - tetsuyaf1100/hello-world GitHub Wiki

sphinx

  • sample-sphinx.sh
#!/bin/bash

python3 -m venv venv
. venv/bin/activate

sudo yum install -y make
pip install sphinx sphinx_rtd_theme

mkdir work
cd work
#sphinx-quickstart
sphinx-quickstart -q --sep -p project -a taro

cd work
mkdir -p source/test
cat <<EOF > ./source/test/test1.rst
******************************
Sphinx Sample1
******************************
This is Sphinx Sample1
EOF

cat <<EOF > ./source/test/test2.rst
******************************
Sphinx Sample2
******************************
This is Shinx Sample2
EOF

sed -i -e "13i\ \ \ /test/test1\n \ \ /test/test2" source/index.rst
sed -i -e "s/^html_theme.*$/html_theme = 'sphinx_rtd_theme'/" source/conf.py
make html
  • サンプル実行
./sample-sphinx.sh
python3 -m http.server 18080
⚠️ **GitHub.com Fallback** ⚠️