Skip to content

Doc: add a link to call the 'ewoks' main project.#82

Merged
payno merged 7 commits into
mainfrom
81-documentation-add-an-icon-that-links-to-the-main-documentation
Jun 10, 2026
Merged

Doc: add a link to call the 'ewoks' main project.#82
payno merged 7 commits into
mainfrom
81-documentation-add-an-icon-that-links-to-the-main-documentation

Conversation

@payno

@payno payno commented Jun 5, 2026

Copy link
Copy Markdown
Member

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)

Screenshot from 2026-06-09 06-53-07 Screenshot from 2026-06-09 06-52-54

First implementation (Outdated)

The first implementation was

Screenshot from 2026-06-05 15-46-22

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.

image

@payno payno linked an issue Jun 5, 2026 that may be closed by this pull request
Comment thread doc/conf.py Outdated
Comment on lines +70 to +71
"navbar-logo",
"navbar-ewoks-logo",

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Inverting order here also invert the logo in the navbar. Then this more a question of taste as for adding a text near the ewoks root doc icon.

Image

@payno payno requested a review from a team June 5, 2026 13:53
@loichuder

Copy link
Copy Markdown
Member

I like the alternative: having ewoks on par with GitHub, GitLab etc.

@woutdenolf woutdenolf left a comment

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.

Similar to @loichuder I would prefer having ewoks on par with GitHub, GitLab etc.

@codecov

codecov Bot commented Jun 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Comment thread doc/conf.py
Comment on lines +65 to +70
{
"name": "ewoks",
"url": "https://ewoks.readthedocs.io/en/stable",
"icon": "_static/ewoks-logo.svg", # This svg contains dark / light mode information
"type": "local",
},

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is adding the icon

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.

So other projects will take an URL to this icon?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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.

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.

Yes, I think it would be easier to have an URL in ewoksdoc to avoid adding the file in every project

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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.

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.

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.

@loichuder loichuder Jun 9, 2026

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.

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",
},

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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.

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.

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.

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.

Note for future reference for Gitlab: we have to use https://gitlab.esrf.fr/.../-/raw/main/... instead of https://gitlab.esrf.fr/.../-/blob/main/...

Comment thread doc/_static/ewoks-logo.svg Outdated

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The .svg contains information on a style section on how to fill colors according to the theme.

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.

The CSS should also apply to circle, not only to path.

Other than that, it is a great idea 👍

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I think e8cac28 should take care if it.

@payno payno requested a review from woutdenolf June 9, 2026 05:01
@payno payno force-pushed the 81-documentation-add-an-icon-that-links-to-the-main-documentation branch from 38629f5 to 963574b Compare June 9, 2026 05:19
@payno payno requested a review from loichuder June 10, 2026 09:09

@loichuder loichuder left a comment

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.

Thanks!

@payno payno merged commit 1edd3b2 into main Jun 10, 2026
11 of 12 checks passed
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.

Documentation: add an icon that links to the main documentation

3 participants