Skip to content
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 14 commits into from
Feb 20, 2019
2 changes: 2 additions & 0 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,14 @@
'Eric': ('Eric Holscher', 'http://ericholscher.com'),
'Anthony': ('Anthony Johnson', 'http://ohess.org'),
'David': ('David Fischer', ''),
'Santos': ('Santos Gallegos', ''),
}
blog_default_author = 'Eric'

blog_locations = {
'PDX': ('Portland, Oregon', 'http://www.portlandhikersfieldguide.org/'),
'SAN': ('San Diego, CA', ''),
'CUE': ('Cuenca, Ecuador', ''),
}
blog_default_location = 'PDX'
blog_feed_archives = True
Expand Down
127 changes: 127 additions & 0 deletions configuration-file-v2.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
.. post:: January 30, 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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this meant to be a list item?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was a nested list, but it doesn't render correctly :/


- The settings are per version rather than per project.
Copy link
Contributor

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.


This would allow different versions of docs to be built with different versions of Python
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It feels weird to break up the list items like this, not sure what is trying to be done with it.

or different requirements.

- The settings live in your VCS.

- Reproducible build environments over time.

What did we change in the new version?
-------------------------------------

- All valid options from the web interface are available.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably have some introduction that isn't in bullet form. Having an entire section that is just bullets feels overly brief.

- We reorganized and rename some previous options to be more clear.
- New defaults, we don't merge the values from the web interface.
- Users can install their projects in a more flexible way.
- Strict validation for invalid options,
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
-------------------

- Pipfile support
- Show the current configuration used in each build.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, it would be good to give more context here. A list item doesn't explain anything to the user. Each of these list items should instead be paragraphs, explaining the goal, why it would be good, and perhaps linking to an issue about it.

- Redirects per version of your docs.
Copy link
Member

@ericholscher ericholscher Feb 8, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An example of how this might be expanded:

Historically we've only supported redirects at the Project level, because we didn't have version level configuration. With the addition of our YAML file, we can now support per version redirects. One use case for this is when you migrate to a new file structure in your upcoming release, but want all your old documentation links to continue working. The work around this issue is being tacked in issue #xxx.


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