Update the instructions to build docs

This commit is contained in:
Javier Eguiluz
2021-11-03 15:45:47 +01:00
parent c664836c78
commit 4a79e18f6b
18 changed files with 400 additions and 1125 deletions

View File

@@ -1,8 +0,0 @@
/.git
/_build/doctrees
/_build/spelling
/_build/html
/_build/logs.txt
/_build/vendor
/_build/output
*.pyc

5
.gitignore vendored
View File

@@ -1,7 +1,2 @@
/_build/doctrees
/_build/spelling
/_build/html
/_build/logs.txt
/_build/vendor
/_build/output
*.pyc

View File

@@ -1,20 +0,0 @@
FROM python:2-alpine as builder
WORKDIR /www
COPY ./_build/.requirements.txt _build/
RUN apk add \
git \
make
RUN pip install pip==9.0.1 wheel==0.29.0 \
&& pip install -r _build/.requirements.txt
COPY . /www
RUN make -C _build html
FROM nginx:alpine
COPY --from=builder /www/_build/html /usr/share/nginx/html

View File

@@ -19,34 +19,27 @@
Contributing
------------
We love contributors! For more information on how you can contribute to the
Symfony documentation, please read
[Contributing to the Documentation](https://symfony.com/doc/current/contributing/documentation/overview.html)
We love contributors! For more information on how you can contribute, please read
the [Symfony Docs Contributing Guide](https://symfony.com/doc/current/contributing/documentation/overview.html)
> **Note**
> All pull requests must be based on the ``4.4`` branch,
> unless you are documenting a feature that was introduced *after* Symfony 4.4
> (e.g. in Symfony 5.2), **not** the ``5.x`` or older branches.
**Important**: use `4.4` branch as the base of your pull requests, unless you are
documenting a feature that was introduced *after* Symfony 4.4 (e.g. in Symfony 5.2).
SymfonyCloud
------------
Build Documentation Locally
---------------------------
Thanks to [SymfonyCloud](https://symfony.com/cloud) for providing an integration
server where Pull Requests are built and can be reviewed by contributors.
Docker
------
You can build the documentation project locally with these commands:
This is not needed for contributing, but it's useful if you want to debug some
issue in the docs or if you want to read Symfony Documentation offline.
```bash
# build the image...
$ docker build . -t symfony-docs
$ git clone git@github.com:symfony/symfony-docs.git
# ...and start the local web server
# (if it's already in use, change the '8080' port by any other port)
$ docker run --rm -p 8080:80 symfony-docs
$ cd symfony-docs/
$ cd _build/
$ composer install
$ php build.php
```
You can now read the docs at http://127.0.0.1:8080 (if you use a virtual
machine, browse its IP instead of localhost; e.g. `http://192.168.99.100:8080`).
Now you can browse the docs at `_build/output/index.html`

View File

@@ -1,6 +0,0 @@
docutils==0.13.1
Pygments==2.2.0
sphinx==1.8.5
git+https://github.com/fabpot/sphinx-php.git@v2.0.0#egg_name=sphinx-php
jsx-lexer===0.0.8
sphinx_rtd_theme==0.5.0

View File

@@ -1,153 +0,0 @@
# Makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = .
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -c $(BUILDDIR) -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) ../
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " html to make standalone HTML files"
@echo " dirhtml to make HTML files named index.html in directories"
@echo " singlehtml to make a single large HTML file"
@echo " pickle to make pickle files"
@echo " json to make JSON files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " qthelp to make HTML files and a qthelp project"
@echo " devhelp to make HTML files and a Devhelp project"
@echo " epub to make an epub"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " latexpdf to make LaTeX files and run them through pdflatex"
@echo " text to make text files"
@echo " man to make manual pages"
@echo " texinfo to make Texinfo files"
@echo " info to make Texinfo files and run them through makeinfo"
@echo " gettext to make PO message catalogs"
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
clean:
-rm -rf $(BUILDDIR)/*
html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
dirhtml:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
singlehtml:
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
@echo
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
pickle:
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
@echo
@echo "Build finished; now you can process the pickle files."
json:
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
@echo
@echo "Build finished; now you can process the JSON files."
htmlhelp:
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in $(BUILDDIR)/htmlhelp."
qthelp:
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Symfony.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Symfony.qhc"
devhelp:
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/Symfony"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Symfony"
@echo "# devhelp"
epub:
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
latex:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
@echo "Run \`make' in that directory to run these through (pdf)latex" \
"(use \`make latexpdf' here to do that automatically)."
latexpdf:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through pdflatex..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
text:
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
@echo
@echo "Build finished. The text files are in $(BUILDDIR)/text."
man:
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
@echo
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
texinfo:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
@echo "Run \`make' in that directory to run these through makeinfo" \
"(use \`make info' here to do that automatically)."
info:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo "Running Texinfo files through makeinfo..."
make -C $(BUILDDIR)/texinfo info
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
gettext:
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
@echo
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
changes:
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
@echo
@echo "The overview file is in $(BUILDDIR)/changes."
linkcheck:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."
doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."

View File

@@ -1,86 +0,0 @@
from pygments.style import Style
from pygments.token import Keyword, Name, Comment, String, Error, \
Number, Operator, Generic, Whitespace, Punctuation, Other, Literal
class SensioStyle(Style):
background_color = "#000000"
default_style = ""
styles = {
# No corresponding class for the following:
#Text: "", # class: ''
Whitespace: "underline #f8f8f8", # class: 'w'
Error: "#a40000 border:#ef2929", # class: 'err'
Other: "#ffffff", # class 'x'
Comment: "italic #B729D9", # class: 'c'
Comment.Single: "italic #B729D9", # class: 'c1'
Comment.Multiline: "italic #B729D9", # class: 'cm'
Comment.Preproc: "noitalic #aaa", # class: 'cp'
Keyword: "#FF8400", # class: 'k'
Keyword.Constant: "#FF8400", # class: 'kc'
Keyword.Declaration: "#FF8400", # class: 'kd'
Keyword.Namespace: "#FF8400", # class: 'kn'
Keyword.Pseudo: "#FF8400", # class: 'kp'
Keyword.Reserved: "#FF8400", # class: 'kr'
Keyword.Type: "#FF8400", # class: 'kt'
Operator: "#E0882F", # class: 'o'
Operator.Word: "#E0882F", # class: 'ow' - like keywords
Punctuation: "#999999", # class: 'p'
# because special names such as Name.Class, Name.Function, etc.
# are not recognized as such later in the parsing, we choose them
# to look the same as ordinary variables.
Name: "#ffffff", # class: 'n'
Name.Attribute: "#ffffff", # class: 'na' - to be revised
Name.Builtin: "#ffffff", # class: 'nb'
Name.Builtin.Pseudo: "#3465a4", # class: 'bp'
Name.Class: "#ffffff", # class: 'nc' - to be revised
Name.Constant: "#ffffff", # class: 'no' - to be revised
Name.Decorator: "#888", # class: 'nd' - to be revised
Name.Entity: "#ce5c00", # class: 'ni'
Name.Exception: "#cc0000", # class: 'ne'
Name.Function: "#ffffff", # class: 'nf'
Name.Property: "#ffffff", # class: 'py'
Name.Label: "#f57900", # class: 'nl'
Name.Namespace: "#ffffff", # class: 'nn' - to be revised
Name.Other: "#ffffff", # class: 'nx'
Name.Tag: "#cccccc", # class: 'nt' - like a keyword
Name.Variable: "#ffffff", # class: 'nv' - to be revised
Name.Variable.Class: "#ffffff", # class: 'vc' - to be revised
Name.Variable.Global: "#ffffff", # class: 'vg' - to be revised
Name.Variable.Instance: "#ffffff", # class: 'vi' - to be revised
Number: "#1299DA", # class: 'm'
Literal: "#ffffff", # class: 'l'
Literal.Date: "#ffffff", # class: 'ld'
String: "#56DB3A", # class: 's'
String.Backtick: "#56DB3A", # class: 'sb'
String.Char: "#56DB3A", # class: 'sc'
String.Doc: "italic #B729D9", # class: 'sd' - like a comment
String.Double: "#56DB3A", # class: 's2'
String.Escape: "#56DB3A", # class: 'se'
String.Heredoc: "#56DB3A", # class: 'sh'
String.Interpol: "#56DB3A", # class: 'si'
String.Other: "#56DB3A", # class: 'sx'
String.Regex: "#56DB3A", # class: 'sr'
String.Single: "#56DB3A", # class: 's1'
String.Symbol: "#56DB3A", # class: 'ss'
Generic: "#ffffff", # class: 'g'
Generic.Deleted: "#a40000", # class: 'gd'
Generic.Emph: "italic #ffffff", # class: 'ge'
Generic.Error: "#ef2929", # class: 'gr'
Generic.Heading: "#000080", # class: 'gh'
Generic.Inserted: "#00A000", # class: 'gi'
Generic.Output: "#888", # class: 'go'
Generic.Prompt: "#745334", # class: 'gp'
Generic.Strong: "bold #ffffff", # class: 'gs'
Generic.Subheading: "bold #800080", # class: 'gu'
Generic.Traceback: "bold #a40000", # class: 'gt'
}

View File

@@ -1,23 +0,0 @@
from pygments.lexer import RegexLexer, bygroups, using
from pygments.token import *
from pygments.lexers.shell import BashLexer, BatchLexer
class TerminalLexer(RegexLexer):
name = 'Terminal'
aliases = ['terminal']
filenames = []
tokens = {
'root': [
('^\$', Generic.Prompt, 'bash-prompt'),
('^>', Generic.Prompt, 'dos-prompt'),
('^#.+$', Comment.Single),
('^.+$', Generic.Output),
],
'bash-prompt': [
('(.+)$', bygroups(using(BashLexer)), '#pop')
],
'dos-prompt': [
('(.+)$', bygroups(using(BatchLexer)), '#pop')
],
}

View File

@@ -1,23 +0,0 @@
body {
font-family:Lucida Grande,Lucida Sans Unicode,Lucida Sans,Geneva,Verdana,sans-serif !important;
}
h1, h2, h3, h4, h5, h6 {
font-family:Georgia,Times New Roman,Times,serif !important;
line-height:1.2 !important;
margin-top:0 !important;
margin-bottom:.5em !important;
}
p, .rst-content li{
font-size:14px !important;
line-height:1.45 !important;
}
.wy-menu-vertical a {
font-size:14px !important;
padding-right:0 !important;
}
.highlight {
background:#1e2125 !important;
color:#fafafa !important;
}

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="260" height="66" viewBox="0 0 260 66"><circle fill="#1A171B" cx="32.455" cy="32.665" r="32.455"/><path fill="#FFF" d="M46.644 12.219c-3.297.115-6.175 1.932-8.317 4.446-2.372 2.756-3.95 6.025-5.087 9.362-2.034-1.667-3.603-3.825-6.866-4.766-2.522-.724-5.171-.425-7.607 1.39-1.154.862-1.949 2.165-2.327 3.39-.979 3.183 1.029 6.016 1.941 7.033l1.994 2.137c.411.419 1.401 1.512.917 3.079-.523 1.704-2.577 2.807-4.684 2.157-.941-.287-2.293-.988-1.99-1.975.125-.404.414-.706.569-1.055.142-.3.21-.525.253-.657.385-1.257-.141-2.892-1.487-3.307-1.256-.385-2.541-.08-3.039 1.537-.565 1.837.314 5.171 5.023 6.623 5.517 1.695 10.184-1.309 10.846-5.227.417-2.454-.691-4.277-2.721-6.622l-1.654-1.829c-1.002-1.001-1.346-2.707-.309-4.018.875-1.106 2.121-1.578 4.162-1.023 2.979.809 4.307 2.876 6.523 4.543-.915 3.001-1.513 6.013-2.054 8.714l-.33 2.014c-1.584 8.308-2.793 12.87-5.935 15.489-.633.45-1.538 1.124-2.902 1.171-.715.022-.946-.47-.956-.684-.017-.502.406-.732.687-.958.42-.229 1.055-.609 1.012-1.826-.046-1.438-1.237-2.685-2.959-2.628-1.29.044-3.256 1.258-3.182 3.48.077 2.295 2.216 4.015 5.441 3.906 1.724-.059 5.574-.761 9.368-5.271 4.416-5.17 5.651-11.097 6.58-15.435l1.037-5.727c.576.069 1.192.115 1.862.131 5.5.116 8.251-2.733 8.292-4.805.027-1.254-.823-2.488-2.013-2.46-.852.024-1.922.591-2.179 1.769-.251 1.156 1.75 2.199.186 3.212-1.111.719-3.103 1.226-5.908.814l.51-2.819c1.041-5.346 2.325-11.922 7.196-12.082.355-.018 1.654.016 1.684.875.009.287-.062.36-.398 1.017-.342.512-.471.948-.455 1.449.047 1.365 1.085 2.262 2.586 2.208 2.01-.065 2.588-2.022 2.555-3.027-.081-2.361-2.57-3.853-5.865-3.745z"/><path fill="#1A171B" d="M196.782 23.534c7.48 0 12.499 5.407 12.499 12.887 0 7.048-5.116 12.886-12.499 12.886-7.435 0-12.55-5.838-12.55-12.886 0-7.48 5.018-12.887 12.55-12.887zm0 22.109c5.306 0 7.671-4.827 7.671-9.222 0-4.68-2.847-9.217-7.671-9.217-4.877 0-7.724 4.537-7.724 9.217.001 4.394 2.365 9.222 7.724 9.222zM183.61 25.825v-1.713h-6.518v-2.341c0-3.33.483-5.842 4.391-5.842.072 0 .149.005.224.008.008 0 .007-.012.016-.012 1.085.08 1.987-.804 2.048-1.887l.08-1.486c-.915-.146-1.884-.29-3.039-.29-6.709 0-8.255 3.91-8.255 9.896v1.955h-5.795v1.913c.149.99.996 1.752 2.031 1.752.006 0 .009.005.016.005h3.748V48.73h2.5l.006-.001c1.04 0 1.892-.779 2.03-1.779V27.783h4.538a2.052 2.052 0 0 0 1.979-1.958zm-60.435-1.713c-.008 0-.013.006-.024.006-.956 0-1.882.657-2.286 1.545l-6.244 18.82h-.096l-6.106-18.81c-.399-.893-1.329-1.555-2.291-1.555-.011 0-.015-.006-.024-.006h-3.164l8.351 22.977c.291.821.871 2.077.871 2.606 0 .483-1.353 6.08-5.409 6.08-.1 0-.201-.009-.3-.017-1.034-.057-1.815.665-1.989 1.779l-.124 1.57c.82.145 1.645.338 3.092.338 5.984 0 7.769-5.455 9.46-10.185l9.073-25.149h-2.79zm-28.843 5c-3.747-1.917-7.847-3.218-7.918-7.076.012-4.097 3.776-5.172 6.677-5.169.012-.002.024-.002.031-.002 1.26 0 2.268.125 3.251.34.013 0 .011-.016.027-.016 1.039.076 1.911-.737 2.034-1.762l.083-1.488c-1.902-.473-3.889-.712-5.619-.712-6.309.039-10.992 3.213-11.007 9.268.009 5.296 3.578 7.349 7.416 9.207 3.764 1.81 7.888 3.305 7.924 7.674-.023 4.56-4.423 6.241-7.455 6.247-1.773-.006-3.698-.449-5.32-.96-1.017-.168-1.851.729-1.982 1.917l-.138 1.327c2.23.72 4.517 1.348 6.815 1.348h.027c7.065-.051 12.557-2.869 12.578-10.185-.011-5.645-3.604-8.016-7.424-9.958zm68.623 19.617l.006-.001c.98 0 1.796-.687 2.004-1.604V32.947c0-5.358-2.267-9.413-8.546-9.413-2.219 0-5.934 1.257-7.623 4.779-1.306-3.331-4.15-4.779-7-4.779-3.619 0-6.082 1.303-7.816 4.152h-.099v-1.532a2.058 2.058 0 0 0-2.055-2.036c-.008 0-.014-.006-.022-.006h-2.169v24.617h2.456l.006-.001a2.06 2.06 0 0 0 2.059-2.059c0-.03.011-.042.016-.063v-10.28c0-4.585 1.834-9.122 6.467-9.122 3.669 0 4.396 3.811 4.396 6.853V48.73h2.49l.007-.001a2.05 2.05 0 0 0 2.037-1.873v-10.53c0-4.585 1.835-9.122 6.468-9.122 3.667 0 4.393 3.811 4.393 6.853V48.73h2.525zm70.113 0l.008-.001a2.054 2.054 0 0 0 2.049-1.964v-12.66c0-6.611-2.85-10.571-9.222-10.571-3.426 0-6.705 1.691-8.059 4.491h-.097v-1.839c0-.001-.004-.001-.004-.006a2.057 2.057 0 0 0-2.058-2.061c-.011 0-.015-.006-.022-.006h-2.311v24.617h2.493l.007-.001a2.05 2.05 0 0 0 2.038-1.895v-9.495c0-5.984 2.319-10.135 7.482-10.135 3.96.24 5.211 3.038 5.211 8.783v12.742h2.485zm24.428-24.617c-.011 0-.014.006-.026.006-.954 0-1.883.657-2.283 1.545l-6.242 18.82h-.102l-6.104-18.81c-.401-.893-1.331-1.555-2.293-1.555-.007 0-.015-.006-.021-.006h-3.164l8.351 22.977c.291.821.873 2.077.873 2.606 0 .483-1.355 6.08-5.41 6.08-.102 0-.201-.009-.301-.017-1.033-.057-1.815.665-1.99 1.779l-.122 1.57c.82.145 1.645.338 3.091.338 5.984 0 7.772-5.455 9.462-10.185l9.074-25.149h-2.793z"/></svg>

Before

Width:  |  Height:  |  Size: 4.5 KiB

View File

@@ -5,39 +5,52 @@ require __DIR__.'/vendor/autoload.php';
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Process\Process;
use Symfony\Component\Process\Exception\ProcessFailedException;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Style\SymfonyStyle;
use SymfonyDocsBuilder\BuildConfig;
use SymfonyDocsBuilder\DocBuilder;
(new Application('Symfony Docs Builder', '1.0'))
->register('build-docs')
->addOption('generate-fjson-files', null, InputOption::VALUE_NONE, 'Use this option to generate docs both in HTML and JSON formats')
->addOption('disable-cache', null, InputOption::VALUE_NONE, 'Use this option to force a full regeneration of all doc contents')
->setCode(function(InputInterface $input, OutputInterface $output) {
$command = [
'php',
'vendor/symfony/docs-builder/bin/console',
'build:docs',
sprintf('--save-errors=%s', __DIR__.'/logs.txt'),
__DIR__.'/../',
__DIR__.'/output/',
];
$io = new SymfonyStyle($input, $output);
$io->text('Building all Symfony Docs...');
if ($input->getOption('generate-fjson-files')) {
$command[] = '--output-json';
$outputDir = __DIR__.'/output';
$buildConfig = (new BuildConfig())
->setSymfonyVersion('4.4')
->setContentDir(__DIR__.'/..')
->setOutputDir($outputDir)
->setImagesDir(__DIR__.'/output/_images')
->setImagesPublicPrefix('_images')
->setTheme('sfdocs')
;
$buildConfig->setExcludedPaths(['.github/', '_build/']);
if (!$generateJsonFiles = $input->getOption('generate-fjson-files')) {
$buildConfig->disableJsonFileGeneration();
}
if ($input->getOption('disable-cache')) {
$command[] = '--disable-cache';
if ($isCacheDisabled = $input->getOption('disable-cache')) {
$buildConfig->disableBuildCache();
}
$process = new Process($command);
$process->setTimeout(3600);
$io->comment(sprintf('cache: %s / output file type(s): %s', $isCacheDisabled ? 'disabled' : 'enabled', $generateJsonFiles ? 'HTML and JSON' : 'HTML'));
if (!$isCacheDisabled) {
$io->comment('Tip: add the --disable-cache option to this command to force the re-build of all docs.');
}
$this->getHelper('process')->run($output, $process);
$result = (new DocBuilder())->build($buildConfig);
if (!$process->isSuccessful()) {
throw new ProcessFailedException($process);
if ($result->isSuccessful()) {
$io->success(sprintf("The Symfony Docs were successfully built at %s", realpath($outputDir)));
} else {
$io->error(sprintf("There were some errors while building the docs:\n\n%s\n", $result->getErrorTrace()));
$io->newLine();
$io->comment('Tip: you can add the -v, -vv or -vvv flags to this command to get debug information.');
}
})
->getApplication()

View File

@@ -12,8 +12,8 @@
},
"require": {
"php": ">=7.4",
"symfony/console": "^5.2",
"symfony/process": "^5.2",
"symfony-tools/docs-builder": "^0.15.0"
"symfony/console": "^5.4",
"symfony/process": "^5.4",
"symfony-tools/docs-builder": "^0.18"
}
}

537
_build/composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,301 +0,0 @@
# -*- coding: utf-8 -*-
#
# Symfony documentation build configuration file, created by
# sphinx-quickstart on Sat Jul 28 21:58:57 2012.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
import sys, os
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.append(os.path.abspath('_exts'))
# adding PhpLexer
from sphinx.highlighting import lexers
from pygments.lexers.compiled import CLexer
from pygments.lexers.shell import BashLexer
from pygments.lexers.special import TextLexer
from pygments.lexers.text import RstLexer
from pygments.lexers.web import PhpLexer
from symfonycom.sphinx.lexer import TerminalLexer
# -- General configuration -----------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
needs_sphinx = '1.8.5'
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = [
'sphinx.ext.autodoc', 'sphinx.ext.doctest',
'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.ifconfig',
'sphinx.ext.viewcode', 'sphinx.ext.extlinks',
'sensio.sphinx.codeblock', 'sensio.sphinx.configurationblock', 'sensio.sphinx.phpcode', 'sensio.sphinx.bestpractice'
#,'sphinxcontrib.spelling'
]
#spelling_show_sugestions=True
#spelling_lang='en_US'
#spelling_word_list_filename='_build/spelling_word_list.txt'
# Add any paths that contain templates here, relative to this directory.
# templates_path = ['_theme/_templates']
# The suffix of source filenames.
source_suffix = '.rst'
# The encoding of source files.
#source_encoding = 'utf-8-sig'
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = 'Symfony Framework Documentation'
copyright = ''
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
# version = '2.2'
# The full version, including alpha/beta/rc tags.
# release = '2.2.13'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ['_build']
# The reST default role (used for this markup: `text`) to use for all documents.
#default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#add_module_names = True
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'symfonycom.sphinx.SensioStyle'
# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
# -- Settings for symfony doc extension ---------------------------------------------------
# enable highlighting for PHP code not between ``<?php ... ?>`` by default
lexers['markdown'] = TextLexer()
lexers['php'] = PhpLexer(startinline=True)
lexers['php-annotations'] = PhpLexer(startinline=True)
lexers['php-standalone'] = PhpLexer(startinline=True)
lexers['php-symfony'] = PhpLexer(startinline=True)
lexers['rst'] = RstLexer()
lexers['varnish2'] = CLexer()
lexers['varnish3'] = CLexer()
lexers['varnish4'] = CLexer()
lexers['terminal'] = TerminalLexer()
lexers['env'] = BashLexer()
config_block = {
'apache': 'Apache',
'markdown': 'Markdown',
'nginx': 'Nginx',
'rst': 'reStructuredText',
'varnish2': 'Varnish 2',
'varnish3': 'Varnish 3',
'varnish4': 'Varnish 4',
'env': '.env'
}
# don't enable Sphinx Domains
primary_domain = None
# set url for API links
api_url = 'https://github.com/symfony/symfony/blob/master/src/%s.php'
# -- Options for HTML output ---------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = "sphinx_rtd_theme"
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
html_theme_options = {
'logo_only': True,
'prev_next_buttons_location': None,
'style_nav_header_background': '#f0f0f0'
}
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
html_logo = '_static/symfony-logo.svg'
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#html_favicon = None
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
html_css_files = ['rtd_custom.css']
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}
# Additional templates that should be rendered to pages, maps page names to
# template names.
#html_additional_pages = {}
# If false, no module index is generated.
#html_domain_indices = True
# If false, no index is generated.
#html_use_index = True
# If true, the index is split into individual pages for each letter.
#html_split_index = False
# If true, links to the reST sources are added to the pages.
#html_show_sourcelink = True
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
#html_show_sphinx = True
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
#html_show_copyright = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
#html_use_opensearch = ''
# This is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = None
# Output file base name for HTML help builder.
htmlhelp_basename = 'SymfonyDoc'
# -- Options for LaTeX output --------------------------------------------------
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#'preamble': '',
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
('index', 'Symfony.tex', u'Symfony Documentation',
u'Symfony community', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
# the title page.
#latex_logo = None
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#latex_use_parts = False
# If true, show page references after internal links.
#latex_show_pagerefs = False
# If true, show URL addresses after external links.
#latex_show_urls = False
# Documents to append as an appendix to all manuals.
#latex_appendices = []
# If false, no module index is generated.
#latex_domain_indices = True
# -- Options for manual page output --------------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'symfony', u'Symfony Documentation',
[u'Symfony community'], 1)
]
# If true, show URL addresses after external links.
#man_show_urls = False
# -- Options for Texinfo output ------------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
('index', 'Symfony', u'Symfony Documentation',
u'Symfony community', 'Symfony', 'One line description of project.',
'Miscellaneous'),
]
# Documents to append as an appendix to all manuals.
#texinfo_appendices = []
# If false, no module index is generated.
#texinfo_domain_indices = True
# How to display URL addresses: 'footnote', 'no', or 'inline'.
#texinfo_show_urls = 'footnote'
# Use PHP syntax highlighting in code examples by default
highlight_language='php'

View File

@@ -1,263 +0,0 @@
@ECHO OFF
REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set BUILDDIR=.
set ALLSPHINXOPTS=-c %BUILDDIR% -d %BUILDDIR%/doctrees %SPHINXOPTS% ..
set I18NSPHINXOPTS=%SPHINXOPTS% .
if NOT "%PAPER%" == "" (
set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
)
if "%1" == "" goto help
if "%1" == "help" (
:help
echo.Please use `make ^<target^>` where ^<target^> is one of
echo. html to make standalone HTML files
echo. dirhtml to make HTML files named index.html in directories
echo. singlehtml to make a single large HTML file
echo. pickle to make pickle files
echo. json to make JSON files
echo. htmlhelp to make HTML files and a HTML help project
echo. qthelp to make HTML files and a qthelp project
echo. devhelp to make HTML files and a Devhelp project
echo. epub to make an epub
echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
echo. text to make text files
echo. man to make manual pages
echo. texinfo to make Texinfo files
echo. gettext to make PO message catalogs
echo. changes to make an overview over all changed/added/deprecated items
echo. xml to make Docutils-native XML files
echo. pseudoxml to make pseudoxml-XML files for display purposes
echo. linkcheck to check all external links for integrity
echo. doctest to run all doctests embedded in the documentation if enabled
echo. coverage to run coverage check of the documentation if enabled
goto end
)
if "%1" == "clean" (
for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
del /q /s %BUILDDIR%\*
goto end
)
REM Check if sphinx-build is available and fallback to Python version if any
%SPHINXBUILD% 2> nul
if errorlevel 9009 goto sphinx_python
goto sphinx_ok
:sphinx_python
set SPHINXBUILD=python -m sphinx.__init__
%SPHINXBUILD% 2> nul
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
exit /b 1
)
:sphinx_ok
if "%1" == "html" (
%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in %BUILDDIR%/html.
goto end
)
if "%1" == "dirhtml" (
%SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
goto end
)
if "%1" == "singlehtml" (
%SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
goto end
)
if "%1" == "pickle" (
%SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can process the pickle files.
goto end
)
if "%1" == "json" (
%SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can process the JSON files.
goto end
)
if "%1" == "htmlhelp" (
%SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can run HTML Help Workshop with the ^
.hhp project file in %BUILDDIR%/htmlhelp.
goto end
)
if "%1" == "qthelp" (
%SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can run "qcollectiongenerator" with the ^
.qhcp project file in %BUILDDIR%/qthelp, like this:
echo.^> qcollectiongenerator %BUILDDIR%\qthelp\Symfony.qhcp
echo.To view the help file:
echo.^> assistant -collectionFile %BUILDDIR%\qthelp\Symfony.ghc
goto end
)
if "%1" == "devhelp" (
%SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished.
goto end
)
if "%1" == "epub" (
%SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The epub file is in %BUILDDIR%/epub.
goto end
)
if "%1" == "latex" (
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
if errorlevel 1 exit /b 1
echo.
echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
goto end
)
if "%1" == "latexpdf" (
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
cd %BUILDDIR%/latex
make all-pdf
cd %~dp0
echo.
echo.Build finished; the PDF files are in %BUILDDIR%/latex.
goto end
)
if "%1" == "latexpdfja" (
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
cd %BUILDDIR%/latex
make all-pdf-ja
cd %~dp0
echo.
echo.Build finished; the PDF files are in %BUILDDIR%/latex.
goto end
)
if "%1" == "text" (
%SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The text files are in %BUILDDIR%/text.
goto end
)
if "%1" == "man" (
%SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The manual pages are in %BUILDDIR%/man.
goto end
)
if "%1" == "texinfo" (
%SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
goto end
)
if "%1" == "gettext" (
%SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
goto end
)
if "%1" == "changes" (
%SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
if errorlevel 1 exit /b 1
echo.
echo.The overview file is in %BUILDDIR%/changes.
goto end
)
if "%1" == "linkcheck" (
%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
if errorlevel 1 exit /b 1
echo.
echo.Link check complete; look for any errors in the above output ^
or in %BUILDDIR%/linkcheck/output.txt.
goto end
)
if "%1" == "doctest" (
%SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
if errorlevel 1 exit /b 1
echo.
echo.Testing of doctests in the sources finished, look at the ^
results in %BUILDDIR%/doctest/output.txt.
goto end
)
if "%1" == "coverage" (
%SPHINXBUILD% -b coverage %ALLSPHINXOPTS% %BUILDDIR%/coverage
if errorlevel 1 exit /b 1
echo.
echo.Testing of coverage in the sources finished, look at the ^
results in %BUILDDIR%/coverage/python.txt.
goto end
)
if "%1" == "xml" (
%SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The XML files are in %BUILDDIR%/xml.
goto end
)
if "%1" == "pseudoxml" (
%SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml.
goto end
)
:end

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

View File

@@ -1,3 +0,0 @@
{
"exclude": ["_build"]
}