Skip to content
This repository was archived by the owner on Mar 29, 2024. It is now read-only.

Commit f020968

Browse files
committed
Use Sphinx and reStruct for docs instead of Markdown [skip ci]
1 parent ddaee99 commit f020968

18 files changed

+825
-181
lines changed

.gitignore

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ configure.ac
2929
install-sh
3030
libtool
3131
ltmain.sh
32-
Makefile
32+
/Makefile
3333
Makefile.fragments
3434
Makefile.global
3535
Makefile.objects
@@ -42,6 +42,5 @@ tmp-php.ini
4242
/conftest*
4343

4444
/*.tgz
45+
.virtualenv
4546

46-
_book/
47-
node_modules/

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,15 @@ Now you can build php-v8 as usual with `phpize && ./configure && make`. Don't fo
181181

182182
### Docs
183183

184-
To start writing docs you will need to get [GitBook](https://gitbook.com), just run `npm install gitbook-cli -g` and
185-
then `gitbook serve` in project rood directory to live preview docs or `gitbook build` to build static website. See
186-
[Setup and Installation of GitBook](https://toolchain.gitbook.com/setup.html) official GitBook manual for more;
184+
We use [Sphinx](http://www.sphinx-doc.org/en/master/) to buld docs and [Read The Docs](https://readthedocs.org/) to host
185+
it.
186+
187+
To rebuild docs locally run in a project root:
188+
189+
virtualenv -p `which python` .virtualenv
190+
source .virtualenv/bin/activate
191+
cd docs
192+
make html
187193

188194
You may find [GitBook Editor](https://www.gitbook.com/editor) useful for docs writing and editing.
189195

docs/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_build

docs/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line.
5+
SPHINXOPTS =
6+
SPHINXBUILD = sphinx-build
7+
SPHINXPROJ = php-v8
8+
SOURCEDIR = .
9+
BUILDDIR = _build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/README.md

Lines changed: 0 additions & 57 deletions
This file was deleted.

docs/SUMMARY.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

docs/conf.py

Lines changed: 190 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,190 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# Configuration file for the Sphinx documentation builder.
4+
#
5+
# This file does only contain a selection of the most common options. For a
6+
# full list see the documentation:
7+
# http://www.sphinx-doc.org/en/stable/config
8+
9+
# -- Path setup --------------------------------------------------------------
10+
11+
# If extensions (or modules to document with autodoc) are in another directory,
12+
# add these directories to sys.path here. If the directory is relative to the
13+
# documentation root, use os.path.abspath to make it absolute, like shown here.
14+
#
15+
# import os
16+
# import sys
17+
# sys.path.insert(0, os.path.abspath('.'))
18+
19+
# import sys, os
20+
# from sphinx.highlighting import lexers
21+
# from pygments.lexers.web import PhpLexer
22+
#
23+
#
24+
# lexers['php'] = PhpLexer(startinline=True, linenos=1)
25+
# lexers['php-annotations'] = PhpLexer(startinline=True, linenos=1)
26+
# primary_domain = 'php'
27+
28+
29+
import sys
30+
import os
31+
import shlex
32+
from sphinx.highlighting import lexers
33+
from pygments.lexers.web import PhpLexer
34+
35+
lexers['php'] = PhpLexer(startinline=True, linenos=1)
36+
37+
primary_domain = 'php'
38+
highlight_language = 'php'
39+
40+
# -- Project information -----------------------------------------------------
41+
42+
project = u'php-v8'
43+
copyright = u'2018, Bogdan Padalko'
44+
author = u'Bogdan Padalko'
45+
46+
# The short X.Y version
47+
version = u''
48+
# The full version, including alpha/beta/rc tags
49+
release = u''
50+
51+
52+
# -- General configuration ---------------------------------------------------
53+
54+
# If your documentation needs a minimal Sphinx version, state it here.
55+
#
56+
# needs_sphinx = '1.0'
57+
58+
# Add any Sphinx extension module names here, as strings. They can be
59+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
60+
# ones.
61+
extensions = [
62+
'sphinx.ext.doctest',
63+
'sphinx.ext.todo',
64+
'sphinx.ext.coverage',
65+
'sphinxcontrib.phpdomain'
66+
#'sphinxcontrib.spelling'
67+
]
68+
69+
# Add any paths that contain templates here, relative to this directory.
70+
templates_path = ['_templates']
71+
72+
# The suffix(es) of source filenames.
73+
# You can specify multiple suffix as a list of string:
74+
#
75+
# source_suffix = ['.rst', '.md']
76+
source_suffix = '.rst'
77+
78+
# The master toctree document.
79+
master_doc = 'index'
80+
81+
# The language for content autogenerated by Sphinx. Refer to documentation
82+
# for a list of supported languages.
83+
#
84+
# This is also used if you do content translation via gettext catalogs.
85+
# Usually you set "language" from the command line for these cases.
86+
language = None
87+
88+
# List of patterns, relative to source directory, that match files and
89+
# directories to ignore when looking for source files.
90+
# This pattern also affects html_static_path and html_extra_path .
91+
exclude_patterns = [u'_build', 'Thumbs.db', '.DS_Store']
92+
93+
# The name of the Pygments (syntax highlighting) style to use.
94+
pygments_style = 'sphinx'
95+
96+
97+
# -- Options for HTML output -------------------------------------------------
98+
99+
# The theme to use for HTML and HTML Help pages. See the documentation for
100+
# a list of builtin themes.
101+
#
102+
html_theme = 'sphinx_rtd_theme'
103+
104+
# Theme options are theme-specific and customize the look and feel of a theme
105+
# further. For a list of options available for each theme, see the
106+
# documentation.
107+
#
108+
# html_theme_options = {}
109+
110+
# Add any paths that contain custom static files (such as style sheets) here,
111+
# relative to this directory. They are copied after the builtin static files,
112+
# so a file named "default.css" will overwrite the builtin "default.css".
113+
html_static_path = ['_static']
114+
115+
# Custom sidebar templates, must be a dictionary that maps document names
116+
# to template names.
117+
#
118+
# The default sidebars (for documents that don't match any pattern) are
119+
# defined by theme itself. Builtin themes are using these templates by
120+
# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
121+
# 'searchbox.html']``.
122+
#
123+
# html_sidebars = {}
124+
125+
126+
# -- Options for HTMLHelp output ---------------------------------------------
127+
128+
# Output file base name for HTML help builder.
129+
htmlhelp_basename = 'php-v8doc'
130+
131+
132+
# -- Options for LaTeX output ------------------------------------------------
133+
134+
latex_elements = {
135+
# The paper size ('letterpaper' or 'a4paper').
136+
#
137+
# 'papersize': 'letterpaper',
138+
139+
# The font size ('10pt', '11pt' or '12pt').
140+
#
141+
# 'pointsize': '10pt',
142+
143+
# Additional stuff for the LaTeX preamble.
144+
#
145+
# 'preamble': '',
146+
147+
# Latex figure (float) alignment
148+
#
149+
# 'figure_align': 'htbp',
150+
}
151+
152+
# Grouping the document tree into LaTeX files. List of tuples
153+
# (source start file, target name, title,
154+
# author, documentclass [howto, manual, or own class]).
155+
latex_documents = [
156+
(master_doc, 'php-v8.tex', u'php-v8 Documentation',
157+
u'Bogdan Padalko', 'manual'),
158+
]
159+
160+
161+
# -- Options for manual page output ------------------------------------------
162+
163+
# One entry per manual page. List of tuples
164+
# (source start file, name, description, authors, manual section).
165+
man_pages = [
166+
(master_doc, 'php-v8', u'php-v8 Documentation',
167+
[author], 1)
168+
]
169+
170+
171+
# -- Options for Texinfo output ----------------------------------------------
172+
173+
# Grouping the document tree into Texinfo files. List of tuples
174+
# (source start file, target name, title, author,
175+
# dir menu entry, description, category)
176+
texinfo_documents = [
177+
(master_doc, 'php-v8', u'php-v8 Documentation',
178+
author, 'php-v8', 'One line description of project.',
179+
'Miscellaneous'),
180+
]
181+
182+
183+
# -- Extension configuration -------------------------------------------------
184+
185+
spelling_word_list_filename='spelling_wordlist.txt'
186+
187+
# -- Options for todo extension ----------------------------------------------
188+
189+
# If true, `todo` and `todoList` produce output, else they produce nothing.
190+
todo_include_todos = True

docs/development/index.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
===============
2+
Release process
3+
===============
4+
5+
Here you can find basics to the release process
6+
7+
8+
.. toctree::
9+
:maxdepth: 3
10+
11+
release-php-v8
12+
release-libv8

docs/development/release-libv8.md

Lines changed: 0 additions & 56 deletions
This file was deleted.

0 commit comments

Comments
 (0)