pradyunsg / furo

A clean customizable documentation theme for Sphinx
https://pradyunsg.me/furo/quickstart
MIT License
2.76k stars 317 forks source link

Build on Read the Docs #274

Closed humitos closed 3 years ago

humitos commented 3 years ago

Hi @pradyunsg! I was experimenting with a new beta feature that we deployed yesterday in Read the Docs to allow setting a version for extra tools, for example, NodeJS (https://github.com/readthedocs/readthedocs-docker-images/issues/107)

This PR makes usage of that beta feature (build.os and build.tools configs from the .readthedocs.yaml file) to use Ubuntu 20.04 LTS and install NodeJS v14. Then, it runs npx gulp build from inside conf.py before building documentation with Sphinx.

I hope you find this useful! Let me know 😄

pradyunsg commented 3 years ago

Can you put the RTD-specific build note inside an if statement, so it only runs on RTD?

humitos commented 3 years ago

Done!

pradyunsg commented 3 years ago

LOL, this is missing the npm install needed to make things work.

https://readthedocs.org/projects/furo/builds/14861254/

humitos commented 3 years ago

Hrm, why that is not required when using nox? Or is it happening behind the scenes? I read this code: https://github.com/pradyunsg/furo/blob/main/noxfile.py#L65 and I didn't find npm install command and I thought npx was all it was needed 😞

pradyunsg commented 3 years ago

Because I run npm install already outside of nox. 😅

humitos commented 3 years ago

Sorry about the inconveniences here, I'll fix this now.

pradyunsg commented 3 years ago

You got nothing to apologise for! I'm looking forward to having my problem be "How do I migrate URLs" rather than "I can't build in RTD". :)

humitos commented 3 years ago

I opened #275 to add the npm install command --but now is failing because furo.css is not found 🙃 . I'm not sure why, but I think you may know. In any case, I'll come back to this later.

How do I migrate URLs

Let me know if I can be useful here.