API Documentation for
,
generated by
pydoctor
at
.
diff --git a/pydoctor/themes/readthedocs/readthedocstheme.css b/pydoctor/themes/readthedocs/readthedocstheme.css
index b12f3013f..b8f21f4ca 100644
--- a/pydoctor/themes/readthedocs/readthedocstheme.css
+++ b/pydoctor/themes/readthedocs/readthedocstheme.css
@@ -11,7 +11,32 @@ body {
}
.container-fluid {
- max-width: 960px;
+ max-width: 1030px;
+}
+
+body > footer {
+ margin-top: 0px!important;
+ max-width: 1030px;
+ margin-left: 300px!important;
+}
+
+@media only screen and (max-width: 1850px) {
+ .container-fluid {
+ max-width: 980px;
+ }
+ body > footer {
+ max-width: 980px;
+ }
+}
+
+/* For laptop displays */
+@media only screen and (max-width: 1750px) {
+ .container-fluid {
+ max-width: 880px;
+ }
+ body > footer {
+ max-width: 880px;
+ }
}
body > nav {
@@ -31,20 +56,13 @@ body > nav::-webkit-scrollbar{
width: 0;
}
-body > div, body > footer {
+body > .container-fluid, body > footer {
margin-left: 300px!important;
padding: 0 40px 0 40px;
background-color: rgb(252, 252, 252)!important;
width: calc(100% - 380px)!important;
}
-body > footer {
- /* border-top: 1px solid rgb(210, 220, 216); */
- margin-top: 0px!important;
- max-width: 960px;
- margin-left: 300px!important;
-}
-
body > footer > hr {
border: 0;
border-bottom: 1px solid rgb(210, 220, 216);
@@ -667,7 +685,7 @@ nav.sidebar > div:nth-child(1) li li .tocChildrenToggle:checked ~ .expandableCon
width: auto!important;
}
- body > div, body > footer {
+ body > .container-fluid, body > footer {
margin-left: 0!important;
width: auto!important;
padding: 5px 15px 5px 15px;
From 129f9300423e529a900c7a625bc1beac987bf0b9 Mon Sep 17 00:00:00 2001
From: tristanlatr <19967168+tristanlatr@users.noreply.github.com>
Date: Sat, 26 Oct 2024 10:15:19 -0400
Subject: [PATCH 4/4] Add readthedocs integration example (#830)
---
docs/source/publish-github-action.rst | 11 +++---
docs/source/publish-readthedocs.rst | 51 +++++++++++++++++++++++++++
docs/source/quickstart.rst | 5 ++-
3 files changed, 61 insertions(+), 6 deletions(-)
create mode 100644 docs/source/publish-readthedocs.rst
diff --git a/docs/source/publish-github-action.rst b/docs/source/publish-github-action.rst
index ec7b7aef6..17dc0fa2f 100644
--- a/docs/source/publish-github-action.rst
+++ b/docs/source/publish-github-action.rst
@@ -5,7 +5,7 @@ Simple GitHub Action to publish API docs
Here is an example of a simple GitHub Action to automatically
generate your documentation with Pydoctor
-and publish it to your default GitHub Pages website.
+and publish it to your default GitHub Pages website when there is a push on the ``main`` branch.
Just substitute `(projectname)` and `(packagedirectory)`
with the appropriate information.
@@ -14,7 +14,8 @@ with the appropriate information.
name: apidocs
on:
- - push
+ push:
+ branches: [main]
jobs:
deploy:
@@ -22,15 +23,15 @@ with the appropriate information.
steps:
- uses: actions/checkout@master
- - name: Set up Python 3.8
+ - name: Set up Python 3.12
uses: actions/setup-python@v2
with:
- python-version: 3.8
+ python-version: 3.12
- name: Install requirements for documentation generation
run: |
python -m pip install --upgrade pip setuptools wheel
- python -m pip install docutils pydoctor
+ python -m pip install pydoctor
- name: Generate API documentation with pydoctor
run: |
diff --git a/docs/source/publish-readthedocs.rst b/docs/source/publish-readthedocs.rst
new file mode 100644
index 000000000..01580f4aa
--- /dev/null
+++ b/docs/source/publish-readthedocs.rst
@@ -0,0 +1,51 @@
+:orphan:
+
+Simple ReadTheDocs config to publish API docs
+---------------------------------------------
+
+Here is an example of a simple ReadTheDocs integration to automatically
+generate your documentation with Pydoctor.
+
+.. note:: This kind of integration should
+ not be confused with `Sphinx support
`_ that can also be used to run
+ pydoctor inside ReadTheDocs as part of the standard Sphinx build process.
+
+ This page, on the other hand, documents **how to simply run pydoctor
+ and publish on ReadTheDocs** by using build customizations features.
+
+This example only includes a configuration file (``.readthedocs.yaml``),
+but the repository must also have been
+integrated to ReadTheDocs (by linking your Github account and importing your project for
+instance or by `manual webhook configuration `_).
+
+The config file below assume you're cloning your repository with http(s) protocol
+and that repository is a GitHub instance
+(the value of ``--html-viewsource-base`` could vary depending on your git server).
+
+Though, a similar process can be applied to Gitea, GitLab, Bitbucket ot others git servers.
+
+Just substitute `(projectname)` and `(packagedirectory)`
+with the appropriate information.
+
+.. code:: yaml
+
+ version: 2
+ build:
+ os: "ubuntu-22.04"
+ tools:
+ python: "3.10"
+ commands:
+ - pip install pydoctor
+ - |
+ pydoctor \
+ --project-name=(projectname) \
+ --project-version=${READTHEDOCS_GIT_IDENTIFIER} \
+ --project-url=${READTHEDOCS_GIT_CLONE_URL%*.git} \
+ --html-viewsource-base=${READTHEDOCS_GIT_CLONE_URL%*.git}/tree/${READTHEDOCS_GIT_COMMIT_HASH} \
+ --html-base-url=${READTHEDOCS_CANONICAL_URL} \
+ --html-output $READTHEDOCS_OUTPUT/html/ \
+ --docformat=restructuredtext \
+ --intersphinx=https://docs.python.org/3/objects.inv \
+ ./(packagedirectory)
+
+`More on ReadTheDocs build customizations `_.
diff --git a/docs/source/quickstart.rst b/docs/source/quickstart.rst
index a0d0b4024..f27274c03 100644
--- a/docs/source/quickstart.rst
+++ b/docs/source/quickstart.rst
@@ -26,7 +26,7 @@ The result looks like `this `_.
pydoctor \
--project-name=pydoctor \
- --project-version=1.2.0 \
+ --project-version=20.7.2 \
--project-url=https://github.com/twisted/pydoctor/ \
--html-viewsource-base=https://github.com/twisted/pydoctor/tree/20.7.2 \
--html-base-url=https://pydoctor.readthedocs.io/en/latest/api \
@@ -54,6 +54,9 @@ Output files are static HTML pages which require no extra server-side support.
Here is a `GitHub Action example `_ to automatically
publish your API documentation to your default GitHub Pages website.
+Here is a `ReadTheDocs configuration `_ to automatically
+publish your API documentation to ReadTheDocs
+
Return codes
------------