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

docs: Make README links work if viewed in code repository #99

Merged
merged 1 commit into from
Jan 23, 2024

Conversation

gunnar-mb
Copy link
Collaborator

@gunnar-mb gunnar-mb commented Jan 23, 2024

Author: Gunnar Andersson <[email protected]>, MBition GmbH.

Confusing links in README.md inside docs/

The links in README.md inside of docs/ work correctly when viewed through GitHub pages, but if someone looked directly at the README in the code repository, the links go to not-yet-generated documentation files, and this was not obvious. Now, by linking directly to the published GitHub pages explicitly, the links will work also when viewed inside of the code repository.


The program was tested solely for our own use cases, which might differ from yours.

The submission is provided under the main project license (LICENSE file in root of project).

Provider Information

An unexpected feature of the README-to-GitHub Pages conversion is that
any link in the docs/README.md that refers to a **generated** file, will
of course appear as 404 if it was clicked from within the code
repository.

The root of the GitHub pages is generated from README.md, which is of
course easy to find (and even displayed automatically by GitHub while
navigating the code tree into the docs directory).

Generated files are not stored in the repository, so those links only
work when the README is viewed as part of the GitHub Pages.
The old style works from within the GitHub pages where the generated
files actually exist.

Specifying an absolute URL for each one feels less future-proof than a
relative path, but it needs to be done so that there are not broken
links for anyone who finds the README via the code repository tree
instead of the GitHub Pages.

The links to files that are static (exist already under docs) were
left as relative links, since they work in both situations.

Signed-off-by: Gunnar Andersson <[email protected]>
@gunnar-mb gunnar-mb merged commit 605c32f into COVESA:master Jan 23, 2024
3 checks passed
@gunnar-mb gunnar-mb deleted the fix_readme_links branch June 4, 2024 13:30
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.

1 participant