Doc: add a link to call the 'ewoks' main project.#82
Conversation
| "navbar-logo", | ||
| "navbar-ewoks-logo", |
|
I like the alternative: having ewoks on par with GitHub, GitLab etc. |
woutdenolf
left a comment
There was a problem hiding this comment.
Similar to @loichuder I would prefer having ewoks on par with GitHub, GitLab etc.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
| { | ||
| "name": "ewoks", | ||
| "url": "https://ewoks.readthedocs.io/en/stable", | ||
| "icon": "_static/ewoks-logo.svg", # This svg contains dark / light mode information | ||
| "type": "local", | ||
| }, |
There was a problem hiding this comment.
So other projects will take an URL to this icon?
There was a problem hiding this comment.
No the idea was to have a file locally.
We could have an url but it would be on the https://gitlab.esrf.fr/workflow/ewoksadmin/ewoksdoc/ I guess.
There was a problem hiding this comment.
Yes, I think it would be easier to have an URL in ewoksdoc to avoid adding the file in every project
There was a problem hiding this comment.
I give it a quick test but when switching to url then the image url is only "reported"
<img width="653" height="98" alt="image" src="https://github.com/user-attachments/assets/b610cc2d-8103-48d5-b22d-e4da44c30ce6" />
So this way works for .png for example but my browser is blocking the rendering when using .svg. It seems to comes from the way the server is serving the file... for security reasons but to be honest this is where my expertise stops. Maybe you have more knowledge / hint on this @loichuder ?
And as we have the handling of the theme switching to .png or other file format will not be sufficient.
There was a problem hiding this comment.
So this would work
{
"name": "ewoks",
"url": "https://ewoks.readthedocs.io/en/stable",
"icon": "https://ewoks.esrf.fr/en/latest/_static/ewoks-link-icon.png",
"type": "url",
}
but this would fail
{
"name": "ewoks",
"url": "https://ewoks.readthedocs.io/en/stable",
"icon": "https://ewoks.esrf.fr/en/latest/_static/ewoks-link-icon.svg",
"type": "url",
}
Is that the point? Weird.
There was a problem hiding this comment.
Works on my end with
{
"name": "ewoks",
"url": "https://ewoks.readthedocs.io/en/stable",
"icon": "https://raw.githubusercontent.com/ewoks-kit/ewoksutils/refs/heads/81-documentation-add-an-icon-that-links-to-the-main-documentation/doc/_static/ewoks-logo.svg",
"type": "url",
},
There was a problem hiding this comment.
So this would work
{ "name": "ewoks", "url": "https://ewoks.readthedocs.io/en/stable", "icon": "https://ewoks.esrf.fr/en/latest/_static/ewoks-link-icon.png", "type": "url", }but this would fail
{ "name": "ewoks", "url": "https://ewoks.readthedocs.io/en/stable", "icon": "https://ewoks.esrf.fr/en/latest/_static/ewoks-link-icon.svg", "type": "url", }Is that the point? Weird.
Yes exactly. And the examples they are provided about this is outdated. I hope the 'web experts' will be able to provide some input. It could be for security reason (but as I said I don't have expertise on this) This is more an observation but I was not able to have my finger on the clear explanation.
There was a problem hiding this comment.
It seems that you can't use https://github.com to access the file since some cookies seem to be included. Using https://raw.githubusercontent.com/ works fine though.
There was a problem hiding this comment.
Note for future reference for Gitlab: we have to use https://gitlab.esrf.fr/.../-/raw/main/... instead of https://gitlab.esrf.fr/.../-/blob/main/...
There was a problem hiding this comment.
The .svg contains information on a style section on how to fill colors according to the theme.
There was a problem hiding this comment.
The CSS should also apply to circle, not only to path.
Other than that, it is a great idea 👍
38629f5 to
963574b
Compare

details
Closes #81
This PR propose to add a link to the 'root documentation' by adding a logo in the doc navigation bar
Current implementation
The current implementation add a (local) icon to the "html_theme_options/icon_links".
The .svg contains information to adapt to the theme (dark / light)
First implementation (Outdated)
The first implementation was
Alternative
An alternative could be to provide this link / icon in the sphinx "icon_links". Complexity is comparable. To be honest I don't have any strong... or even medium on this.