Skip to content

Commit e9dbb01

Browse files
authored
Merge pull request #73 from helloflask/add-rtd-config
2 parents b092220 + f03be93 commit e9dbb01

File tree

10 files changed

+33
-20
lines changed

10 files changed

+33
-20
lines changed

.readthedocs.yml

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,22 @@
1+
# .readthedocs.yaml
2+
# Read the Docs configuration file
3+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4+
5+
# Required
16
version: 2
7+
8+
# Set the version of Python and other tools you might need
9+
build:
10+
os: ubuntu-22.04
11+
tools:
12+
python: "3.11"
13+
14+
# Build documentation in the docs/ directory with Sphinx
15+
sphinx:
16+
configuration: docs/conf.py
17+
18+
# We recommend specifying your dependencies to enable reproducible builds:
19+
# https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
220
python:
321
install:
4-
- requirements: docs_requirements.txt
5-
- method: pip
6-
path: .
7-
sphinx:
8-
builder: dirhtml
9-
fail_on_warning: true
22+
- requirements: requirements/docs.txt

docs/conf.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
#
6262
# This is also used if you do content translation via gettext catalogs.
6363
# Usually you set "language" from the command line for these cases.
64-
language = None
64+
language = 'en'
6565

6666
# List of patterns, relative to source directory, that match files and
6767
# directories to ignore when looking for source files.
@@ -84,9 +84,7 @@
8484
# documentation.
8585
#
8686
html_theme_options = {
87-
'github_user': 'helloflask',
8887
'index_logo': 'flask-ckeditor.png',
89-
'github_fork': 'helloflask/flask-ckeditor',
9088
}
9189

9290
# Add any paths that contain custom static files (such as style sheets) here,

docs/plugins.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ will be used, defaults to ``Upload failed.``. Here is the full example:
4141
url = url_for('uploaded_files', filename=f.filename)
4242
return upload_success(url, filename=f.filename) # return upload_success call
4343
44-
.. note:: The key passed to ``request.files.get()`` must be ``'upload'``,
45-
it's defined by CKEditor and it's not the name of the view function.
44+
.. note:: The key passed to ``request.files.get()`` must be ``'upload'``, it's defined by CKEditor and it's not the name of the view function.
4645

4746
In the template, you have to call ``ckeditor.config()`` to make the configuration work:
4847

@@ -89,8 +88,7 @@ If the CKEditor version you use is below 4.5, you will need to use ``@ckeditor.u
8988
9089
You can use the configuration variable ``CKEDITOR_UPLOAD_ERROR_MESSAGE`` to customize the error message when the upload failed, it defaults to ``Upload failed.``
9190

92-
.. note:: The key passed to ``request.files.get()`` must be ``'upload'``,
93-
it's defined by CKEditor and it's not the name of the view function.
91+
.. note:: The key passed to ``request.files.get()`` must be ``'upload'``, it's defined by CKEditor and it's not the name of the view function.
9492

9593
In the template, you have to call ``ckeditor.config()`` to make the configuration work:
9694

flask_ckeditor/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ def upload():
264264
:param filename: the filename of uploaded image, optional.
265265
:param message: the warning message displayed to the user, optional.
266266
267-
.. veresionchanged:: 0.4.7
267+
.. versionchanged:: 0.4.7
268268
Add new parameter ``message``.
269269
270270
.. versionadded:: 0.4.0

requirements/dev.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
-r docs.in
33
-r style.in
44
pip-compile-multi
5-
tox
5+
tox

requirements/docs.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
sphinx
22
pallets-sphinx-themes
3-
sphinxcontrib-log-cabinet
3+
sphinxcontrib-log-cabinet

requirements/example.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ flask-wtf
33
flask-ckeditor
44
flask-admin
55
flask-sqlalchemy
6-
tablib
6+
tablib

requirements/style.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
flake8
1+
flake8

requirements/tests.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ flask
44
flask-wtf
55
flask-admin
66
flask-sqlalchemy
7-
tablib
7+
tablib

tox.ini

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[tox]
22
envlist = py37, py38, py39, py310, py311, docs
33
skip_missing_interpreters = true
4-
skipsdist = true
4+
# skipsdist = true
55

66
[testenv]
77
commands =
@@ -22,3 +22,7 @@ commands =
2222
flake8 flask_ckeditor test_flask_ckeditor.py
2323
deps =
2424
flake8
25+
26+
[testenv:docs]
27+
deps = -r requirements/docs.txt
28+
commands = sphinx-build -W -b html -d {envtmpdir}/doctrees docs {envtmpdir}/html

0 commit comments

Comments
 (0)