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

[CONFIG PROMOTE] Add social preview & System preferenced theme #250

Merged
merged 2 commits into from
Aug 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,30 @@ const announcementBar = {
isCloseable: false, // Defaults to `true`.
};

/** @type {Config["themeConfig"]["colorMode"]} */
const colorMode = {
respectPrefersColorScheme: true,
};

/**
* @type {Config["themeConfig"]["metadatas"]}
* @see https://docusaurus.io/docs/api/themes/configuration#meta-image
* @see https://docusaurus.io/docs/api/themes/configuration#metadatas
*/
const metadatas = [
{ name: "twitter:site", content: "@feature_sliced" },
{ name: "twitter:card", content: "summary_large_image" },
// NOTE: uncomment if need
// { name: "description", content: description },
// { name: "og:image", content: `/img/preview.png` }, // ~ inherits from themeConfig.image
// { name: "og:title", content: title },
// { name: "og:type", content: "website" },
// { name: "og:description", content: description },
// { name: "twitter:image", content: `/img/preview.png` }, // ~ inherits from themeConfig.image
// { name: "twitter:title", content: title },
// { name: "twitter:description", content: description },
];

/** @type {Config} */
module.exports = {
title: "feature-sliced",
Expand All @@ -267,6 +291,9 @@ module.exports = {
organizationName: "feature-sliced", // Usually your GitHub org/user name.
projectName: "documentation", // Usually your repo name.
themeConfig: {
image: "img/preview.png",
metadatas,
colorMode,
navbar,
footer,
announcementBar,
Expand Down
Binary file added website/static/img/preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.