Skip to content
Merged
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
4 changes: 4 additions & 0 deletions website/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ export default defineConfig({
description: 'A CSS polygon mesh engine. DOM-native 3D rendering.',
favicon: '/favicon.ico',
head: [
// Google Analytics (gtag.js) — covers all Starlight docs pages; custom
// pages render the same tag via src/components/Analytics.astro.
{ tag: 'script', attrs: { async: true, src: 'https://www.googletagmanager.com/gtag/js?id=G-XV72TXWTM5' } },
{ tag: 'script', content: "window.dataLayer = window.dataLayer || [];\nfunction gtag(){dataLayer.push(arguments);}\ngtag('js', new Date());\ngtag('config', 'G-XV72TXWTM5');" },
{ tag: 'meta', attrs: { property: 'og:image', content: 'https://polycss.com/polycss-github.png' } },
{ tag: 'meta', attrs: { property: 'og:image:width', content: '1280' } },
{ tag: 'meta', attrs: { property: 'og:image:height', content: '640' } },
Expand Down
13 changes: 13 additions & 0 deletions website/src/components/Analytics.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
// Google Analytics (gtag.js). Rendered in the <head> of the custom Astro pages
// (index / wordart / gallery / builder / 404). Starlight docs pages get the
// same tag via the `head` config in astro.config.mjs, so every page is covered.
const GA_ID = 'G-XV72TXWTM5';
---
<script async is:inline src={`https://www.googletagmanager.com/gtag/js?id=${GA_ID}`}></script>
<script is:inline define:vars={{ GA_ID }}>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', GA_ID);
</script>
2 changes: 2 additions & 0 deletions website/src/pages/404.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
import DocsHeader from "../components/DocsHeader.astro";
import Analytics from "../components/Analytics.astro";
import "../styles/custom.css";

const title = "Page not found | PolyCSS";
Expand All @@ -11,6 +12,7 @@ const description = "The requested page could not be found.";
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<Analytics />
<title>{title}</title>
<meta name="description" content={description} />
</head>
Expand Down
2 changes: 2 additions & 0 deletions website/src/pages/builder.astro
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
import { BuilderWorkbench } from '../components/BuilderWorkbench';
import DocsHeader from '../components/DocsHeader.astro';
import Analytics from '../components/Analytics.astro';
import '../styles/custom.css';

const title = 'Builder | PolyCSS';
Expand All @@ -13,6 +14,7 @@ const socialImageAlt = 'PolyCSS logo, a rendered polygon duck, and DOM markup.';
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<Analytics />
<title>{title}</title>
<meta name="description" content={description} />
<meta property="og:title" content={title} />
Expand Down
2 changes: 2 additions & 0 deletions website/src/pages/gallery.astro
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
import { GalleryWorkbench } from '../components/GalleryWorkbench';
import DocsHeader from '../components/DocsHeader.astro';
import Analytics from '../components/Analytics.astro';
import '../styles/custom.css';

const title = 'Gallery | PolyCSS';
Expand All @@ -13,6 +14,7 @@ const socialImageAlt = 'PolyCSS logo, a rendered polygon duck, and DOM markup.';
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<Analytics />
<title>{title}</title>
<meta name="description" content={description} />
<meta property="og:title" content={title} />
Expand Down
2 changes: 2 additions & 0 deletions website/src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ hljs.registerLanguage("tsx", typescript);
hljs.registerLanguage("vue", xml);

import DocsHeader from "../components/DocsHeader.astro";
import Analytics from "../components/Analytics.astro";

function highlight(code: string, lang: string): string {
return hljs.highlight(code, { language: lang }).value;
Expand Down Expand Up @@ -103,6 +104,7 @@ const ldJson = {
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<Analytics />
<title>{title}</title>
<meta name="description" content={description} />
<meta property="og:title" content={title} />
Expand Down
8 changes: 5 additions & 3 deletions website/src/pages/wordart.astro
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
---
import { WordArtWorkbench } from '../components/WordArtWorkbench';
import DocsHeader from '../components/DocsHeader.astro';
import Analytics from '../components/Analytics.astro';
import '../styles/custom.css';

const title = 'WordArt | PolyCSS';
const description = 'Compose 3D text from any Google font and render it with pure CSS — multiline, styled, extruded, WordArt-style.';
const title = 'WordArt — 3D text in pure CSS, no canvas | PolyCSS';
const description = 'Make retro WordArt-style 3D text from any Google font — gradients, block textures, bevels, custom edge curves and warps — rendered with pure CSS and DOM. No canvas, no WebGL. Powered by PolyCSS, the CSS polygon-mesh engine.';
const canonical = 'https://polycss.com/wordart/';
const socialImage = 'https://polycss.com/polycss-github.png';
const socialImageAlt = 'PolyCSS logo, a rendered polygon duck, and DOM markup.';
const socialImageAlt = 'WordArt-style extruded 3D text rendered in pure CSS with PolyCSS.';
---
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<Analytics />
<title>{title}</title>
<meta name="description" content={description} />
<meta property="og:title" content={title} />
Expand Down
Loading