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

Add a docs favicon #469

Open
virgile-dev opened this issue Dec 2, 2024 · 7 comments
Open

Add a docs favicon #469

virgile-dev opened this issue Dec 2, 2024 · 7 comments
Assignees

Comments

@virgile-dev
Copy link
Collaborator

Bug Report

Problematic behavior
As a user I want to identify easily the browser tabs that are docs.
Right now Docs has La Marianne, which is not generic nor indicates clearly which website it is.

Expected behavior/code
I'd like to have a Docs favicon.
It should be easily overidable so that admin sys deploying docs can easily add they own favicon (the nav bar logo should be overidabel as well)

Additional context / Screenshots
Capture d’écran du 2024-12-02 12-16-02

The Favicon could be derived from this:
Capture d’écran du 2024-11-29 18-44-20
@rl-83 could you propose a design for the favicon please ?

@rl-83
Copy link
Collaborator

rl-83 commented Dec 9, 2024

@virgile-dev
Copy link
Collaborator Author

Hey @rl-83 perfect. I don't have edit access to the figma in edit. Can you export it for me in .svg (color and black and white) ? thanks

@virgile-dev virgile-dev moved this from Doing next to To do in Docs - La Suite Dec 10, 2024
@rl-83
Copy link
Collaborator

rl-83 commented Dec 10, 2024

favicon-docs
favicon-docs-mono

@virgile-dev
Copy link
Collaborator Author

@rvveber any idea we can make that easily overidable at build time like you did for the logo ?

@rvveber
Copy link
Collaborator

rvveber commented Dec 10, 2024

@virgile-dev I will take a look to find an elegant solution when i have time. Probably next week.
I was testing all kinds of methods the last two weeks.
But i haven't found something, that is easy and universal yet.

The problem is, that favicons, just like tsx modules, will be compiled into optimized files that can be served to the browser. (As it should be) this happens before/when the Image is created.
So the image contains only production optimized, minified code.
All files will be combined, renamed, compressed etc.

When an admin wants to host the image he only has access to the finished image.
He can create files in the image at runtime, but it's essentially useless because the node application has already been compiled, it does not look for them, and also can't read uncompiled code.

In the scope of favicons, it's possible, we can instruct the node application to look for the file dynamically.
But it would be at runtime not at build time

@rvveber
Copy link
Collaborator

rvveber commented Dec 10, 2024

So what an admin needs to do, to get his overrides at built-time

  1. is to pull the src from a specific version
  2. replace files, with modified files, while keeping their original names
  3. and build the image from the modified source
  4. that he then releases(locally) and uses in his deployment.

@virgile-dev
Copy link
Collaborator Author

Ideally, it'd be great that you don't have to this in a fork using config files and env variables
In another project I worked on we only do overrides (translations, themes etc.) in a deployment repo.
Have you explored this direction ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: To do
Development

No branches or pull requests

3 participants