Skip to content

Commit

Permalink
Merge pull request cakephp#5493 from cakephp/external-theme
Browse files Browse the repository at this point in the history
RFC - Use an external theme for docs
  • Loading branch information
markstory authored Jan 7, 2018
2 parents 2e5c0b3 + 8c46cfb commit 0222e87
Show file tree
Hide file tree
Showing 56 changed files with 54 additions and 7,985 deletions.
24 changes: 16 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
sudo: required
addons:
apt:
packages:
- texlive-latex-recommended
- texlive-latex-extra
- texlive-fonts-recommended
- texlive-lang-all

services:
- docker
language: python

before_install:
- docker pull cakephpfr/docs
env:
matrix:
- HTML=1
- EPUB=1
- PDF=1

script:
- docker run -it --rm -v $(pwd):/data cakephpfr/docs:light make html SPHINXOPTS='-W'
- docker run -it --rm -v $(pwd):/data cakephpfr/docs make epub
- docker run -it --rm -v $(pwd):/data cakephpfr/docs make latex
- if [ $HTML = '1' ]; then make html; fi
- if [ $EPUB = '1' ]; then make epub; fi
- if [ $PDF = '1' ]; then make latex; fi

notifications:
email: false
27 changes: 15 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ DEST = website
# Clone the en/Makefile everywhere.
SPHINX_DEPENDENCIES = $(foreach lang, $(LANGS), $(lang)/Makefile)

# Get path to theme directory to build static assets.
THEME_DIR = $(shell python -c 'import os, cakephpsphinx; print os.path.abspath(os.path.dirname(cakephpsphinx.__file__))')

# Copy-paste the English Makefile everywhere it's needed (if non existing).
%/Makefile: en/Makefile
cp -n $< $@
Expand Down Expand Up @@ -96,23 +99,23 @@ clean-website:
build/html/%/_static:
mkdir -p build/html/$*/_static

CSS_FILES = themes/cakephp/static/css/fonts.css \
themes/cakephp/static/css/bootstrap.min.css \
themes/cakephp/static/css/font-awesome.min.css \
themes/cakephp/static/css/style.css \
themes/cakephp/static/css/default.css \
themes/cakephp/static/css/pygments.css \
themes/cakephp/static/css/responsive.css
CSS_FILES = $(THEME_DIR)/themes/cakephp/static/css/fonts.css \
$(THEME_DIR)/themes/cakephp/static/css/bootstrap.min.css \
$(THEME_DIR)/themes/cakephp/static/css/font-awesome.min.css \
$(THEME_DIR)/themes/cakephp/static/css/style.css \
$(THEME_DIR)/themes/cakephp/static/css/default.css \
$(THEME_DIR)/themes/cakephp/static/css/pygments.css \
$(THEME_DIR)/themes/cakephp/static/css/responsive.css

build/html/%/_static/css/app.css: build/html/%/_static $(CSS_FILES)
# echo all dependencies ($$^) into the output ($$@)
cat $(CSS_FILES) > $@

JS_FILES = themes/cakephp/static/jquery.js \
themes/cakephp/static/vendor.js \
themes/cakephp/static/app.js \
themes/cakephp/static/search.js \
themes/cakephp/static/typeahead.js
JS_FILES = $(THEME_DIR)/themes/cakephp/static/jquery.js \
$(THEME_DIR)/themes/cakephp/static/vendor.js \
$(THEME_DIR)/themes/cakephp/static/app.js \
$(THEME_DIR)/themes/cakephp/static/search.js \
$(THEME_DIR)/themes/cakephp/static/typeahead.js

build/html/%/_static/app.js: build/html/%/_static $(JS_FILES)
# echo all dependencies ($JS_FILES) into the output ($$@)
Expand Down
Loading

0 comments on commit 0222e87

Please sign in to comment.