Skip to content

Commit

Permalink
Website sidebar - align property
Browse files Browse the repository at this point in the history
Even though we had documented `alignment`, we did actually respect `align`. This restores the old behavior (but preferring `alignment`).

Fixes #8510
  • Loading branch information
dragonstyle committed Jan 30, 2024
1 parent 1693084 commit e395468
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/project/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ export interface Sidebar {
subtitle?: string;
logo?: string;
alignment?: "left" | "right" | "center";
align?: "left" | "right" | "center"; // This is here only because older versions of Quarto used to use it even though it wasn't documented
background?:
| "none"
| "primary"
Expand Down
2 changes: 1 addition & 1 deletion src/project/types/website/website-navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1004,7 +1004,7 @@ async function sidebarEjsData(project: ProjectContext, sidebar: Sidebar) {

// ensure collapse & alignment are defaulted
sidebar[kCollapseLevel] = sidebar[kCollapseLevel] || 2;
sidebar.alignment = sidebar.alignment || "left";
sidebar.alignment = sidebar.alignment || sidebar.align || "left";

sidebar.pinned = sidebar.pinned !== undefined ? !!sidebar.pinned : false;

Expand Down

0 comments on commit e395468

Please sign in to comment.