Skip to content

Commit 4a835b4

Browse files
authored
Merge pull request #3417 from rtfd/humitos/wipe/move-button
Move wipe button to version detail page
2 parents 1b3404b + e34f5b3 commit 4a835b4

File tree

4 files changed

+36
-6
lines changed

4 files changed

+36
-6
lines changed

docs/faq.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ following settings::
109109
Deleting a stale or broken build environment
110110
--------------------------------------------
111111

112-
If you're having trouble getting your version to build, try wiping out the existing build/environment files. On your version list page ``/projects/[project]/versions`` there is a "Wipe" button that will remove all of the files associated with your documentation build, but not the documentation itself.
112+
See :doc:`guides/wipe-environment`.
113113

114114
How do I host multiple projects on one CNAME?
115115
---------------------------------------------

docs/guides/wipe-environment.rst

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
Wiping a Build Environment
2+
==========================
3+
4+
Sometimes it happen that your Builds start failing because the build
5+
environment where the documentation is created is stale or
6+
broken. This could happen for a couple of different reasons like `pip`
7+
not upgrading a package properly or a corrupted cached Python package.
8+
9+
In any of these cases (and many others), the solution could be just
10+
wiping out the existing build environment files and allow Read the
11+
Docs to create a new fresh one.
12+
13+
Follow these steps to wipe the build environment:
14+
15+
* Go to **Versions**
16+
* Click on the **Edit** button of the version you want to wipe on the
17+
right side of the page
18+
* Go to the bottom of the page and click the **wipe** link, next to
19+
the "Save" button
20+
21+
.. note::
22+
23+
By wiping the documentation build environment, all the `rst`, `md`,
24+
and code files associated with it will be removed but not the
25+
documentation already built (`HTML` and `PDF` files). Your
26+
documentation will still online after wiping the build environment.
27+
28+
Now you can re-build the version with a fresh build environment!

readthedocs/templates/projects/project_version_detail.html

+7-3
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,12 @@
1616
{% block content %}
1717
<h2> Editing {{ version.slug }} </h2>
1818
<form method="post" action=".">
19-
{% csrf_token %}
20-
{{ form.as_p }}
21-
<input type="submit" value="Save">
19+
{% csrf_token %}
20+
{{ form.as_p }}
21+
<p>
22+
<input style="display: inline;" type="submit" value="{% trans "Save" %}">
23+
{% trans "or" %}
24+
<a href="{% url "wipe_version" version.project.slug version.slug %}">{% trans "wipe "%}</a>
25+
</p>
2226
</form>
2327
{% endblock %}

readthedocs/templates/projects/project_version_list.html

-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ <h1>{% trans "Active Versions" %}</h1>
4242

4343
{% if request.user|is_admin:project %}
4444
<ul class="module-item-menu">
45-
<li><a href="{% url "wipe_version" project.slug version.slug %}">{% trans "Wipe" %}</a></li>
4645
<li><a href="{% url "project_version_detail" project.slug version.slug %}">{% trans "Edit" %}</a></li>
4746
</ul>
4847
{% else %}
@@ -95,7 +94,6 @@ <h1>{% trans "Inactive Versions" %}</h1>
9594
{% if version.built %}
9695
<li><a href="{% url "project_version_delete_html" project.slug version.slug %}">{% trans "Clean" %}</a></li>
9796
{% endif %}
98-
<li><a href="{% url "wipe_version" project.slug version.slug %}">{% trans "Wipe" %}</a></li>
9997
<li><a href="{% url "project_version_detail" project.slug version.slug %}">{% trans "Edit" %}</a></li>
10098
</ul>
10199
{% endif %}

0 commit comments

Comments
 (0)