Documenter.makedocs not tracking changes to code

:blush: See below, I forgot Revise!

I don’t understand what’s happening hen I use Documenter.makedocs() to create documentation for my package. I’ve performed the following steps:

  1. Initialize a template for document generation with
    cd MY_PKG
    (...) pkg> activate .
    julia> using DocumenterTools
    julia> DocumenterTools.generate()
  2. Add
    to docs\src\
  3. Add some doc comments to the source of the module
  4. Add an additional starter example file, e.g., to docs/source containing something like
     Modules = [MY_PKG]
  5. Edit make.jl to contain
    using Documenter
    using CryptoEnigma
        sitename = "MY_PKG Documentation",
        format = Documenter.HTML(prettyurls = false),
        modules = [MY_PKG],
        pages = [
            "Index" => "",
            "An other page" => "",
  6. Make documentation by running
    cd MY_PKG
    (...) pkg> activate .
    julia>  include("docs/make.jl")

This creates the expected documentation with links to source in the correct places.

But if I change my code to add some new doc comments, and again run include("docs/make.jl"), the changes are not reflected in the documentation. At first I thought this was because (is this true?) makedocs is looking at committed changes only. So I committed them and got the same result: unchanged documentation. Then I thought that perhaps the changes need to be pushed, so I did that too, but still got the same documentation — except then the links went to the wrong places in the committed and pushed source files (since those did reflect the additional doc comments).

What’s going on here? How do I get my generated documentation to track changes to my code. I must be missing a step in the workflow somewhere.

Oh wait! I wasn’t using Revise. If I use that changes are reflected in the generated documentation, though (naturally) the source links don’t go to the right place until I commit and push.