Astro-Notion provides components to build static websites using Astro and lets you use Notion as your main CMS tool.
To install @jcha0713/astro-notion package, run the following command:
npm install @jcha0713/astro-notion @notionhq/client
or you can use yarn instead.
[notion.so](http://notion.so)
and the slash and before the question mark(?
).For more detailed work-through, see this tutorial provided by Notion.
.env
and name it NOTION_API_KEY
..env
. Name it NOTION_DATABASE_ID
.astro-imagetools
package to display images. Here is an example config code you can copy and use it.// astro.config.mjs
import { defineConfig } from 'astro/config';
import { astroImageTools } from 'astro-imagetools';
// https://astro.build/config
export default defineConfig({
publicDir: './public',
outDir: './dist',
vite: {
plugins: [
{
name: 'import.meta.url-transformer',
transform: (code, id) => {
if (id.endsWith('.astro'))
return code.replace(/import.meta.url/g, `"${id}"`);
},
},
],
ssr: {
external: ['svgo'],
},
},
experimental: { integrations: true },
integrations: [astroImageTools],
});
// astro-imagetools.config.mjs
// create astro-imagetools.config.mjs
// in your project root folder
import { defineConfig } from 'astro-imagetools/config';
export default defineConfig({
fallbackFormat: 'png',
});