You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Project: suggest a simple config file on project import wizard (#10356)
* Project: suggest a simple config file on project import wizard
As part of the "Import Wizard" steps, we add an extra step now that shows a
simple suggestion for a config file v2 (the same we currently have in our
documentation) that uses `build.os: ubuntu-22.04` and `build.tools.python:
"3.11"`.
This is an initial work to show the value we can add to this wizard with
something pretty simple. There is more work required on the copy for this
intermediate step and the UX (I added a checkbox for now to force the user to
read the message, not ideal, but works for now).
Also, it would be good to find a way to highlight the YAML syntaxis using nice
colors and add more useful copy to that intermediate page.
Related #10352
* Template: update link
* Template: add more style to the wizard config suggestion
* Template: show the file as code
* Form: swap label/help_text
* Tests: update wizard to add a new step
* Remove checkbox from suggested YAML file page
* Suggested YAML file CSS style
* Test: re-add `self.data` to test class
* Use CSS class to style the YAML shown at import step
* Add required variable in tests
* Minor style for import config step
* Split phrase to avoid scrolling
<h3>{% trans "Project configuration file (<code>.readthedocs.yaml</code>)" %}</h3>
6
+
7
+
<pclass="info">
8
+
{% blocktrans trimmed %}
9
+
Make sure your project has a <code>.readthedocs.yaml</code> at the root of your repository. This file is required by Read the Docs to be able to build your documentation. You can <ahref="https://docs.readthedocs.io/en/stable/config-file/v2.html">read more about this in our documentation</a>.
10
+
{% endblocktrans %}
11
+
</p>
12
+
13
+
<pclass="info">
14
+
Here you have an example for a common Sphinx project:
15
+
16
+
<preclass="small">
17
+
<code># .readthedocs.yaml
18
+
# Read the Docs configuration file
19
+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
20
+
21
+
# Required
22
+
version: 2
23
+
24
+
# Set the OS, Python version and other tools you might need
25
+
build:
26
+
os: ubuntu-22.04
27
+
tools:
28
+
python: "3.11"
29
+
# You can also specify other tool versions:
30
+
# nodejs: "19"
31
+
# rust: "1.64"
32
+
# golang: "1.19"
33
+
34
+
# Build documentation in the "docs/" directory with Sphinx
35
+
sphinx:
36
+
configuration: docs/conf.py
37
+
38
+
# Optionally build your docs in additional formats such as PDF and ePub
39
+
# formats:
40
+
# - pdf
41
+
# - epub
42
+
43
+
# Optionally but recommended, declare the Python requirements required
44
+
# to build your documentation
45
+
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
0 commit comments