docs: switch to sphinx_rtd_theme to match other docs

Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
This commit is contained in:
Josh Richards 2024-06-28 11:11:15 -04:00
Родитель f44eb5b8d4
Коммит 2ab298e63a
9 изменённых файлов: 126 добавлений и 12 удалений

Просмотреть файл

@ -48,12 +48,12 @@ html: html-com
html-all: html-release html-com
html-release:
$(SPHINXBUILD) -b html -D html_theme='nextcloud_release' $(ALLSPHINXOPTS) $(BUILDDIR)/html/release
$(SPHINXBUILD) -b html -D html_theme='sphinx_rtd_theme' $(ALLSPHINXOPTS) $(BUILDDIR)/html/release
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html/release."
html-com:
$(SPHINXBUILD) -b html -D html_theme='nextcloud_com' $(ALLSPHINXOPTS) $(BUILDDIR)/html/com
$(SPHINXBUILD) -b html -D html_theme='sphinx_rtd_theme' $(ALLSPHINXOPTS) $(BUILDDIR)/html/com
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html/com."

Просмотреть файл

@ -0,0 +1,95 @@
/**
* FIX THE DESIGN OF THE RTD THEME
*/
/* NC blue */
.wy-side-nav-search {
background-color: #0082c9;
}
/* Reduce size of logo in top left */
.wy-side-nav-search > a img.logo {
max-width: 180px;
}
/* Remove unwanted background on top left logo on hover */
.wy-side-nav-search > a:hover {
background: none;
}
/* Remove unwanted data on the bottom left sidebar */
.rst-versions.shift-up .rst-other-versions > dl:not(:nth-child(1)),
.rst-versions.shift-up .rst-other-versions > a,
.rst-versions.shift-up .rst-other-versions > hr {
display:none
}
.rst-versions.shift-up .rst-other-versions {
color: transparent;
font-size: 0px;
}
.rst-versions.shift-up .rst-other-versions dt,.rst-versions.shift-up .rst-other-versions dl {
color: #808080;
font-size: 15px;
}
/* Remove readthedocs title in the sidebar bottom left section */
.rst-versions .rst-current-version .fa-book {
display: none;
}
.rst-versions .rst-current-version:before {
content: 'Nextcloud';
margin-right: auto;
}
.rst-versions .rst-current-version {
display: flex;
align-items: center;
color: #0082c9;
}
.rst-versions .rst-current-version .fa-caret-down {
margin-left: 5px;
}
/* Code blocks */
.highlight {
/* nc blue */
background: rgba(0, 130, 201, 0.1)
}
/* ICONS LIST */
div#list-of-available-icons > blockquote {
margin: 0;
}
div#list-of-available-icons > blockquote > div {
display: flex;
flex-wrap: wrap;
justify-content: space-around;
}
div#list-of-available-icons > blockquote > div > div {
width: 120px;
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: 30px;
}
div#list-of-available-icons > blockquote > div > div > a {
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
width: 60px;
height: 60px;
}
div#list-of-available-icons > blockquote > div > div > a.white-icon {
background-color: #343131;
}
div#list-of-available-icons > blockquote > div > div > p {
margin-top: 5px;
font-size: 90%;
font-style: normal;
text-align: center;
}

Двоичные данные
doc/_shared_assets/static/logo-blue.pdf

Двоичный файл не отображается.

Двоичные данные
doc/_shared_assets/static/logo-blue.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 6.5 KiB

После

Ширина:  |  Высота:  |  Размер: 18 KiB

Двоичные данные
doc/_shared_assets/static/logo-white.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 14 KiB

Просмотреть файл

@ -10,7 +10,7 @@ Options
.. include:: options.rst
Mass Deployment And Account Creation
-------
------------------------------------
.. index:: mass deployment
.. include:: massdeploymentcommandline.rst
@ -35,6 +35,6 @@ Low Disk Space
.. include:: lowdiskspace.rst
Wizard Account Setup Command-line Options
-------
-----------------------------------------
.. index:: wizard accountsetup command-line
.. include:: wizardaccountsetupcommandline.rst

Просмотреть файл

@ -13,6 +13,8 @@
import sys, os
#import sphinx_rtd_theme
# 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.
@ -25,7 +27,7 @@ import sys, os
# 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.todo']
extensions = ['sphinx_rtd_theme', 'sphinx_rtd_dark_mode', 'sphinx.ext.todo']
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_shared_assets/templates']
@ -71,7 +73,7 @@ exclude_patterns = ['_build','scripts/*']
# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True
2
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#add_module_names = True
@ -92,15 +94,20 @@ pygments_style = 'sphinx'
# 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 = {}
html_theme_options = {
'logo_only': True,
'style_external_links': True,
'display_version': False,
}
# Add any paths that contain custom themes here, relative to this directory.
html_theme_path = ['_shared_assets/themes']
#html_theme_path = ['_shared_assets/themes']
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#html_theme = 'bootstrap'
html_theme = 'default'
#html_theme = 'default'
html_theme = 'sphinx-rtd-theme'
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
@ -110,7 +117,7 @@ html_short_title = "Client Manual"
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = None
html_logo = "_shared_assets/static/logo-white.png"
# 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
@ -290,3 +297,11 @@ epub_copyright = u'2013-2018, The Nextcloud developers'
todo_include_todos = True
rst_epilog = '.. |version| replace:: %s' % version
html_context = {
'current_version': version,
'READTHEDOCS': True,
'extra_css_files': ['_static/custom.css'],
}
default_dark_mode = False

4
doc/requirements.txt Normal file
Просмотреть файл

@ -0,0 +1,4 @@
Pygments==2.18.0
Sphinx==7.2.6
sphinx-rtd-theme==2.0.0
sphinx-rtd-dark-mode==1.3.0

Просмотреть файл

@ -67,7 +67,7 @@ See https://github.com/owncloud/client/issues/5226 for more discussion of this
issue.
"Connection closed" message when syncing files
---------------------
----------------------------------------------
This message can be caused by using chunks that are too big or time-outs that
are set too liberally. You can configure the chunking behavior of the client in
@ -79,7 +79,7 @@ the config file. For example, change these settings:
+----------------------------------+--------------------------+--------------------------------------------------------------------------------------------------------+
| ``minChunkSize`` | ``1000000`` (1 MB) | Specifies the minimum chunk size of uploaded files in bytes. |
+----------------------------------+--------------------------+--------------------------------------------------------------------------------------------------------+
| ``maxChunkSize`` | ``50000000`` (1000 MB) | Specifies the maximum chunk size of uploaded files in bytes. |
| ``maxChunkSize`` | ``50000000`` (1000 MB) | Specifies the maximum chunk size of uploaded files in bytes. |
+----------------------------------+--------------------------+--------------------------------------------------------------------------------------------------------+
| ``targetChunkUploadDuration`` | ``6000`` (1 minute) | Target duration in milliseconds for chunk uploads. |
| | | The client adjusts the chunk size until each chunk upload takes approximately this long. |