Skip to content

Commit

Permalink
[DOCS] Fix quickstart snippets (#177)
Browse files Browse the repository at this point in the history
* Added extra line so code snippet is displayed

* Fixed CHANGELOG.rst warning

* Configure readthedocs v2

---------

Co-authored-by: andruten <[email protected]>
  • Loading branch information
andruten and andruten authored Nov 26, 2023
1 parent 9bff40a commit ab87720
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 4 deletions.
35 changes: 35 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Read the Docs configuration file for Sphinx projects
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.12"
# You can also specify other tool versions:
# nodejs: "20"
# rust: "1.70"
# golang: "1.20"

# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/conf.py
# You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs
# builder: "dirhtml"
# Fail on all warnings to avoid broken references
# fail_on_warning: true

# Optionally build your docs in additional formats such as PDF and ePub
# formats:
# - pdf
# - epub

# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: docs/requirements.txt
3 changes: 1 addition & 2 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@
0.9.9 (2015-12-15)
==================

* Reorder header prior to httplib request. `Host` should be always the first
request header.
* Reorder header prior to httplib request. `Host` should be always the first request header.


0.9.8 (2015-12-10)
Expand Down
6 changes: 4 additions & 2 deletions docs/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ Next, you'll need to create a View that extends ``revproxy.views.ProxyView`` and
And now add your view in the ``urls.py``:

.. code-block:: python
from django.urls import re_path
from myapp.views import TestProxyView
Expand All @@ -56,6 +57,7 @@ And now add your view in the ``urls.py``:
Alternatively you could just use the default ProxyView as follow:

.. code-block:: python
from django.urls import re_path
from revproxy.views import ProxyView
Expand All @@ -72,7 +74,7 @@ After starting your test server you should see the content of `http://example.co

An example of a project can be found here:
https://github.com/seocam/revproxy-test

The provided test project is a simple Django project that makes
uses of revproxy. It basically possess a view.py that extends
uses of revproxy. It basically possess a view.py that extends
from ProxyView and sets the upstream address to 'httpbin.org'.
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sphinx==7.2.6

0 comments on commit ab87720

Please sign in to comment.