Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

ignore images with 'ignore-on-export' in className

Jonathan Summers-Muir6cbaa3f5945c
diff --git a/apps/www/_blog/2022-08-09-slack-consolidate-slackbot-to-consolidate-messages.mdx b/apps/www/_blog/2022-08-09-slack-consolidate-slackbot-to-consolidate-messages.mdx
index 4820e72768b..2f5d786ffb2 100644
--- a/apps/www/_blog/2022-08-09-slack-consolidate-slackbot-to-consolidate-messages.mdx
+++ b/apps/www/_blog/2022-08-09-slack-consolidate-slackbot-to-consolidate-messages.mdx
@@ -407,7 +407,14 @@ if __name__ == '__main__':
Of course, we aren't doing proper Python example if we don't make a test notebook available:
-<a href="https://colab.research.google.com/github/mansueli/SlackConsolidate/blob/main/SlackConsolidate_bot.ipynb"><img src=https://colab.research.google.com/assets/colab-badge.svg alt="Open in colab"/></a>
+<a href="https://colab.research.google.com/github/mansueli/SlackConsolidate/blob/main/SlackConsolidate_bot.ipynb">
+ <img
+ className="ignore-on-export"
+ src="https://colab.research.google.com/assets/colab-badge.png"
+ alt="Open in colab"
+ width="256"
+ />
+</a>
## Conclusion
diff --git a/apps/www/pages/blog/[slug].tsx b/apps/www/pages/blog/[slug].tsx
index 3926dcabcc0..9c05e24c8d1 100644
--- a/apps/www/pages/blog/[slug].tsx
+++ b/apps/www/pages/blog/[slug].tsx
@@ -18,6 +18,7 @@ import ImageGrid from '~/components/ImageGrid'
import { generateReadingTime } from '~/lib/helpers'
import { getAllPostSlugs, getPostdata, getSortedPosts } from '~/lib/posts'
+const ignoreClass = 'ignore-on-export'
// import all components used in blog articles here
// for instance, if you use a button, you must add `Button` in the components object below.
const components = {
@@ -25,22 +26,29 @@ const components = {
Quote,
Avatar,
code: (props: any) => {
- return <CodeBlock {...props} />
+ if (props.className !== ignoreClass) {
+ return <CodeBlock {...props} />
+ } else {
+ return <code {...props} />
+ }
},
ImageGrid,
img: (props: any) => {
- return (
- <div
- className="
+ if (props.className !== ignoreClass) {
+ return (
+ <div
+ className="
next-image--dynamic-fill
to-scale-400
from-scale-500 rounded-md
border bg-gradient-to-r
"
- >
- <Image {...props} className="next-image--dynamic-fill rounded-md border" layout="fill" />
- </div>
- )
+ >
+ <Image {...props} className="next-image--dynamic-fill rounded-md border" layout="fill" />
+ </div>
+ )
+ }
+ return <img {...props} />
},
}