Skip to content

Commit

Permalink
Adjust docs for github pages
Browse files Browse the repository at this point in the history
* Renamed doc folder to docs
* Added docs/.nojekyll file
* Added docs/index.html with redirect to docs/html/index.html
* Moved docs/Makefile to repository root (and adjusted it
  consistently with rest of SamsungSLAV repositories)
* Moved docs/sphinx contents to docs/ directly
* Changed build directory from docs/build to docs/
* Moved docs/docker/Dockerfile for building documentation to
  docs/Dockerfile directory for consistency with other SamsungSLAV
  repositories
* Adjusted Makefile after directory changes

We should always link to: samsungslav.github.io/muxpi/html/
NOT to: samsungslav.github.io/muxpi/
(which works, but due to redirect is not SEO-friendly)

I had used this thread as reference:
sphinx-doc/sphinx#3382

Change-Id: I782507b8cdf1ffbdc8a8825a1530b9977bef196b
Signed-off-by: Alexander Mazuruk <[email protected]>
  • Loading branch information
aalexanderr committed Oct 22, 2018
1 parent b39848e commit 48cc23b
Show file tree
Hide file tree
Showing 29 changed files with 17 additions and 14 deletions.
25 changes: 14 additions & 11 deletions doc/Makefile → Makefile
Original file line number Diff line number Diff line change
@@ -1,28 +1,31 @@
DOC_DIR = sphinx
DOC_DIR = docs
DOCKER_IMAGE = muxpi-doc-image
DOCKER_CONTAINER = muxpi-doc-container
DOCKER_CONTAINER_WORKDIR = /doc

.PHONY: all clean build-doc-html build-docker-image clean-doc clean-docker
.PHONY: docs
docs: docs-sphinx

all: build-doc-html
.PHONY: clean
clean-docs: clean-docs-sphinx clean-docker-sphinx

clean: clean-doc clean-docker

build-doc-html: build-docker-image
.PHONY: docs-sphinx
docs-sphinx: docker-image-sphinx
docker run --rm=true \
--volume `pwd`:${DOCKER_CONTAINER_WORKDIR} \
--user `id -u $$USER`:`id -g $$USER` \
--name ${DOCKER_CONTAINER} ${DOCKER_IMAGE} \
make -C ${DOC_DIR} html

build-docker-image:
docker build -t ${DOCKER_IMAGE} docker
.PHONY: docker-image-sphinx
docker-image-sphinx:
docker build -t ${DOCKER_IMAGE} ${DOC_DIR}

clean-doc:
-rm -r ${DOC_DIR}/build
clean-docs-sphinx:
-rm -r ${DOC_DIR}/html
-rm -r ${DOC_DIR}/doctrees

clean-docker:
clean-docker-sphinx:
-docker rm ${DOCKER_CONTAINER}
-docker rmi ${DOCKER_IMAGE}

Empty file added docs/.nojekyll
Empty file.
File renamed without changes.
5 changes: 2 additions & 3 deletions doc/sphinx/Makefile → docs/Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SPHINXPROJ = MuxPi
SOURCEDIR = source
BUILDDIR = build
BUILDDIR = .

# Put it first so that "make" without argument is like "make help".
help:
Expand All @@ -17,4 +16,4 @@ help:
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
1 change: 1 addition & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<meta http-equiv="refresh" content="0; url=./html/index.html" />
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 48cc23b

Please sign in to comment.