forked from orbit-oss/flask
update docs config
This commit is contained in:
parent
7d77958000
commit
28b35c55a1
13 changed files with 115 additions and 253 deletions
|
|
@ -4,7 +4,6 @@
|
||||||
# You can set these variables from the command line.
|
# You can set these variables from the command line.
|
||||||
SPHINXOPTS =
|
SPHINXOPTS =
|
||||||
SPHINXBUILD = sphinx-build
|
SPHINXBUILD = sphinx-build
|
||||||
SPHINXPROJ = Flask
|
|
||||||
SOURCEDIR = .
|
SOURCEDIR = .
|
||||||
BUILDDIR = _build
|
BUILDDIR = _build
|
||||||
|
|
||||||
|
|
@ -17,4 +16,4 @@ help:
|
||||||
# Catch-all target: route all unknown targets to Sphinx using the new
|
# Catch-all target: route all unknown targets to Sphinx using the new
|
||||||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
||||||
%: Makefile
|
%: Makefile
|
||||||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||||
|
|
|
||||||
BIN
docs/_static/flask-favicon.ico
vendored
BIN
docs/_static/flask-favicon.ico
vendored
Binary file not shown.
|
Before Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 6.8 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
BIN
docs/_static/touch-icon.png
vendored
BIN
docs/_static/touch-icon.png
vendored
Binary file not shown.
|
Before Width: | Height: | Size: 1.3 KiB |
29
docs/conf.py
29
docs/conf.py
|
|
@ -1,13 +1,11 @@
|
||||||
# -*- coding: utf-8 -*-
|
from pallets_sphinx_themes import get_version
|
||||||
from __future__ import print_function
|
from pallets_sphinx_themes import ProjectLink
|
||||||
|
|
||||||
from pallets_sphinx_themes import ProjectLink, get_version
|
|
||||||
|
|
||||||
# Project --------------------------------------------------------------
|
# Project --------------------------------------------------------------
|
||||||
|
|
||||||
project = "Flask"
|
project = "Flask"
|
||||||
copyright = "2010 Pallets Team"
|
copyright = "2010 Pallets"
|
||||||
author = "Pallets Team"
|
author = "Pallets"
|
||||||
release, version = get_version("Flask")
|
release, version = get_version("Flask")
|
||||||
|
|
||||||
# General --------------------------------------------------------------
|
# General --------------------------------------------------------------
|
||||||
|
|
@ -18,10 +16,11 @@ extensions = [
|
||||||
"sphinx.ext.intersphinx",
|
"sphinx.ext.intersphinx",
|
||||||
"sphinxcontrib.log_cabinet",
|
"sphinxcontrib.log_cabinet",
|
||||||
"pallets_sphinx_themes",
|
"pallets_sphinx_themes",
|
||||||
|
"sphinx_issues",
|
||||||
]
|
]
|
||||||
intersphinx_mapping = {
|
intersphinx_mapping = {
|
||||||
"python": ("https://docs.python.org/3/", None),
|
"python": ("https://docs.python.org/3/", None),
|
||||||
"werkzeug": ("http://werkzeug.pocoo.org/docs/", None),
|
"werkzeug": ("https://werkzeug.palletsprojects.com/", None),
|
||||||
"click": ("https://click.palletsprojects.com/", None),
|
"click": ("https://click.palletsprojects.com/", None),
|
||||||
"jinja": ("http://jinja.pocoo.org/docs/", None),
|
"jinja": ("http://jinja.pocoo.org/docs/", None),
|
||||||
"itsdangerous": ("https://itsdangerous.palletsprojects.com/", None),
|
"itsdangerous": ("https://itsdangerous.palletsprojects.com/", None),
|
||||||
|
|
@ -29,6 +28,7 @@ intersphinx_mapping = {
|
||||||
"wtforms": ("https://wtforms.readthedocs.io/en/stable/", None),
|
"wtforms": ("https://wtforms.readthedocs.io/en/stable/", None),
|
||||||
"blinker": ("https://pythonhosted.org/blinker/", None),
|
"blinker": ("https://pythonhosted.org/blinker/", None),
|
||||||
}
|
}
|
||||||
|
issues_github_path = "pallets/flask"
|
||||||
|
|
||||||
# HTML -----------------------------------------------------------------
|
# HTML -----------------------------------------------------------------
|
||||||
|
|
||||||
|
|
@ -49,25 +49,16 @@ html_sidebars = {
|
||||||
}
|
}
|
||||||
singlehtml_sidebars = {"index": ["project.html", "localtoc.html"]}
|
singlehtml_sidebars = {"index": ["project.html", "localtoc.html"]}
|
||||||
html_static_path = ["_static"]
|
html_static_path = ["_static"]
|
||||||
html_favicon = "_static/flask-favicon.ico"
|
html_favicon = "_static/flask-icon.png"
|
||||||
html_logo = "_static/flask.png"
|
html_logo = "_static/flask-icon.png"
|
||||||
html_title = "Flask Documentation ({})".format(version)
|
html_title = "Flask Documentation ({})".format(version)
|
||||||
html_show_sourcelink = False
|
html_show_sourcelink = False
|
||||||
|
|
||||||
# LaTeX ----------------------------------------------------------------
|
# LaTeX ----------------------------------------------------------------
|
||||||
|
|
||||||
latex_documents = [
|
latex_documents = [
|
||||||
(master_doc, "Flask.tex", "Flask Documentation", "Pallets Team", "manual")
|
(master_doc, "Flask-{}.tex".format(version), html_title, author, "manual")
|
||||||
]
|
]
|
||||||
latex_use_modindex = False
|
|
||||||
latex_elements = {
|
|
||||||
"papersize": "a4paper",
|
|
||||||
"pointsize": "12pt",
|
|
||||||
"fontpkg": r"\usepackage{mathpazo}",
|
|
||||||
"preamble": r"\usepackage{flaskstyle}",
|
|
||||||
}
|
|
||||||
latex_use_parts = True
|
|
||||||
latex_additional_files = ["flaskstyle.sty", "logo.pdf"]
|
|
||||||
|
|
||||||
# Local Extensions -----------------------------------------------------
|
# Local Extensions -----------------------------------------------------
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,62 +0,0 @@
|
||||||
User's Guide
|
|
||||||
------------
|
|
||||||
|
|
||||||
This part of the documentation, which is mostly prose, begins with some
|
|
||||||
background information about Flask, then focuses on step-by-step
|
|
||||||
instructions for web development with Flask.
|
|
||||||
|
|
||||||
.. toctree::
|
|
||||||
:maxdepth: 2
|
|
||||||
|
|
||||||
foreword
|
|
||||||
advanced_foreword
|
|
||||||
installation
|
|
||||||
quickstart
|
|
||||||
tutorial/index
|
|
||||||
templating
|
|
||||||
testing
|
|
||||||
errorhandling
|
|
||||||
logging
|
|
||||||
config
|
|
||||||
signals
|
|
||||||
views
|
|
||||||
appcontext
|
|
||||||
reqcontext
|
|
||||||
blueprints
|
|
||||||
extensions
|
|
||||||
cli
|
|
||||||
server
|
|
||||||
shell
|
|
||||||
patterns/index
|
|
||||||
deploying/index
|
|
||||||
becomingbig
|
|
||||||
|
|
||||||
API Reference
|
|
||||||
-------------
|
|
||||||
|
|
||||||
If you are looking for information on a specific function, class or
|
|
||||||
method, this part of the documentation is for you.
|
|
||||||
|
|
||||||
.. toctree::
|
|
||||||
:maxdepth: 2
|
|
||||||
|
|
||||||
api
|
|
||||||
|
|
||||||
Additional Notes
|
|
||||||
----------------
|
|
||||||
|
|
||||||
Design notes, legal information and changelog are here for the interested.
|
|
||||||
|
|
||||||
.. toctree::
|
|
||||||
:maxdepth: 2
|
|
||||||
|
|
||||||
design
|
|
||||||
htmlfaq
|
|
||||||
security
|
|
||||||
unicode
|
|
||||||
extensiondev
|
|
||||||
styleguide
|
|
||||||
upgrading
|
|
||||||
changelog
|
|
||||||
license
|
|
||||||
contributing
|
|
||||||
|
|
@ -1,124 +0,0 @@
|
||||||
\definecolor{TitleColor}{rgb}{0,0,0}
|
|
||||||
\definecolor{InnerLinkColor}{rgb}{0,0,0}
|
|
||||||
|
|
||||||
% Replace Unicode character 'PARTY POPPER' (U+1F389) with a non-breaking space.
|
|
||||||
% pdfLaTeX doesn't support Unicode.
|
|
||||||
\DeclareUnicodeCharacter{1F389}{\nobreakspace}
|
|
||||||
|
|
||||||
\renewcommand{\maketitle}{%
|
|
||||||
\begin{titlepage}%
|
|
||||||
\let\footnotesize\small
|
|
||||||
\let\footnoterule\relax
|
|
||||||
% Apply following fix only on PDF output, i.e. pdfoutput macro is not
|
|
||||||
% undefined
|
|
||||||
\ifx\pdfoutput\undefined\else
|
|
||||||
\begingroup
|
|
||||||
% This \def is required to deal with multi-line authors; it
|
|
||||||
% changes \\ to ', ' (comma-space), making it pass muster for
|
|
||||||
% generating document info in the PDF file.
|
|
||||||
\def\\{, }
|
|
||||||
\pdfinfo{
|
|
||||||
/Author (\@author)
|
|
||||||
/Title (\@title)
|
|
||||||
}
|
|
||||||
\endgroup
|
|
||||||
\fi
|
|
||||||
\begin{flushright}%
|
|
||||||
%\sphinxlogo%
|
|
||||||
{\center
|
|
||||||
\vspace*{3cm}
|
|
||||||
\includegraphics{logo.pdf}
|
|
||||||
\vspace{3cm}
|
|
||||||
\par
|
|
||||||
{\rm\Huge \@title \par}%
|
|
||||||
{\em\LARGE \py@release\releaseinfo \par}
|
|
||||||
{\large
|
|
||||||
\@date \par
|
|
||||||
\py@authoraddress \par
|
|
||||||
}}%
|
|
||||||
\end{flushright}%\par
|
|
||||||
\@thanks
|
|
||||||
\end{titlepage}%
|
|
||||||
\cleardoublepage%
|
|
||||||
\setcounter{footnote}{0}%
|
|
||||||
\let\thanks\relax\let\maketitle\relax
|
|
||||||
%\gdef\@thanks{}\gdef\@author{}\gdef\@title{}
|
|
||||||
}
|
|
||||||
|
|
||||||
\fancypagestyle{normal}{
|
|
||||||
\fancyhf{}
|
|
||||||
\fancyfoot[LE,RO]{{\thepage}}
|
|
||||||
\fancyfoot[LO]{{\nouppercase{\rightmark}}}
|
|
||||||
\fancyfoot[RE]{{\nouppercase{\leftmark}}}
|
|
||||||
\fancyhead[LE,RO]{{ \@title, \py@release}}
|
|
||||||
\renewcommand{\headrulewidth}{0.4pt}
|
|
||||||
\renewcommand{\footrulewidth}{0.4pt}
|
|
||||||
}
|
|
||||||
|
|
||||||
\fancypagestyle{plain}{
|
|
||||||
\fancyhf{}
|
|
||||||
\fancyfoot[LE,RO]{{\thepage}}
|
|
||||||
\renewcommand{\headrulewidth}{0pt}
|
|
||||||
\renewcommand{\footrulewidth}{0.4pt}
|
|
||||||
}
|
|
||||||
|
|
||||||
\titleformat{\section}{\Large}%
|
|
||||||
{\py@TitleColor\thesection}{0.5em}{\py@TitleColor}{\py@NormalColor}
|
|
||||||
\titleformat{\subsection}{\large}%
|
|
||||||
{\py@TitleColor\thesubsection}{0.5em}{\py@TitleColor}{\py@NormalColor}
|
|
||||||
\titleformat{\subsubsection}{}%
|
|
||||||
{\py@TitleColor\thesubsubsection}{0.5em}{\py@TitleColor}{\py@NormalColor}
|
|
||||||
\titleformat{\paragraph}{\large}%
|
|
||||||
{\py@TitleColor}{0em}{\py@TitleColor}{\py@NormalColor}
|
|
||||||
|
|
||||||
\ChNameVar{\raggedleft\normalsize}
|
|
||||||
\ChNumVar{\raggedleft \bfseries\Large}
|
|
||||||
\ChTitleVar{\raggedleft \rm\Huge}
|
|
||||||
|
|
||||||
\renewcommand\thepart{\@Roman\c@part}
|
|
||||||
\renewcommand\part{%
|
|
||||||
\pagestyle{plain}
|
|
||||||
\if@noskipsec \leavevmode \fi
|
|
||||||
\cleardoublepage
|
|
||||||
\vspace*{6cm}%
|
|
||||||
\@afterindentfalse
|
|
||||||
\secdef\@part\@spart}
|
|
||||||
|
|
||||||
\def\@part[#1]#2{%
|
|
||||||
\ifnum \c@secnumdepth >\m@ne
|
|
||||||
\refstepcounter{part}%
|
|
||||||
\addcontentsline{toc}{part}{\thepart\hspace{1em}#1}%
|
|
||||||
\else
|
|
||||||
\addcontentsline{toc}{part}{#1}%
|
|
||||||
\fi
|
|
||||||
{\parindent \z@ %\center
|
|
||||||
\interlinepenalty \@M
|
|
||||||
\normalfont
|
|
||||||
\ifnum \c@secnumdepth >\m@ne
|
|
||||||
\rm\Large \partname~\thepart
|
|
||||||
\par\nobreak
|
|
||||||
\fi
|
|
||||||
\MakeUppercase{\rm\Huge #2}%
|
|
||||||
\markboth{}{}\par}%
|
|
||||||
\nobreak
|
|
||||||
\vskip 8ex
|
|
||||||
\@afterheading}
|
|
||||||
\def\@spart#1{%
|
|
||||||
{\parindent \z@ %\center
|
|
||||||
\interlinepenalty \@M
|
|
||||||
\normalfont
|
|
||||||
\huge \bfseries #1\par}%
|
|
||||||
\nobreak
|
|
||||||
\vskip 3ex
|
|
||||||
\@afterheading}
|
|
||||||
|
|
||||||
% use inconsolata font
|
|
||||||
\usepackage{inconsolata}
|
|
||||||
|
|
||||||
% fix single quotes, for inconsolata. (does not work)
|
|
||||||
%%\usepackage{textcomp}
|
|
||||||
%%\begingroup
|
|
||||||
%% \catcode`'=\active
|
|
||||||
%% \g@addto@macro\@noligs{\let'\textsinglequote}
|
|
||||||
%% \endgroup
|
|
||||||
%%\endinput
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
Welcome to Flask
|
Welcome to Flask
|
||||||
================
|
================
|
||||||
|
|
||||||
.. image:: _static/logo-full.png
|
.. image:: _static/flask-logo.png
|
||||||
:alt: Flask: web development, one drop at a time
|
:alt: Flask: web development, one drop at a time
|
||||||
:align: center
|
:align: center
|
||||||
:target: https://palletsprojects.com/p/flask/
|
:target: https://palletsprojects.com/p/flask/
|
||||||
|
|
@ -24,4 +24,68 @@ toolkit. The documentation for these libraries can be found at:
|
||||||
.. _Jinja: https://www.palletsprojects.com/p/jinja/
|
.. _Jinja: https://www.palletsprojects.com/p/jinja/
|
||||||
.. _Werkzeug: https://www.palletsprojects.com/p/werkzeug/
|
.. _Werkzeug: https://www.palletsprojects.com/p/werkzeug/
|
||||||
|
|
||||||
.. include:: contents.rst.inc
|
|
||||||
|
User's Guide
|
||||||
|
------------
|
||||||
|
|
||||||
|
This part of the documentation, which is mostly prose, begins with some
|
||||||
|
background information about Flask, then focuses on step-by-step
|
||||||
|
instructions for web development with Flask.
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 2
|
||||||
|
|
||||||
|
foreword
|
||||||
|
advanced_foreword
|
||||||
|
installation
|
||||||
|
quickstart
|
||||||
|
tutorial/index
|
||||||
|
templating
|
||||||
|
testing
|
||||||
|
errorhandling
|
||||||
|
logging
|
||||||
|
config
|
||||||
|
signals
|
||||||
|
views
|
||||||
|
appcontext
|
||||||
|
reqcontext
|
||||||
|
blueprints
|
||||||
|
extensions
|
||||||
|
cli
|
||||||
|
server
|
||||||
|
shell
|
||||||
|
patterns/index
|
||||||
|
deploying/index
|
||||||
|
becomingbig
|
||||||
|
|
||||||
|
|
||||||
|
API Reference
|
||||||
|
-------------
|
||||||
|
|
||||||
|
If you are looking for information on a specific function, class or
|
||||||
|
method, this part of the documentation is for you.
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 2
|
||||||
|
|
||||||
|
api
|
||||||
|
|
||||||
|
|
||||||
|
Additional Notes
|
||||||
|
----------------
|
||||||
|
|
||||||
|
Design notes, legal information and changelog are here for the interested.
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 2
|
||||||
|
|
||||||
|
design
|
||||||
|
htmlfaq
|
||||||
|
security
|
||||||
|
unicode
|
||||||
|
extensiondev
|
||||||
|
styleguide
|
||||||
|
upgrading
|
||||||
|
changelog
|
||||||
|
license
|
||||||
|
contributing
|
||||||
|
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
:orphan:
|
|
||||||
|
|
||||||
Flask Documentation
|
|
||||||
===================
|
|
||||||
|
|
||||||
.. include:: contents.rst.inc
|
|
||||||
BIN
docs/logo.pdf
BIN
docs/logo.pdf
Binary file not shown.
|
|
@ -1,36 +1,35 @@
|
||||||
@ECHO OFF
|
@ECHO OFF
|
||||||
|
|
||||||
pushd %~dp0
|
pushd %~dp0
|
||||||
|
|
||||||
REM Command file for Sphinx documentation
|
REM Command file for Sphinx documentation
|
||||||
|
|
||||||
if "%SPHINXBUILD%" == "" (
|
if "%SPHINXBUILD%" == "" (
|
||||||
set SPHINXBUILD=sphinx-build
|
set SPHINXBUILD=sphinx-build
|
||||||
)
|
)
|
||||||
set SOURCEDIR=.
|
set SOURCEDIR=.
|
||||||
set BUILDDIR=_build
|
set BUILDDIR=_build
|
||||||
set SPHINXPROJ=Flask
|
|
||||||
|
if "%1" == "" goto help
|
||||||
if "%1" == "" goto help
|
|
||||||
|
%SPHINXBUILD% >NUL 2>NUL
|
||||||
%SPHINXBUILD% >NUL 2>NUL
|
if errorlevel 9009 (
|
||||||
if errorlevel 9009 (
|
echo.
|
||||||
echo.
|
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
|
||||||
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
|
echo.installed, then set the SPHINXBUILD environment variable to point
|
||||||
echo.installed, then set the SPHINXBUILD environment variable to point
|
echo.to the full path of the 'sphinx-build' executable. Alternatively you
|
||||||
echo.to the full path of the 'sphinx-build' executable. Alternatively you
|
echo.may add the Sphinx directory to PATH.
|
||||||
echo.may add the Sphinx directory to PATH.
|
echo.
|
||||||
echo.
|
echo.If you don't have Sphinx installed, grab it from
|
||||||
echo.If you don't have Sphinx installed, grab it from
|
echo.http://sphinx-doc.org/
|
||||||
echo.http://sphinx-doc.org/
|
exit /b 1
|
||||||
exit /b 1
|
)
|
||||||
)
|
|
||||||
|
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
|
||||||
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
|
goto end
|
||||||
goto end
|
|
||||||
|
:help
|
||||||
:help
|
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
|
||||||
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
|
|
||||||
|
:end
|
||||||
:end
|
popd
|
||||||
popd
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
Sphinx~=1.8.0
|
Sphinx~=2.1.2
|
||||||
Pallets-Sphinx-Themes~=1.1.0
|
Pallets-Sphinx-Themes~=1.1.4
|
||||||
sphinxcontrib-log-cabinet~=1.0.0
|
sphinxcontrib-log-cabinet~=1.0.0
|
||||||
|
sphinx-issues~=1.2.0
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue