Skip to content

Commit 0222e87

Browse files
authored
Merge pull request cakephp#5493 from cakephp/external-theme
RFC - Use an external theme for docs
2 parents 2e5c0b3 + 8c46cfb commit 0222e87

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+54
-7985
lines changed

.travis.yml

+16-8
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,23 @@
1-
sudo: required
1+
addons:
2+
apt:
3+
packages:
4+
- texlive-latex-recommended
5+
- texlive-latex-extra
6+
- texlive-fonts-recommended
7+
- texlive-lang-all
28

3-
services:
4-
- docker
9+
language: python
510

6-
before_install:
7-
- docker pull cakephpfr/docs
11+
env:
12+
matrix:
13+
- HTML=1
14+
- EPUB=1
15+
- PDF=1
816

917
script:
10-
- docker run -it --rm -v $(pwd):/data cakephpfr/docs:light make html SPHINXOPTS='-W'
11-
- docker run -it --rm -v $(pwd):/data cakephpfr/docs make epub
12-
- docker run -it --rm -v $(pwd):/data cakephpfr/docs make latex
18+
- if [ $HTML = '1' ]; then make html; fi
19+
- if [ $EPUB = '1' ]; then make epub; fi
20+
- if [ $PDF = '1' ]; then make latex; fi
1321

1422
notifications:
1523
email: false

Makefile

+15-12
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ DEST = website
1919
# Clone the en/Makefile everywhere.
2020
SPHINX_DEPENDENCIES = $(foreach lang, $(LANGS), $(lang)/Makefile)
2121

22+
# Get path to theme directory to build static assets.
23+
THEME_DIR = $(shell python -c 'import os, cakephpsphinx; print os.path.abspath(os.path.dirname(cakephpsphinx.__file__))')
24+
2225
# Copy-paste the English Makefile everywhere it's needed (if non existing).
2326
%/Makefile: en/Makefile
2427
cp -n $< $@
@@ -96,23 +99,23 @@ clean-website:
9699
build/html/%/_static:
97100
mkdir -p build/html/$*/_static
98101

99-
CSS_FILES = themes/cakephp/static/css/fonts.css \
100-
themes/cakephp/static/css/bootstrap.min.css \
101-
themes/cakephp/static/css/font-awesome.min.css \
102-
themes/cakephp/static/css/style.css \
103-
themes/cakephp/static/css/default.css \
104-
themes/cakephp/static/css/pygments.css \
105-
themes/cakephp/static/css/responsive.css
102+
CSS_FILES = $(THEME_DIR)/themes/cakephp/static/css/fonts.css \
103+
$(THEME_DIR)/themes/cakephp/static/css/bootstrap.min.css \
104+
$(THEME_DIR)/themes/cakephp/static/css/font-awesome.min.css \
105+
$(THEME_DIR)/themes/cakephp/static/css/style.css \
106+
$(THEME_DIR)/themes/cakephp/static/css/default.css \
107+
$(THEME_DIR)/themes/cakephp/static/css/pygments.css \
108+
$(THEME_DIR)/themes/cakephp/static/css/responsive.css
106109

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

111-
JS_FILES = themes/cakephp/static/jquery.js \
112-
themes/cakephp/static/vendor.js \
113-
themes/cakephp/static/app.js \
114-
themes/cakephp/static/search.js \
115-
themes/cakephp/static/typeahead.js
114+
JS_FILES = $(THEME_DIR)/themes/cakephp/static/jquery.js \
115+
$(THEME_DIR)/themes/cakephp/static/vendor.js \
116+
$(THEME_DIR)/themes/cakephp/static/app.js \
117+
$(THEME_DIR)/themes/cakephp/static/search.js \
118+
$(THEME_DIR)/themes/cakephp/static/typeahead.js
116119

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

0 commit comments

Comments
 (0)