Skip to content

Commit b37baa1

Browse files
authored
Convert to Sphinx! (#55)
* Convert to Sphinx! * Try to fix MarkupSafe dependency * Use fix provided by Platform.sh team * Use ReadTheDocs theme for now * More tweaks to build * Port theme work by qodeone * Content tweaks * Tweaks to content * More tweaks * Fix bad import * Try styling pygments * Revert "Try styling pygments" This reverts commit 2f0ccc2. * Hide the toggles * Final tweaks * Update Travis
1 parent 8c65aa9 commit b37baa1

File tree

131 files changed

+3375
-2283
lines changed

Some content is hidden

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

131 files changed

+3375
-2283
lines changed

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,8 @@ _book
1717

1818
.DS_Store
1919
.idea
20+
21+
/_build/doctrees
22+
/_build/html
23+
/_build/epub
24+
*.pyc

.platform.app.yaml

+14-15
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,19 @@
55
name: php
66

77
# The toolstack used to build the application.
8-
type: php
8+
type: "php"
9+
build:
10+
flavor: "composer"
911

1012
# The configuration of app when it is exposed to the web.
1113
web:
1214
# The public directory of the app, relative to its root.
13-
document_root: "/_book"
14-
passthru: index.html
15+
document_root: "/_build/html"
1516
index_files:
1617
- index.html
17-
expires: 300
1818
whitelist:
1919
- \.html$
20-
21-
# GitBook search indexes.
22-
- search_index\.json$
20+
- \.txt$
2321

2422
# CSS and Javascript.
2523
- \.css$
@@ -39,22 +37,23 @@ web:
3937
# robots.txt.
4038
- /robots\.txt$
4139

42-
# gitbook ico
4340
- \.ico$
4441

4542
# The size of the persistent disk of the application (in MB).
4643
disk: 2048
4744

4845
# Build time dependencies.
4946
dependencies:
50-
nodejs:
51-
gitbook-cli: "*"
47+
python:
48+
virtualenv: 15.1.0
5249

5350
# The hooks that will be performed when the package is deployed.
5451
hooks:
5552
build: |
56-
gitbook install
57-
gitbook build
58-
# We run deploy hook after your application has been deployed and started.
59-
deploy: |
60-
cp -f /app/images/favicon.ico /app/_book/gitbook/images/favicon.ico
53+
virtualenv .virtualenv
54+
. .virtualenv/bin/activate
55+
# Platform.sh currently sets PIP_USER=1.
56+
export PIP_USER=
57+
pip install pip==9.0.1 wheel==0.29.0
58+
pip install -r requirements.txt
59+
make -C _build html

.platform/services.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Nothing

.travis.yml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
language: python
2+
3+
python: 2.7
4+
5+
sudo: false
6+
cache:
7+
directories: [$HOME/.cache/pip]
8+
9+
install: pip install -r requirements.txt
10+
11+
script: ./build.sh

README.md

-17
This file was deleted.

SUMMARY.md

+46-46
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,53 @@
11
# Summary
22

3-
* [Introduction](README.md)
4-
* [Commerce 1.x](v1/README.md)
5-
* [Commerce 2.x](v2/README.md)
6-
* [Getting started](v2/getting-started.md)
7-
* [Composer: the what, why, and how](v2/getting-started/composer.md)
8-
* [Installing Drupal Commerce](v2/getting-started/install.md)
9-
* [Applying updates](v2/getting-started/update.md)
3+
* [Introduction](README.rst)
4+
* [Commerce 1.x](v1/README.rst)
5+
* [Commerce 2.x](v2/README.rst)
6+
* [Getting started](v2/getting-started.rst)
7+
* [Composer: the what, why, and how](v2/getting-started/composer.rst)
8+
* [Installing Drupal Commerce](v2/getting-started/install.rst)
9+
* [Applying updates](v2/getting-started/update.rst)
1010
* Contributing
11-
* [Setting up an environment](v2/getting-started/contributing/development-environment.md)
12-
* [Get started with contributing](v2/getting-started/contributing/developing.md)
13-
* [Libraries and dependencies](v2/building-blocks/index.md)
14-
* [Address](v2/building-blocks/address/README.md)
15-
* [Zones](v2/building-blocks/address/zones.md)
16-
* [Profile](v2/building-blocks/profile.md)
17-
* [State Machine](v2/building-blocks/state-machine.md)
18-
* [Inline Entity Form](v2/building-blocks/ief.md)
19-
* [Currency](v2/building-blocks/currency.md)
20-
* [Setting up stores](v2/store.md)
21-
* [Managing products](v2/product/index.md)
22-
* [Setup product attributes](v2/product/product-attributes.md)
23-
* [Make a product](v2/product/products.md)
24-
* [Create a product type](v2/product/product-type.md)
25-
* [Purchasable Entities](v2/product/purchasable-entities.md)
26-
* [Catalog and product pages](v2/product/catalog-and-product-pages.md)
27-
* [Create a product catalog](v2/product/create-a-product-catalog.md)
28-
* [Customize the add to cart form](v2/product/customize-the-add-to-cart-form.md)
29-
* [Theme a product page](v2/product/theme-a-product-page.md)
30-
* [Product merchandising](v2/using-promotions.md)
31-
* [Create a promotion](v2/creating-a-promotion.md)
32-
* [Working with orders](v2/orders/index.md)
33-
* [Understanding order types](v2/orders/order-types.md)
34-
* [Orders and order items](v2/orders/order-items.md)
11+
* [Setting up an environment](v2/getting-started/contributing/development-environment.rst)
12+
* [Get started with contributing](v2/getting-started/contributing/developing.rst)
13+
* [Libraries and dependencies](v2/building-blocks/index.rst)
14+
* [Address](v2/building-blocks/address/README.rst)
15+
* [Zones](v2/building-blocks/address/zones.rst)
16+
* [Profile](v2/building-blocks/profile.rst)
17+
* [State Machine](v2/building-blocks/state-machine.rst)
18+
* [Inline Entity Form](v2/building-blocks/ief.rst)
19+
* [Currency](v2/building-blocks/currency.rst)
20+
* [Setting up stores](v2/store.rst)
21+
* [Managing products](v2/product/index.rst)
22+
* [Setup product attributes](v2/product/product-attributes.rst)
23+
* [Make a product](v2/product/products.rst)
24+
* [Create a product type](v2/product/product-type.rst)
25+
* [Purchasable Entities](v2/product/purchasable-entities.rst)
26+
* [Catalog and product pages](v2/product/catalog-and-product-pages.rst)
27+
* [Create a product catalog](v2/product/create-a-product-catalog.rst)
28+
* [Customize the add to cart form](v2/product/customize-the-add-to-cart-form.rst)
29+
* [Theme a product page](v2/product/theme-a-product-page.rst)
30+
* [Product merchandising](v2/using-promotions.rst)
31+
* [Create a promotion](v2/creating-a-promotion.rst)
32+
* [Working with orders](v2/orders/index.rst)
33+
* [Understanding order types](v2/orders/order-types.rst)
34+
* [Orders and order items](v2/orders/order-items.rst)
3535
* Advanced topics
36-
* [Order Processing](v2/orders/order-processing.md)
36+
* [Order Processing](v2/orders/order-processing.rst)
3737
* Code recipes
38-
* [Configuring checkout](v2/checkout/index.md)
39-
* [Allowing guest checkout, or account login](v2/checkout/guest.md)
40-
* [Customizing your checkout](v2/checkout/customize.md)
38+
* [Configuring checkout](v2/checkout/index.rst)
39+
* [Allowing guest checkout, or account login](v2/checkout/guest.rst)
40+
* [Customizing your checkout](v2/checkout/customize.rst)
4141
* Advanced topics
42-
* [Creating a checkout pane plugin](v2/checkout/checkout-pane-plugin.md)
43-
* [Creating a checkout flow plugin](v2/checkout/creating-a-checkout-flow-plugin.md)
44-
* [Payments](v2/setting-up-payments.md)
45-
* [Install a payment gateway](v2/install-a-payment-gateway.md)
46-
* [Managing order payments](v2/managing-order-payments.md)
47-
* [Code recipes](v2/recipes/index.md)
48-
* [Stores](v2/recipes/stores.md)
49-
* [Variations](v2/recipes/variations.md)
50-
* [Attributes](v2/recipes/attributes.md)
51-
* [Products](v2/recipes/products.md)
52-
* [Orders](v2/recipes/orders.md)
42+
* [Creating a checkout pane plugin](v2/checkout/checkout-pane-plugin.rst)
43+
* [Creating a checkout flow plugin](v2/checkout/creating-a-checkout-flow-plugin.rst)
44+
* [Payments](v2/setting-up-payments.rst)
45+
* [Install a payment gateway](v2/install-a-payment-gateway.rst)
46+
* [Managing order payments](v2/managing-order-payments.rst)
47+
* [Code recipes](v2/recipes/index.rst)
48+
* [Stores](v2/recipes/stores.rst)
49+
* [Variations](v2/recipes/variations.rst)
50+
* [Attributes](v2/recipes/attributes.rst)
51+
* [Products](v2/recipes/products.rst)
52+
* [Orders](v2/recipes/orders.rst)
5353

_build/Makefile

+153
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
# Makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line.
5+
SPHINXOPTS =
6+
SPHINXBUILD = sphinx-build
7+
PAPER =
8+
BUILDDIR = .
9+
10+
# Internal variables.
11+
PAPEROPT_a4 = -D latex_paper_size=a4
12+
PAPEROPT_letter = -D latex_paper_size=letter
13+
ALLSPHINXOPTS = -c $(BUILDDIR) -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) ../
14+
# the i18n builder cannot share the environment and doctrees with the others
15+
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
16+
17+
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
18+
19+
help:
20+
@echo "Please use \`make <target>' where <target> is one of"
21+
@echo " html to make standalone HTML files"
22+
@echo " dirhtml to make HTML files named index.html in directories"
23+
@echo " singlehtml to make a single large HTML file"
24+
@echo " pickle to make pickle files"
25+
@echo " json to make JSON files"
26+
@echo " htmlhelp to make HTML files and a HTML help project"
27+
@echo " qthelp to make HTML files and a qthelp project"
28+
@echo " devhelp to make HTML files and a Devhelp project"
29+
@echo " epub to make an epub"
30+
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
31+
@echo " latexpdf to make LaTeX files and run them through pdflatex"
32+
@echo " text to make text files"
33+
@echo " man to make manual pages"
34+
@echo " texinfo to make Texinfo files"
35+
@echo " info to make Texinfo files and run them through makeinfo"
36+
@echo " gettext to make PO message catalogs"
37+
@echo " changes to make an overview of all changed/added/deprecated items"
38+
@echo " linkcheck to check all external links for integrity"
39+
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
40+
41+
clean:
42+
-rm -rf $(BUILDDIR)/*
43+
44+
html:
45+
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
46+
@echo
47+
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
48+
49+
dirhtml:
50+
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
51+
@echo
52+
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
53+
54+
singlehtml:
55+
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
56+
@echo
57+
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
58+
59+
pickle:
60+
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
61+
@echo
62+
@echo "Build finished; now you can process the pickle files."
63+
64+
json:
65+
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
66+
@echo
67+
@echo "Build finished; now you can process the JSON files."
68+
69+
htmlhelp:
70+
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
71+
@echo
72+
@echo "Build finished; now you can run HTML Help Workshop with the" \
73+
".hhp project file in $(BUILDDIR)/htmlhelp."
74+
75+
qthelp:
76+
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
77+
@echo
78+
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
79+
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
80+
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Symfony.qhcp"
81+
@echo "To view the help file:"
82+
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Symfony.qhc"
83+
84+
devhelp:
85+
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
86+
@echo
87+
@echo "Build finished."
88+
@echo "To view the help file:"
89+
@echo "# mkdir -p $$HOME/.local/share/devhelp/Symfony"
90+
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Symfony"
91+
@echo "# devhelp"
92+
93+
epub:
94+
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
95+
@echo
96+
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
97+
98+
latex:
99+
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
100+
@echo
101+
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
102+
@echo "Run \`make' in that directory to run these through (pdf)latex" \
103+
"(use \`make latexpdf' here to do that automatically)."
104+
105+
latexpdf:
106+
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
107+
@echo "Running LaTeX files through pdflatex..."
108+
$(MAKE) -C $(BUILDDIR)/latex all-pdf
109+
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
110+
111+
text:
112+
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
113+
@echo
114+
@echo "Build finished. The text files are in $(BUILDDIR)/text."
115+
116+
man:
117+
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
118+
@echo
119+
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
120+
121+
texinfo:
122+
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
123+
@echo
124+
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
125+
@echo "Run \`make' in that directory to run these through makeinfo" \
126+
"(use \`make info' here to do that automatically)."
127+
128+
info:
129+
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
130+
@echo "Running Texinfo files through makeinfo..."
131+
make -C $(BUILDDIR)/texinfo info
132+
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
133+
134+
gettext:
135+
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
136+
@echo
137+
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
138+
139+
changes:
140+
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
141+
@echo
142+
@echo "The overview file is in $(BUILDDIR)/changes."
143+
144+
linkcheck:
145+
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
146+
@echo
147+
@echo "Link check complete; look for any errors in the above output " \
148+
"or in $(BUILDDIR)/linkcheck/output.txt."
149+
150+
doctest:
151+
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
152+
@echo "Testing of doctests in the sources finished, look at the " \
153+
"results in $(BUILDDIR)/doctest/output.txt."

0 commit comments

Comments
 (0)