Commit 7b34b80e authored by Glenn Walbran's avatar Glenn Walbran
Browse files

Merge branch 'update-sphinx' into 'master'

Update sphinx

See merge request !8
parents 4159d2a5 1687eb43
......@@ -14,8 +14,17 @@ The first command only builds English. The second builds all translations
(and takes longer).
# build/update the dockerized manual builder
# build english manual for current branch
manual-build/ TRANSLATIONS=en html
# build all translations for current branch
manual-build/ html
manual-build/ start
# check your changes in site served from the local server
manual-build/ stop
The built docs will be in the `build/html` directory (on your host machine).
......@@ -41,10 +50,12 @@ you continue.
If docker is available you can build the docbuilder image on Linux with:
cd manual-build
docker build --build-arg IMAGE_UID=`id -u` --build-arg IMAGE_GID=`id -g` --tag mahara/docbuilder .
Note: this command should be run periodically to freshen up (patch) the builder
The `mahara/docbuilder` image is based on a debian docker image with additional
packages that are required for building the docs installed. Using a docker image
for this makes it easy to get going with the same build environment as used by
......@@ -54,3 +65,8 @@ The image is also made so that the default user has the same UID:GID as the curr
system user. This is so that the built files are owned by the current user on the
host machine(otherwise they might be owned by root).
## Docbuilder @ uses this project as a sub module to make use of the same doc
builder. So any changes to how the doc builder is created need to be applied to
that project by Catalyst staff.
# Builds and/or refreshes the Mahara docbuilder image.
BASE_DIR=$(dirname $0)
cd ${BASE_DIR}
docker pull debian:stable
docker build --build-arg IMAGE_UID=`id -u` --build-arg IMAGE_GID=`id -g` --tag mahara/docbuilder .
# Runs a dockerized nginx web server that will serve the Mahara manual
# that has been built.
# This script will start the nginx container and publish it's port 80 to
# ${CONTAINER_LISTEN_PORT} which will default to port 80 on the host machine.
# If this does not suit you set an environment variable CONTAINER_LISTEN_PORT
# with the port that you do want to use.
cd $(dirname $0)/..
if [[ "$1" == "stop" ]] ; then
docker container stop ${CONTAINTER_NAME}
elif [[ "$1" == "start" ]] ; then
docker run --rm --name ${CONTAINTER_NAME} \
-v $(pwd)/build/html:/usr/share/nginx/html:ro \
-d nginx
echo "View the manual at http://localhost:${CONTAINER_LISTEN_PORT}/en/"
echo "Usage $0 start|stop"
......@@ -107,6 +107,7 @@
VERSION: '{{ release|e }}',
FILE_SUFFIX: '{{ '' if no_search_suffix else file_suffix }}',
LINK_SUFFIX: '{{ '' if no_search_suffix else file_suffix }}',
HAS_SOURCE: {{ has_source|lower }}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment