The Svelte 5 SSG Migration #1
@@ -46,7 +46,7 @@ async function main() {
|
|||||||
|
|
||||||
const critters = new Critters({
|
const critters = new Critters({
|
||||||
path: DIST,
|
path: DIST,
|
||||||
preload: 'swap',
|
preload: 'default',
|
||||||
noscriptFallback: true,
|
noscriptFallback: true,
|
||||||
pruneSource: false,
|
pruneSource: false,
|
||||||
logLevel: 'warn',
|
logLevel: 'warn',
|
||||||
@@ -57,7 +57,7 @@ async function main() {
|
|||||||
const filePath = path.join(DIST, file);
|
const filePath = path.join(DIST, file);
|
||||||
let html = fs.readFileSync(filePath, 'utf8');
|
let html = fs.readFileSync(filePath, 'utf8');
|
||||||
html = await critters.process(html);
|
html = await critters.process(html);
|
||||||
html = postProcessSwapLinks(html);
|
// html = postProcessSwapLinks(html);
|
||||||
fs.writeFileSync(filePath, html, 'utf8');
|
fs.writeFileSync(filePath, html, 'utf8');
|
||||||
console.log('✓ Critical CSS inlined → dist/' + file);
|
console.log('✓ Critical CSS inlined → dist/' + file);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
</p>
|
</p>
|
||||||
<div class="cta-group">
|
<div class="cta-group">
|
||||||
<a
|
<a
|
||||||
href="https://cal.mifi.ventures/the-mifi"
|
href="https://cal.mifi.ventures/the-mifi/30min?utm_source=website&utm_medium=cta&utm_campaign=schedule_call&utm_medium=hero_cta"
|
||||||
class="btn btn-primary"
|
class="btn btn-primary"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<h2 id="schedule-heading" class="section-title">Let's Talk</h2>
|
<h2 id="schedule-heading" class="section-title">Let's Talk</h2>
|
||||||
<p class="schedule-text">Ready to discuss your project?</p>
|
<p class="schedule-text">Ready to discuss your project?</p>
|
||||||
<a
|
<a
|
||||||
href="https://cal.mifi.ventures/the-mifi"
|
href="https://cal.mifi.ventures/the-mifi/30min?utm_source=website&utm_medium=cta&utm_campaign=schedule_call&utm_medium=schedule_section_cta"
|
||||||
class="btn btn-primary"
|
class="btn btn-primary"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
|
|||||||
@@ -29,15 +29,7 @@
|
|||||||
<svelte:head>
|
<svelte:head>
|
||||||
<!-- Google tag (gtag.js) -->
|
<!-- Google tag (gtag.js) -->
|
||||||
<script async src="https://www.googletagmanager.com/gtag/js?id=G-36F29PDKRT"></script>
|
<script async src="https://www.googletagmanager.com/gtag/js?id=G-36F29PDKRT"></script>
|
||||||
<script>
|
<script defer src="/assets/js/ga-init.js"></script>
|
||||||
window.dataLayer = window.dataLayer || [];
|
|
||||||
function gtag() {
|
|
||||||
dataLayer.push(arguments);
|
|
||||||
}
|
|
||||||
gtag('js', new Date());
|
|
||||||
|
|
||||||
gtag('config', 'G-36F29PDKRT');
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<title>{merged.title}</title>
|
<title>{merged.title}</title>
|
||||||
<meta name="description" content={merged.description ?? ''} />
|
<meta name="description" content={merged.description ?? ''} />
|
||||||
|
|||||||
8
static/assets/js/ga-init.js
Normal file
8
static/assets/js/ga-init.js
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
window.dataLayer = window.dataLayer || [];
|
||||||
|
function gtag(){ window.dataLayer.push(arguments); }
|
||||||
|
|
||||||
|
gtag("js", new Date());
|
||||||
|
gtag("config", "G-36F29PDKRT", {
|
||||||
|
// optional, but often helpful:
|
||||||
|
anonymize_ip: true,
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user