aboutsummaryrefslogtreecommitdiffstats
path: root/docs/scripts
diff options
context:
space:
mode:
authorNathan Skrzypczak <nathan.skrzypczak@gmail.com>2021-08-19 11:38:06 +0200
committerDave Wallace <dwallacelf@gmail.com>2021-10-13 23:22:32 +0000
commit9ad39c026c8a3c945a7003c4aa4f5cb1d4c80160 (patch)
tree3cca19635417e28ae381d67ae31c75df2925032d /docs/scripts
parentf47122e07e1ecd0151902a3cabe46c60a99bee8e (diff)
docs: better docs, mv doxygen to sphinx
This patch refactors the VPP sphinx docs in order to make it easier to consume for external readers as well as VPP developers. It also makes sphinx the single source of documentation, which simplifies maintenance and operation. Most important updates are: - reformat the existing documentation as rst - split RELEASE.md and move it into separate rst files - remove section 'events' - remove section 'archive' - remove section 'related projects' - remove section 'feature by release' - remove section 'Various links' - make (Configuration reference, CLI docs, developer docs) top level items in the list - move 'Use Cases' as part of 'About VPP' - move 'Troubleshooting' as part of 'Getting Started' - move test framework docs into 'Developer Documentation' - add a 'Contributing' section for gerrit, docs and other contributer related infos - deprecate doxygen and test-docs targets - redirect the "make doxygen" target to "make docs" Type: refactor Change-Id: I552a5645d5b7964d547f99b1336e2ac24e7c209f Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com> Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Diffstat (limited to 'docs/scripts')
-rwxr-xr-xdocs/scripts/prepare-for-site.sh18
-rwxr-xr-xdocs/scripts/publish-docs.sh85
-rwxr-xr-xdocs/scripts/sphinx-make.sh38
3 files changed, 0 insertions, 141 deletions
diff --git a/docs/scripts/prepare-for-site.sh b/docs/scripts/prepare-for-site.sh
deleted file mode 100755
index 15888ba6e83..00000000000
--- a/docs/scripts/prepare-for-site.sh
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/bash
-
-if [ ! -d "docs" ]; then
- echo "This script is meant to be run from the root directory"
- exit 1;
-fi
-
-for f in $(find ./docs -type l)
-do
- target=$(readlink $f)
- rm $f
- cp $(dirname $f)/$target $(dirname $f)/$(basename $target)
- echo "Replaced symlink $f"
-done
-
-echo "Cleaning doc build directory"
-make docs-clean
-
diff --git a/docs/scripts/publish-docs.sh b/docs/scripts/publish-docs.sh
deleted file mode 100755
index 8c3c81011dc..00000000000
--- a/docs/scripts/publish-docs.sh
+++ /dev/null
@@ -1,85 +0,0 @@
-#!/bin/bash -ex
-
-# publish-docs.sh
-#
-# This sccript is used to publish the VPP User documents to
-# the FD.io Site.
-#
-# Arguments:
-#
-# $1: The main site repo user name
-# $2: The release branch name for example 1908, 1904 etc.
-
-# Some basic checks
-if [ ! -d "docs" ]; then
- echo "This script is meant to be run from the root directory."
- exit 1;
-fi
-
-if [ "$#" -ne 2 ]; then
- echo "Please specify the site username and branch."
- exit 1;
-fi
-
-# Get the workspace root
-WS_ROOT=$PWD
-
-# Get the VPP branch and username
-SITE_USERNAME=$1
-VPP_BRANCH=$2
-
-#Build the docs
-make docs-clean
-make docs-venv
-make docs
-
-# Clone the site repo
-rm -fr site
-rm -fr sphinx_env
-git clone ssh://git@github.com/$SITE_USERNAME/site
-cd site
-git submodule update --init --recursive
-git remote add upstream ssh://git@github.com/FDio/site
-git remote -v
-git fetch upstream
-git merge -m "Publish the Docs" upstream/master
-
-# Get the version
-VERSION=`source $WS_ROOT/src/scripts/version`
-VERSION=${VERSION/"~"/"-"}
-
-# Copy the files to the appropriate directory
-SRC_DIR=../docs/_build/html/.
-if [ "$VPP_BRANCH" == "master" ]
-then
- TARGET_DIR=./static/docs/vpp/master
- rm -fr $TARGET_DIR
-else
- TARGET_DIR=./static/docs/vpp/v$VPP_BRANCH
- rm -fr $TARGET_DIR
- mkdir -p $TARGET_DIR
- VERSION=v$VPP_BRANCH
- rm ./static/docs/vpp/latest
- ln -s $VERSION ./static/docs/vpp/latest
-fi
-
-# Create a branch for the commit
-git checkout -b $VERSION
-git branch
-
-# Copy the docs
-cp -r $SRC_DIR $TARGET_DIR
-
-# Create the feature list
-pushd ..
-source ./sphinx_venv/bin/activate
-find . -name FEATURE.yaml | ./src/scripts/fts.py --markdown > site/content/vppProject/vppfeatures/features.md
-deactivate
-popd
-
-# Push the new docs
-git add "*"
-git commit -s -m "Publish docs from VPP $VERSION"
-git push origin "$VERSION"
-
-exit 0
diff --git a/docs/scripts/sphinx-make.sh b/docs/scripts/sphinx-make.sh
deleted file mode 100755
index 532225e488e..00000000000
--- a/docs/scripts/sphinx-make.sh
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/bash -ex
-
-# Not refactored to root Makefile because CI calls this from
-# makefile in /docs (as if 'make -C docs').
-if [ -z "$PYTHON" ]
-then
-PYTHON_INTERP=python3
-else
-PYTHON_INTERP=$(PYTHON)
-fi
-
-# Get the OS
-OS_ID=$(grep '^ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')
-OS_VERSION=$(grep '^VERSION_ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')
-PIP_VERSION=$(grep 'PIP_VERSION=' $WS_ROOT/test/Makefile | cut -d'=' -f2)
-PIP_TOOLS_VERSION=$(grep 'PIP_TOOLS_VERSION=' $WS_ROOT/test/Makefile | cut -d'=' -f2)
-
-if [ "$1" == "venv" ]
-then
-
- # Install the virtual environment
- $PYTHON_INTERP -m venv $VENV_DIR
- source $VENV_DIR/bin/activate;
- $PYTHON_INTERP -m pip install pip==$PIP_VERSION
- $PYTHON_INTERP -m pip install pip-tools==$PIP_TOOLS_VERSION
- $PYTHON_INTERP -m pip install -r $WS_ROOT/test/requirements-3.txt
-else
- [ -n "$(declare -f deactivate)" ] && deactivate
- source $VENV_DIR/bin/activate;
- VERSION=`source $WS_ROOT/src/scripts/version`
- TM=`TZ=GMT date`
- sed -ie "s/**VPP Version:\*\* .*/**VPP Version:** $VERSION/" $DOCS_DIR/about.rst
- sed -ie "s/**Built on:\*\* .*/**Built on:** $TM/" $DOCS_DIR/about.rst
- rm $DOCS_DIR/about.rste
- make -C $DOCS_DIR $1
-fi
-
-deactivate