Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions lib/ex_doc.ex
Original file line number Diff line number Diff line change
Expand Up @@ -201,12 +201,12 @@ defmodule ExDoc do
### Using `:source_url` and `:source_ref` together

A common setup for a project or library is to set both `:source_url` and `:source_ref`. Setting
both of them will allow ExDoc to link to specific version of the code for a function or module
that matches the version of the docs. So if the docs have been generated for version 1.0.5 then
both of them will allow ExDoc to link to a specific version of the code for a function or module
that matches the version of the docs. If the docs have been generated for version 1.0.5,
clicking on the source link in the docs will take the browser to the source code for the 1.0.5
version of the code instead of only the primary ref (for example, `main`).
version of the code instead of the primary ref (for example, `main`).

A example setup looks like:
An example setup:

@version "0.30.10"
def project do
Expand All @@ -225,9 +225,9 @@ defmodule ExDoc do
]
end

If you use `source_ref: "v#{@version}"` then when publishing a new version of your package you
should run `git tag vVERSION` and push the tag. This way, ExDoc will generate links to the
specific version the docs were generated for.
If you use `source_ref: "v#{@version}"`, you should run `git tag vVERSION` and push the tag when
publishing a new version of your package; ExDoc will generate links to the specific version for
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't think we use ; anywhere in the docs (basically, I don't think I am fluent enough to know when a ; should be used), so I tend to not use it for consistency. :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No problem - use of them is entirely optional and I can get rid of it if you like.

I like using them as they do help specify relatedness. Like the full stop, the semi-colon begins a new independent clause, but indicates that the latter is closely related to the former. In other words: between a comma and a full stop. :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'll leave the semi-colon in for now and get this merged. Feel free to ping me if you'd prefer it use a full stop.

which the docs were generated.

## Additional pages (extras)

Expand Down