-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Post about new configuration file #59
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
1c36df5
First draft about new configuration file
stsewd 88baaa6
Show more examples
stsewd 75b7226
Mention internship
stsewd bd1d587
Update configuration-file-v2.rst
davidfischer 5320aad
Updates from review
stsewd 60a138c
Fix nested list
stsewd ca4d627
Merge branch 'master' into post-config-file
stsewd 5ccfb87
Fix merge
stsewd 9b9187d
Expand post
stsewd 0a18f4d
Update configuration-file-v2.rst
ericholscher d5d6aae
Update configuration-file-v2.rst
ericholscher bc66d57
Update date
stsewd 5352a99
Fix header
stsewd 8d1b898
Today!
stsewd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,149 @@ | ||
.. post:: February 20, 2019 | ||
:tags: feature | ||
:author: Santos | ||
:location: CUE | ||
|
||
New Configuration File | ||
====================== | ||
|
||
We are happy to announce the new version of the `Read the Docs configuration file`_ (v2). | ||
|
||
.. _Read the Docs configuration file: https://docs.readthedocs.org/en/latest/config-file/v2 | ||
|
||
.. code-block:: yaml | ||
|
||
version: 2 | ||
python: | ||
version: 3.7 | ||
install: | ||
- requirements: docs/requirements.txt | ||
sphinx: | ||
configuration: docs/conf.py | ||
formats: all | ||
|
||
If you are a recurrent Read the Docs user, | ||
chances are that you've configured your projects using a `.readthedocs.yml` file. | ||
|
||
Using the web interface is quick, | ||
but the main advantages of using a configuration file over the web interface are: | ||
|
||
- Some settings are only available using a configuration file. | ||
We are moving away from using the web interface. | ||
|
||
- The settings are per version rather than per project. | ||
This would allow different versions of docs to be built with different versions of Python | ||
or different requirements. | ||
|
||
- The settings live in your VCS. | ||
|
||
- Reproducible build environments over time. | ||
|
||
What did we change in the new version? | ||
-------------------------------------- | ||
|
||
**All the configurations from the web interface**. | ||
In the past not all options from the web interface were available in the configuration file, | ||
now they are! | ||
We also reorganized and renamed some options to make them more clear. | ||
|
||
**New defaults**, | ||
we don't merge the values from the web interface, | ||
because this was confusing our users. | ||
This also allows us to change defaults without breaking existing projects. | ||
|
||
**More flexible installations**, | ||
users can install their projects in a more flexible way, | ||
like multiple requirements and packages from different locations. | ||
stsewd marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
**Strict validation** for invalid options in the configuration file, | ||
to avoid typos and provide more feedback on invalid configurations. | ||
|
||
New features | ||
------------ | ||
|
||
- MkDocs support (previously it was only supported from the web interface). | ||
|
||
.. code-block:: yaml | ||
|
||
version: 2 | ||
mkdocs: | ||
configuration: mkdocs.yml | ||
fail_on_warning: true | ||
|
||
- More control over Sphinx. | ||
|
||
.. code-block:: yaml | ||
|
||
version: 2 | ||
sphinx: | ||
builder: html | ||
configuration: docs/source/conf.py | ||
fail_on_warning: true | ||
|
||
- Control over submodules, we don't always need them all to build our docs. | ||
|
||
.. code-block:: yaml | ||
|
||
version: 2 | ||
submodules: | ||
include: | ||
- third-party/dependency | ||
recursive: true | ||
|
||
- Support for multiple packages/requirements installations. | ||
|
||
.. code-block:: yaml | ||
|
||
version: 2 | ||
python: | ||
version: 3.7 | ||
install: | ||
- requirements: docs/requirements.txt | ||
- requirements: requirements.txt | ||
- method: pip | ||
path: package | ||
|
||
Future improvements | ||
------------------- | ||
|
||
We are already planning new features to support more projects and use cases. | ||
|
||
**Pipfile support**, this is one of our more requested features, | ||
and we are going to ship it soon. | ||
Keep an eye in `#3181`_. | ||
|
||
**Show the configuration used in each build**. | ||
We want to make more explicit to the users how we are building their docs. | ||
|
||
**Redirects per version** of your docs. | ||
Currently users can define global redirects only from the web interface, | ||
this is hard to maintain and review. | ||
One use case is when you change your docs structure between versions. | ||
Keep track of this upcoming feature in `#4221`_. | ||
|
||
.. _#3181: https://github.com/rtfd/readthedocs.org/issues/3181 | ||
.. _#4221: https://github.com/rtfd/readthedocs.org/issues/4221 | ||
|
||
Start using it | ||
-------------- | ||
|
||
The full docs about the new version are available `here <http://docs.readthedocs.org/en/latest/config-file/v2>`__. | ||
|
||
If you are using the v1, you can update to v2 following our `migration docs`_. | ||
|
||
.. _migration docs: http://docs.readthedocs.org/en/latest/config-file/v2#migrating-from-v1 | ||
|
||
If you have a problem using the configuration file, feel free to `file an issue`_. | ||
|
||
.. _`file an issue`: http://github.com/rtfd/readthedocs.org/issues | ||
|
||
Summer internship | ||
----------------- | ||
|
||
This project was part of my summer internship in Read the Docs, | ||
it was held at the same time as the Google Summer of Code (GSoC) project. | ||
|
||
Thanks to the `core team`_ (Anthony, David, Eric, and Manuel) for helping me in the process. | ||
Thanks to all contributors, sponsors, donors and users of Read the Docs to make the project sustainable. | ||
|
||
.. _core team: https://docs.readthedocs.io/en/latest/team.html#development-team |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Firstly, talking about the advantages of the config file is fantastic 💯!
However, I'd like to see some more details of some of these advantages. That could go lower down in the body or it could go right here. Some of them like "settings live in version control" are pretty straight forward, but settings being per version rather than per project requires a bit of explanation. For example, this would allow different versions of docs to be built with different versions of Python or different requirements.