diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index e1558277b..21f61a1b3 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -3,14 +3,16 @@ ## Describe your changes ## Type of change + - **Bug fix** (non-breaking change which fixes an issue) - **New feature** (non-breaking change which adds functionality) -- **Chore** (updating grunt tasks etc; no production code change) +- **Chore** (updating CI, tooling; no production code change) - **Docs** (changes to the documentation) - **Test** (adding missing tests, refactoring tests; no production code change) ## Checklist before requesting a review + - [ ] I have performed a self-review of my code - [ ] I have made corresponding changes to the documentation - [ ] My changes generate no new warnings -- [ ] I have added tests that prove my fix is effective or that my feature works \ No newline at end of file +- [ ] I have added tests that prove my fix is effective or that my feature works diff --git a/website/components/HomeContent.tsx b/website/components/HomeContent.tsx index 8ed9937f2..427c082a6 100644 --- a/website/components/HomeContent.tsx +++ b/website/components/HomeContent.tsx @@ -16,9 +16,9 @@ const HomeContent = () => { Intuitively

- Build your Flutter UI effortlessly + An expressive way to effortlessly
- with a simple declarative styling. + build design systems in Flutter.

diff --git a/website/pages/docs/overview/best-practices.mdx b/website/pages/docs/overview/best-practices.mdx index a52cb911c..9eec616d3 100644 --- a/website/pages/docs/overview/best-practices.mdx +++ b/website/pages/docs/overview/best-practices.mdx @@ -1,6 +1,7 @@ --- id: best-practices -title: "Best Practices" +title: Best Practices +og_image: best-practices-og.png --- import { Callout } from "nextra-theme-docs"; diff --git a/website/pages/docs/overview/getting-started.mdx b/website/pages/docs/overview/getting-started.mdx index f8bf1eb02..b0c6407b8 100644 --- a/website/pages/docs/overview/getting-started.mdx +++ b/website/pages/docs/overview/getting-started.mdx @@ -1,5 +1,6 @@ --- -title: "Getting Started" +title: Getting Started +og_image: getting-started-og.png --- import { Steps } from "nextra/components"; diff --git a/website/pages/docs/overview/index.mdx b/website/pages/docs/overview/index.mdx index caae2a9fe..a0c3aa314 100644 --- a/website/pages/docs/overview/index.mdx +++ b/website/pages/docs/overview/index.mdx @@ -1,5 +1,6 @@ --- -title: "Introduction" +title: Introduction +og_image: introduction-og.png --- # Introduction diff --git a/website/pages/docs/overview/utility-first.mdx b/website/pages/docs/overview/utility-first.mdx index 7c8f7ed45..c5272a277 100644 --- a/website/pages/docs/overview/utility-first.mdx +++ b/website/pages/docs/overview/utility-first.mdx @@ -27,7 +27,7 @@ final style = Style( width(100), padding(10), alignment.center(), - background.color.red(), + backgroundColor.red(), ); ``` diff --git a/website/public/assets/og/best-practices-og.png b/website/public/assets/og/best-practices-og.png new file mode 100644 index 000000000..5416357b5 Binary files /dev/null and b/website/public/assets/og/best-practices-og.png differ diff --git a/website/public/assets/og/getting-started-og.png b/website/public/assets/og/getting-started-og.png new file mode 100644 index 000000000..9c8d8cd47 Binary files /dev/null and b/website/public/assets/og/getting-started-og.png differ diff --git a/website/public/assets/og/introduction-og.png b/website/public/assets/og/introduction-og.png new file mode 100644 index 000000000..ca8769959 Binary files /dev/null and b/website/public/assets/og/introduction-og.png differ diff --git a/website/public/assets/og/main.png b/website/public/assets/og/main.png new file mode 100644 index 000000000..86e4fe1ff Binary files /dev/null and b/website/public/assets/og/main.png differ diff --git a/website/theme.config.tsx b/website/theme.config.tsx index 01b113841..d3c77072d 100644 --- a/website/theme.config.tsx +++ b/website/theme.config.tsx @@ -1,7 +1,12 @@ import Image from "next/image"; import { useRouter } from "next/router"; +import { useConfig } from "nextra-theme-docs"; import CustomSearch from "./components/Search"; +const packageName = "Mix"; +const siteUrl = "https://fluttermix.com"; +const description = "An expressive way to build design systems in Flutter."; + const themeConfig = { useNextSeoProps() { const { asPath } = useRouter(); @@ -29,7 +34,7 @@ const themeConfig = { key: "1.0-beta-doc-wip-notice", dismissible: false, text: ( - + Mix 1.0 is in Beta. Documentation is currently a work-in-progress → ), @@ -38,58 +43,91 @@ const themeConfig = { search: { component: , }, - head: ( - <> - - - - - - - - - - - - - + head: () => { + const { asPath, defaultLocale, locale } = useRouter(); + const origin = + typeof window !== "undefined" && window.location.origin + ? window.location.origin + : ""; + + const { frontMatter } = useConfig(); + const url = + origin + (defaultLocale === locale ? asPath : `/${locale}${asPath}`); + + const ogImage = () => { + let ogImage = "main.png"; + if (frontMatter.og_image) { + ogImage = frontMatter.og_image; + } + + return `${origin}/assets/og/${ogImage}`; + }; + + const title = () => { + if (frontMatter.title) { + return frontMatter.title + " – " + packageName; + } + return packageName; + }; + + return ( + <> + + {title()} + + + {/* Open Graph */} + + + + + + + + {/* Twitter */} + + + + + + {/* Icons */} + + + + + + + + + + ); + }, - - - - - - - - ), navigation: { prev: true, next: true,