Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@
"url": "https://pypi.org/project/ewoksutils",
"icon": "fa-brands fa-python",
},
{
"name": "ewoks",
"url": "https://ewoks.readthedocs.io/en/stable",
"icon": "https://gitlab.esrf.fr/workflow/ewoksadmin/ewoksdoc/-/raw/main/logos/ewoks_for_sphinx_theme.svg", # This svg contains dark / light mode information
"type": "local",
},
Comment on lines +65 to +70

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/...

],
"logo": {
"text": docstitle,
Expand Down
Loading