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

home config option #1689

Merged
merged 6 commits into from
Sep 27, 2024
Merged

home config option #1689

merged 6 commits into from
Sep 27, 2024

Conversation

mbostock
Copy link
Member

This adds a home config option which allows overriding how the link to the home page appears in the sidebar. In particular, this allows our docs site to show the Observable logo in the top-left rather than in the fixed header. When the sidebar is shown (either because the page is wide enough to show it naturally, or because it was displayed manually), we hide the Observable logo in the header to avoid showing it twice.

Screenshot 2024-09-26 at 5 52 25 PM

When the sidebar is hidden, the Observable logo reappears in the header as today.

Screenshot 2024-09-26 at 5 52 51 PM

Probably need some tests and polish so marking as draft for now.

@mbostock mbostock requested review from Fil and CobusT September 27, 2024 00:55
@mbostock mbostock marked this pull request as draft September 27, 2024 00:55
@CobusT
Copy link
Contributor

CobusT commented Sep 27, 2024

Nice. Is the plan to use logo when rendering home/title also? I didn't see where that was being used in this PR yet, instead of putting the logo's svg in the home definition?

@mbostock
Copy link
Member Author

I originally implemented a logo option but I decided to replace it with a home option instead (incorporating both title and what would have been logo). Did I accidentally leave some of that code in this PR? I’ll remove it when I polish and add docs etc.

@mbostock mbostock marked this pull request as ready for review September 27, 2024 15:45
@mbostock mbostock enabled auto-merge (squash) September 27, 2024 15:45
@mbostock mbostock merged commit 120b2ff into main Sep 27, 2024
4 checks passed
@mbostock mbostock deleted the mbostock/home branch September 27, 2024 17:53
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.

2 participants