How to make the "Docs" button work in PkgTemplates autogenerated Readme

I basically used the second example from the PkgTemplates Readme:

t = Template(;
        Git(; manifest=true, ssh=true),
        TravisCI(; x86=true),

This makes a Readme for the new package with a button like:

However, when I click this I get a 404 error, even though there are a bunch of docstrings in the various src files.

How do I make sure that when I push to the repo, it renders the docstrings in all the files and make this button link to them?

The documentation is generated in the gh-pages branch in your repo, and you might have to instruct github to use that branch in your repo settings. Have you set the secrets up correctly in travis and github so that the documentation is being built and pushed to your gh-pages branch correctly?

Thanks @jishnub!

There are a couple things I’m still confused about:

  1. Regarding Documenter{TravisCI}(), what does TravisCI have to do with docstrings or Documenter.jl? I’m getting Travis build reports for my unit tests on each commit, so Travis authentication isn’t the issue.
  2. Is gh-pages a web-hosting thing I have to sign up for or is it somehow living inside the project repo?

The documentation is built and deployed by the CI that’s why it is used with Documenter. If I recall correctly the stable documentation will only be available after you tag a release. Before that you should still have the dev button.