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: consider referencing imgs with project relative paths #1164

Open
lread opened this issue Jan 21, 2025 · 1 comment · May be fixed by #1165
Open

docs: consider referencing imgs with project relative paths #1164

lread opened this issue Jan 21, 2025 · 1 comment · May be fixed by #1165

Comments

@lread
Copy link
Contributor

lread commented Jan 21, 2025

Currently...

In the malli docs, I see some lovely images.

But...

Some of these images are referenced absolutely, for example:

<img src="https://raw.githubusercontent.com/metosin/malli/master/docs/img/dot.png"/>

This means...

Regardless of what revision of malli docs a user is looking at, the master revision is always used.
This is not an issue if folks are looking at the latest docs, but if looking at older docs (with tools like cljdoc), this is not so great.

Also...

I see a couple of images referenced like so:

<img src="https://github.com/metosin/malli/blob/master/docs/img/pretty-coerce.png" width=800>

Notice that this is not referencing the raw image. GitHub must compensate for this, but cljdoc does not, and these images are broken on cljdoc.

Proposal

I can take a sweep through the docs and fixup img refs for you.

For example this:

<img src="https://raw.githubusercontent.com/metosin/malli/master/docs/img/dot.png"/>

Would become:

![](/docs/img/dot.png)

And this:

<img src="https://github.com/metosin/malli/blob/master/docs/img/pretty-coerce.png" width=800>

Would become:

<img src="/docs/img/pretty-coerce.png" width=800>

Sound good? If so, lemme know, and I will create a PR.

@lread lread changed the title docs: consider referencing img with project relative paths docs: consider referencing imgs with project relative paths Jan 21, 2025
@lread
Copy link
Contributor Author

lread commented Jan 23, 2025

From CONTRIBUTING.md:

For small changes, such as bug fixes or documentation changes, feel free to send a pull request

So, I'll proceed with the PR.

lread added a commit to lread/malli that referenced this issue Jan 23, 2025
Mostly images, but also fixed one doc link from changelog.

Closes metosin#1164
@lread lread linked a pull request Jan 23, 2025 that will close this issue
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 a pull request may close this issue.

1 participant