Thanks to visit codestin.com
Credit goes to github.com

Skip to content

added instructions for viewing docs locally#9194

Open
TabError wants to merge 1 commit intorclone:masterfrom
TabError:update-docs-contributor-docs
Open

added instructions for viewing docs locally#9194
TabError wants to merge 1 commit intorclone:masterfrom
TabError:update-docs-contributor-docs

Conversation

@TabError
Copy link
Contributor

After editing the source code and adding new commands or flags the documentation needs to be built again. Therefore rclone needs to be built from the source code. Then one needs to run rclone gendocs. But there is also a make target 'commanddocs' which automates this but wasn't documented anywhere.

What is the purpose of this change?

I am a new contributor and while working on another PR i had a hard time figuring out why my local version of the docs didn't show up correctly.

Checklist

  • I have read the contribution guidelines.
  • I have added tests for all changes in this PR if appropriate.
  • I have added documentation for the changes if appropriate.
  • All commit messages are in house style.
  • I'm done, this Pull Request is ready for review :-)

After editing the source code and adding new commands or flags the
documentation needs to be built again. Therefore rclone needs to be
built from the source code. Then one needs to run `rclone gendocs`.
But there is also a make target 'commanddocs' which automates this but
wasn't documented anywhere.
go generate ./lib/transform
-@rmdir -p '$$HOME/.config/rclone'
XDG_CACHE_HOME="" XDG_CONFIG_HOME="" HOME="\$$HOME" USER="\$$USER" rclone gendocs --config=/notfound docs/content/
XDG_CACHE_HOME="" XDG_CONFIG_HOME="" HOME="\$$HOME" USER="\$$USER" ./rclone gendocs --config=/notfound docs/content/
Copy link
Contributor

Choose a reason for hiding this comment

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

I'll let @ncw weigh in on this, as I think it was intentional to rely on GOPATH. That said, it has definitely tripped me up before. There's probably some improvement (even if not this one) that would be worth making to make things easier for new developers.

Copy link
Contributor Author

@TabError TabError Feb 21, 2026

Choose a reason for hiding this comment

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

In our Makefile is there any use of rclone that is bound to the build from the source code itself?
Most targets involving rclone are uploads of the docs or for (beta) releases. So in these cases it is irrelevant which version rclone has. In lines 235 and 237 it explicitly calls the local version too:

rclone/Makefile

Line 235 in 7d0a8bf

./rclone --no-check-dest --config bin/ci.rclone.conf -v copy build/ $(BETA_UPLOAD)/testbuilds

Comment on lines +25 to +30
## Changes on commands

If you have worked on the commands in `cmd/*` and you want to see the
changed docs locally, you can run `make commanddocs serve` to
regenerate the command docs and serve the website locally.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks.

I'm thinking, maybe this should be moved to the CONTRIBUTING.md instead? There is a quite detailed section about writing documentation, but it focuses mostly on backend docs. Command docs is mentioned towards the end of that section, but it could use some mentioning of the make commanddocs / rclone gendocs part.

Maybe a link from here and into the CONTRIBUTING.md would be relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants