-
Notifications
You must be signed in to change notification settings - Fork 35
👣 Allow custom primary sidebar footer #613
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
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
ee4895e
plaque toggle WIP
artoftheblue 10e08c8
add plaque toggle option (should be final)
artoftheblue efe21b2
changeset
artoftheblue e25f96a
change site.options.hide_myst_branding into site.parts.sidebar_footer
artoftheblue eb89a6f
Add .agents to .gitignore for worktree workspace
choldgraf 6f7b671
Merge branch 'main' into myst-plaque-toggle
choldgraf c315a5f
Enhance sidebar footer logic a bit:
choldgraf c72f652
Apply suggestion from @choldgraf
choldgraf 7e88a30
Delete .gitignore
choldgraf 8a0550c
oops - put back gitignore
choldgraf 804f922
Use same styling as article + footer
stefanv File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| --- | ||
| '@myst-theme/site': patch | ||
| '@myst-theme/book': patch | ||
| --- | ||
|
|
||
| Add project.parts.primary_sidebar_footer option |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -38,4 +38,4 @@ _build | |
|
|
||
| # yalc | ||
| .yalc | ||
| yalc.lock | ||
| yalc.lock | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| **Custom Footer** | [GitHub](https://github.com/jupyter-book/myst-theme) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| import type { GenericParent } from 'myst-common'; | ||
| import { MyST } from 'myst-to-react'; | ||
| import { MadeWithMyst } from '@myst-theme/icons'; | ||
|
|
||
| export function SidebarFooter({ content }: { content?: GenericParent }) { | ||
| if (!content) { | ||
| return <MadeWithMyst />; | ||
| } | ||
|
|
||
| return ( | ||
| <div className="article footer myst-primary-sidebar-footer"> | ||
| <MyST ast={content} /> | ||
| </div> | ||
| ); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a follow-up, we may want to rename
footerhere to something more descriptive, since this does not refer to the main page footer.Maybe
sidebarFooter.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO, ideally this would be primarySidebarFooter and it could live alongside secondarySidebarFooter one day. Or, call it something more generic like
primarySidebarEndto recognize that other things than footers might be placed there one day.I think my suggestion would be we just try to re-use the JB1 structure naming as much as possible for the book theme, since it has been used and battle-tested for a long time now:
https://pydata-sphinx-theme.readthedocs.io/en/stable/user_guide/layout.html