diff --git a/packages/freesewing.dev/components/help-us.js b/packages/freesewing.dev/components/help-us.js new file mode 100644 index 00000000000..772a9c3c829 --- /dev/null +++ b/packages/freesewing.dev/components/help-us.js @@ -0,0 +1,49 @@ +import Popout from 'shared/components/popout.js' + +const HelpUs = ({ mdx=false, slug='/' }) => ( +
+ Click here to learn how you can help us improve this page + {mdx && ( + +
Found a mistake?
+ You can edit this page on Github and help us improve our documentation. +
+ )} + +
Does this look ok?
+ +

+ If it looks ok, great! But if not, please let me know about it. + Either by + reaching out on Discord + or feel free to create + an issue on Github. +

+
Why do you ask?
+

+ I recently added a backend endpoint to auto-generate pretty (I hope) Open Graph images. + They are those little preview images you see when you paste a link in Discord (for example). +

+

+ This idea is that it will auto-generate an image, but I am certain there are some edge cases + where that will not work. + There are hundreds of pages on this website and checking them all one by one is not something + I see myself doing. But since you are here on this page, perhaps you could see if the image + above looks ok. +

+

Thank you, I really appreciate your help with this.

+
+
+) + +export default HelpUs + diff --git a/packages/freesewing.dev/pages/[...mdxslug].js b/packages/freesewing.dev/pages/[...mdxslug].js index 97f03abd9ec..c8b01ac6b7d 100644 --- a/packages/freesewing.dev/pages/[...mdxslug].js +++ b/packages/freesewing.dev/pages/[...mdxslug].js @@ -4,7 +4,7 @@ import mdxMeta from 'site/prebuild/mdx.en.js' import mdxLoader from 'shared/mdx/loader' import MdxWrapper from 'shared/components/wrappers/mdx' import Head from 'next/head' -import Popout from 'shared/components/popout.js' +import HelpUs from 'site/components/help-us.js' const MdxPage = props => { @@ -36,43 +36,7 @@ const MdxPage = props => { -
- Click here to learn how you can help us improve this page - -
Found a mistake?
- You can edit this page on Github and help us improve our documentation. -
- -
Does this look ok?
- -

- I recently added a backend endpoint to auto-generate pretty (I hope) Open Graph images. - They are those little preview images you see when you paste a link in Discord (for example). -

-

- This idea is that it will auto-generate an image, but I am certain there are some edge cases - where that will not work. - There are hundreds of pages on this website and checking them all one by one is not something - I see myself doing. But since you are here on this page, perhaps you could see if the image - above looks ok. -

-

If it does look ok, then Yay! that is great and no need to do anything.

-

- If it is not ok, please let me know about it. - Either by - reaching out on Discord - or feel free to create - an issue on Github. -

-

Thank you, I really appreciate your help with this.

-
-
+ ) } diff --git a/packages/freesewing.dev/pages/blog/[slug].js b/packages/freesewing.dev/pages/blog/[slug].js index de78d7f007b..0465825ca2d 100644 --- a/packages/freesewing.dev/pages/blog/[slug].js +++ b/packages/freesewing.dev/pages/blog/[slug].js @@ -6,7 +6,7 @@ import TimeAgo from 'react-timeago' import MdxWrapper from 'shared/components/wrappers/mdx' import Markdown from 'react-markdown' import Head from 'next/head' -import Popout from 'shared/components/popout.js' +import HelpUs from 'site/components/help-us.js' const strapi = "https://posts.freesewing.org" @@ -95,36 +95,7 @@ const PostPage = ({ post, author }) => {
-
- Click here to learn how you can help us improve this page - -
Does this look ok?
- -

- I recently added a backend endpoint to auto-generate pretty (I hope) Open Graph images. - They are those little preview images you see when you paste a link in Discord (for example). -

-

- This idea is that it will auto-generate an image, but I am certain there are some edge cases - where that will not work. - There are hundreds of pages on this website and checking them all one by one is not something - I see myself doing. But since you are here on this page, perhaps you could see if the image - above looks ok. -

-

If it does look ok, then Yay! that is great and no need to do anything.

-

- If it is not ok, please let me know about it. - Either by - reaching out on Discord - or feel free to create - an issue on Github. -

-

Thank you, I really appreciate your help with this.

-
-
+ ) @@ -137,7 +108,6 @@ const PostPage = ({ post, author }) => { -
{JSON.stringify(props, null, 2)}
) } diff --git a/packages/freesewing.dev/pages/blog/index.js b/packages/freesewing.dev/pages/blog/index.js index cbab44d357f..3be440edab8 100644 --- a/packages/freesewing.dev/pages/blog/index.js +++ b/packages/freesewing.dev/pages/blog/index.js @@ -4,6 +4,7 @@ import Link from 'next/link' import { posts } from 'site/prebuild/strapi.blog.en.js' import orderBy from 'lodash.orderby' import TimeAgo from 'react-timeago' +import HelpUs from 'site/components/help-us.js' const strapi = "https://posts.freesewing.org" @@ -55,6 +56,7 @@ const BlogIndexPage = (props) => { .map(post => ) } + ) }