Skip to content

Support Bluesky in Dashboard navigation #13566

@cderv

Description

@cderv

https://quarto.org/docs/dashboards/layout.html#navigation

const kNavButtonAliases: Record<
string,
(text?: string) => Promise<NavButton | undefined>
> = {
linkedin: (text?: string) => {
return Promise.resolve({
icon: "linkedin",
title: "LinkedIn",
href: `https://www.linkedin.com/sharing/share-offsite/?url=|url|&title=${
text ? encodeURI(text) : undefined
}`,
});
},
facebook: (_text?: string) => {
return Promise.resolve({
icon: "facebook",
title: "Facebook",
href: "https://www.facebook.com/sharer/sharer.php?u=|url|",
});
},
reddit: (text?: string) => {
return Promise.resolve({
icon: "reddit",
title: "Reddit",
href: `https://reddit.com/submit?url=|url|&title=${
text ? encodeURI(text) : undefined
}`,
});
},
twitter: (text?: string) => {
return Promise.resolve({
icon: "twitter",
title: "Twitter",
href: `https://twitter.com/intent/tweet?url=|url|&text=${
text ? encodeURI(text) : undefined
}`,
});
},
github: async (_text?: string) => {
const context = await gitHubContext(Deno.cwd());
if (context.repoUrl) {
return {
icon: "github",
title: "GitHub",
href: context.repoUrl,
} as NavButton;
} else {
warning(
"Unable to determine GitHub repository for the `github` nav-button. Is this directory a GitHub repository?",
);
return undefined;
}
},
};

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions