You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm glad that you have a logo parameter in the theme config. But I think it doesn't allow us to add a link. Usually the logo link points to the homepage of the website. Please add that capability.
Here is the workaround/hack I came up with (without ejecting) because a whole bunch of people in my company started complaining. Solution: Simply override the URL via some JS after the document is loaded using a setTimer. Put this code in the head array section within config.js
//Hack: Make clicking on the logo go to home url
["script",
{},
`
const logoUrlChanger = setInterval(function() {
//Anchor above the logo image
const homeEls = document.getElementsByClassName("home-link");
if(homeEls.length > 0) {
const homeEl = homeEls[0];
homeEl.setAttribute("href", "https://YOUR-URL.com");
homeEl.setAttribute("onclick", "document.location='https://YOUR-URL.com';return false;");
clearInterval(logoUrlChanger);
}
//Actual logo image
const logoEls = document.getElementsByClassName("logo")
if(logoEls.length > 0) {
const logoEl = logoEls[0]
logoEl.setAttribute("onclick", "document.location='https://YOUR-URL.com';return false;");
clearInterval(logoUrlChanger);
}
}, 1000)
`
]
The workaround leaves console log syntax errors (doesn't seem to impact functionality though)..so it would still be great to see this implemented. Looks like there is progress with this PR but it seems blocked? #1015
Feature request
I'm glad that you have a
logo
parameter in the theme config. But I think it doesn't allow us to add a link. Usually the logo link points to the homepage of the website. Please add that capability.What problem does this feature solve?
What does the proposed API look like?
How should this be implemented in your opinion?
Are you willing to work on this yourself?**
No
The text was updated successfully, but these errors were encountered: