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

cannot set conf.py on readthedocs advanced settigns #11186

Closed
RunningLeon opened this issue Mar 5, 2024 · 4 comments
Closed

cannot set conf.py on readthedocs advanced settigns #11186

RunningLeon opened this issue Mar 5, 2024 · 4 comments
Labels
Support Support question

Comments

@RunningLeon
Copy link

hi, recently find that there's no option to set conf.py of sphinx as before. So how to set docs/en/conf.py and docs/zh_cn/conf.py for different languages?

image

@humitos
Copy link
Member

humitos commented Mar 5, 2024

Hi @RunningLeon 👋🏼 . We don't support setting build options from the WebUI anymore. Read more about this in https://blog.readthedocs.com/migrate-configuration-v2/

You need to add a .readthedocs.yaml file to your project and use sphinx.configuration to define your conf.py. See https://blog.readthedocs.com/migrate-configuration-v2/

Let us know if that works for you.

@humitos humitos closed this as completed Mar 5, 2024
@humitos humitos added the Support Support question label Mar 5, 2024
@RunningLeon
Copy link
Author

RunningLeon commented Mar 5, 2024

@humitos hi, thanks for your quick reply. But it still cannot build docs of Chinese version. Here are Changes:
1 Add conf.py in .readthedocs.yaml and create another .readthedocs-zh_cn.yaml for Chinese version as in PR.
2. Change to the path of config as .readthedocs-zh_cn.yaml and saved in Advanced settings page.
3. But as the PR triggers, the build of zh-cn version still uses .readthedocs.yaml instead of .readthedocs-zh_cn.yaml as the log shows: https://readthedocs.org/api/v2/build/23647719.txt

image

@humitos
Copy link
Member

humitos commented Mar 5, 2024

I suppose that you should be getting a form validation error since the filename must be called .readthedocs.yaml. It can be named differently. So, you may need to put it under a different directory, like docs/zh-cn/.readthedocs.yaml

@RunningLeon
Copy link
Author

Hi, thanks. putting the file .readthedocs.yaml in docs/en and docs/zh_cn works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Support Support question
Projects
None yet
Development

No branches or pull requests

2 participants