Skip to content
Open
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
14 changes: 6 additions & 8 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
import { defineConfig } from 'astro/config';
import mdx from '@astrojs/mdx';
import sitemap from '@astrojs/sitemap';
import tailwind from "@astrojs/tailwind";
import tailwind from '@astrojs/tailwind';
import { autoNewTabExternalLinks } from './src/autoNewTabExternalLinks';

import partytown from "@astrojs/partytown";

// https://astro.build/config
export default defineConfig({
site: 'https://dominixz.com/',
integrations: [mdx(), sitemap(), tailwind(), partytown()],
integrations: [mdx(), sitemap(), tailwind()],
markdown: {
extendDefaultPlugins: true,
rehypePlugins: [[autoNewTabExternalLinks, {
domain: 'localhost:4321'
}]]
rehypePlugins: [
[autoNewTabExternalLinks, { domain: 'localhost:4321' }]
]
}
});
});
21 changes: 0 additions & 21 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"@astrojs/check": "^0.9.2",
"@astrojs/markdown-remark": "^5.2.0",
"@astrojs/mdx": "^3.1.3",
"@astrojs/partytown": "^2.1.1",
"@astrojs/rss": "^4.0.7",
"@astrojs/sitemap": "^3.1.6",
"@astrojs/tailwind": "^5.1.0",
Expand All @@ -29,4 +28,4 @@
"prettier-plugin-astro": "^0.14.1",
"vite": "^5.4.8"
}
}
}
49 changes: 24 additions & 25 deletions src/layouts/BaseLayout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,31 @@ const { title, description, image } = Astro.props;

<!doctype html>
<html lang='en'>
<head>
<BaseHead title={title} description={description} image={image} />
</head>
<body
class="bg-white dark:bg-zinc-900 dark:text-zinc-100 pt-16 sm:pt-0"
>
<Header/>
<div class='py-8 min-h-[calc(100vh-160px)]'>
<slot />
</div>
<Footer />
<!-- Google tag (gtag.js) -->
<head>
<BaseHead title={title} description={description} image={image} />
</head>
<body class="bg-white dark:bg-zinc-900 dark:text-zinc-100 pt-16 sm:pt-0">
<Header />
<div class='py-8 min-h-[calc(100vh-160px)]'>
<slot />
</div>
<Footer />
<!-- Google tag (gtag.js) -->
{
GTAG_MEASUREMENT_ID &&
<>
<script type='text/partytown' async src={'https://www.googletagmanager.com/gtag/js?id=' + GTAG_MEASUREMENT_ID}></script>
<script type='text/partytown' define:vars={{ GTAG_MEASUREMENT_ID }}>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());
GTAG_MEASUREMENT_ID && (
<>
<script async src={'https://www.googletagmanager.com/gtag/js?id=' + GTAG_MEASUREMENT_ID}></script>
<script define:vars={{ GTAG_MEASUREMENT_ID }} is:inline>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());

gtag('config', GTAG_MEASUREMENT_ID);
</script>
</>
gtag('config', GTAG_MEASUREMENT_ID);
</script>
</>
)
}
</body>
</body>
</html>