diff --git a/docs/Makefile b/docs/Makefile index fc19e49d..51285967 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -4,7 +4,6 @@ # You can set these variables from the command line. SPHINXOPTS = SPHINXBUILD = sphinx-build -SPHINXPROJ = Flask SOURCEDIR = . BUILDDIR = _build @@ -17,4 +16,4 @@ help: # Catch-all target: route all unknown targets to Sphinx using the new # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). %: Makefile - @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) \ No newline at end of file + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/_static/flask-favicon.ico b/docs/_static/flask-favicon.ico deleted file mode 100644 index bf0a9615..00000000 Binary files a/docs/_static/flask-favicon.ico and /dev/null differ diff --git a/docs/_static/flask.png b/docs/_static/flask-icon.png similarity index 100% rename from docs/_static/flask.png rename to docs/_static/flask-icon.png diff --git a/docs/_static/logo-full.png b/docs/_static/flask-logo.png similarity index 100% rename from docs/_static/logo-full.png rename to docs/_static/flask-logo.png diff --git a/docs/_static/touch-icon.png b/docs/_static/touch-icon.png deleted file mode 100644 index ef151f15..00000000 Binary files a/docs/_static/touch-icon.png and /dev/null differ diff --git a/docs/conf.py b/docs/conf.py index a6bf4e5b..9fe9d985 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,13 +1,11 @@ -# -*- coding: utf-8 -*- -from __future__ import print_function - -from pallets_sphinx_themes import ProjectLink, get_version +from pallets_sphinx_themes import get_version +from pallets_sphinx_themes import ProjectLink # Project -------------------------------------------------------------- project = "Flask" -copyright = "2010 Pallets Team" -author = "Pallets Team" +copyright = "2010 Pallets" +author = "Pallets" release, version = get_version("Flask") # General -------------------------------------------------------------- @@ -18,10 +16,11 @@ extensions = [ "sphinx.ext.intersphinx", "sphinxcontrib.log_cabinet", "pallets_sphinx_themes", + "sphinx_issues", ] intersphinx_mapping = { "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), "jinja": ("http://jinja.pocoo.org/docs/", None), "itsdangerous": ("https://itsdangerous.palletsprojects.com/", None), @@ -29,6 +28,7 @@ intersphinx_mapping = { "wtforms": ("https://wtforms.readthedocs.io/en/stable/", None), "blinker": ("https://pythonhosted.org/blinker/", None), } +issues_github_path = "pallets/flask" # HTML ----------------------------------------------------------------- @@ -49,25 +49,16 @@ html_sidebars = { } singlehtml_sidebars = {"index": ["project.html", "localtoc.html"]} html_static_path = ["_static"] -html_favicon = "_static/flask-favicon.ico" -html_logo = "_static/flask.png" +html_favicon = "_static/flask-icon.png" +html_logo = "_static/flask-icon.png" html_title = "Flask Documentation ({})".format(version) html_show_sourcelink = False # LaTeX ---------------------------------------------------------------- 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 ----------------------------------------------------- diff --git a/docs/contents.rst.inc b/docs/contents.rst.inc deleted file mode 100644 index f76b1591..00000000 --- a/docs/contents.rst.inc +++ /dev/null @@ -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 diff --git a/docs/flaskstyle.sty b/docs/flaskstyle.sty deleted file mode 100644 index cd53c898..00000000 --- a/docs/flaskstyle.sty +++ /dev/null @@ -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 diff --git a/docs/index.rst b/docs/index.rst index 52acff41..4e80f34a 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -3,7 +3,7 @@ Welcome to Flask ================ -.. image:: _static/logo-full.png +.. image:: _static/flask-logo.png :alt: Flask: web development, one drop at a time :align: center :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/ .. _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 diff --git a/docs/latexindex.rst b/docs/latexindex.rst deleted file mode 100644 index 288197c3..00000000 --- a/docs/latexindex.rst +++ /dev/null @@ -1,6 +0,0 @@ -:orphan: - -Flask Documentation -=================== - -.. include:: contents.rst.inc diff --git a/docs/logo.pdf b/docs/logo.pdf deleted file mode 100644 index bd820c24..00000000 Binary files a/docs/logo.pdf and /dev/null differ diff --git a/docs/make.bat b/docs/make.bat index 5ca2df6d..7893348a 100644 --- a/docs/make.bat +++ b/docs/make.bat @@ -1,36 +1,35 @@ -@ECHO OFF - -pushd %~dp0 - -REM Command file for Sphinx documentation - -if "%SPHINXBUILD%" == "" ( - set SPHINXBUILD=sphinx-build -) -set SOURCEDIR=. -set BUILDDIR=_build -set SPHINXPROJ=Flask - -if "%1" == "" goto help - -%SPHINXBUILD% >NUL 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 -) - -%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% -goto end - -:help -%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% - -:end -popd +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=. +set BUILDDIR=_build + +if "%1" == "" goto help + +%SPHINXBUILD% >NUL 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 +) + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% + +:end +popd diff --git a/docs/requirements.txt b/docs/requirements.txt index e667deaa..543ec917 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,3 +1,4 @@ -Sphinx~=1.8.0 -Pallets-Sphinx-Themes~=1.1.0 +Sphinx~=2.1.2 +Pallets-Sphinx-Themes~=1.1.4 sphinxcontrib-log-cabinet~=1.0.0 +sphinx-issues~=1.2.0