Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs to use relative code links. #1447

Merged
merged 3 commits into from
Jul 1, 2022

Conversation

jpeach
Copy link
Contributor

@jpeach jpeach commented Jun 11, 2022

Changes

Use relative links to locations within the same repository. This means
that in the Github UI the reader will follow the link to the location
in the same branch rather than to a fixed, predetermined branch.

@jpeach jpeach requested a review from a team June 11, 2022 05:13
Copy link
Member

@lalitb lalitb left a comment

Choose a reason for hiding this comment

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

Thanks. LGTM with a minor fix.

docs/dependencies.md Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jun 11, 2022

Codecov Report

Merging #1447 (797426e) into main (4c08919) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1447   +/-   ##
=======================================
  Coverage   85.31%   85.31%           
=======================================
  Files         154      154           
  Lines        4377     4377           
=======================================
  Hits         3734     3734           
  Misses        643      643           

@jpeach jpeach force-pushed the relative-docs-links branch from 1186a8d to 00a4ef9 Compare June 11, 2022 06:52
@jpeach
Copy link
Contributor Author

jpeach commented Jun 13, 2022

docfx hates this apparently

[22-06-11 07:14:47.612]Warning:[BuildCore.Build Document.LinkPhaseHandlerWithIncremental.ConceptualDocumentProcessor.Save](docs/dependencies.md#L17)Invalid file link:(~/exporters/etw/include/opentelemetry/exporters/etw/TraceLoggingDynamic.h).
[22-06-11 07:14:47.612]Warning:[BuildCore.Build Document.LinkPhaseHandlerWithIncremental.ConceptualDocumentProcessor.Save](docs/dependencies.md#L24)Invalid file link:(~/sdk).

@lalitb
Copy link
Member

lalitb commented Jun 13, 2022

docfx hates this apparently

[22-06-11 07:14:47.612]Warning:[BuildCore.Build Document.LinkPhaseHandlerWithIncremental.ConceptualDocumentProcessor.Save](docs/dependencies.md#L17)Invalid file link:(~/exporters/etw/include/opentelemetry/exporters/etw/TraceLoggingDynamic.h).
[22-06-11 07:14:47.612]Warning:[BuildCore.Build Document.LinkPhaseHandlerWithIncremental.ConceptualDocumentProcessor.Save](docs/dependencies.md#L24)Invalid file link:(~/sdk).

Yes, I think we can fix TraceLoggingDynamic.h error by adding the exporters/**.{cc|h} in the resource/files section of docfx.json, but we need to see how to support relative links to internal github directories. Let me check if I can find something. Tagging @reyang just in case he has an idea.

@ThomsonTan
Copy link
Contributor

Could we please try remove the prefix .. and make it path relative to the repo?

Use relative links to locations within the same repository. This means
that in the Github UI the reader will follow the link to the location
in the same branch rather than to a fixed, predetermined branch.

Signed-off-by: James Peach <jpeach@cloudflare.com>
@jpeach jpeach force-pushed the relative-docs-links branch from 507be83 to 28f5032 Compare June 22, 2022 05:24
@jpeach
Copy link
Contributor Author

jpeach commented Jun 22, 2022

Updated to use root-relative links, and docfx seems happy.

@lalitb lalitb merged commit e372ce5 into open-telemetry:main Jul 1, 2022
@jpeach jpeach deleted the relative-docs-links branch July 4, 2022 04:10
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