From 1ab57279796c7260a24e3179f06cd7b6df2e3f95 Mon Sep 17 00:00:00 2001 From: "[dyad]" Date: Tue, 20 Jan 2026 16:03:34 +0100 Subject: [PATCH] [dyad] Added more fields to meta analysis - wrote 2 file(s) --- src/app/actions.ts | 6 ++ src/components/meta-form.tsx | 106 +++++++++++++++++++++++++++++++++++ 2 files changed, 112 insertions(+) diff --git a/src/app/actions.ts b/src/app/actions.ts index 9f4fb8d..4885205 100644 --- a/src/app/actions.ts +++ b/src/app/actions.ts @@ -55,6 +55,9 @@ export async function extractMetaData(url: string, keyword?: string) { $('meta[name="description"]').attr("content") || "No description found"; const image = $('meta[property="og:image"]').attr("content") || null; + const canonical = $('link[rel="canonical"]').attr("href") || null; + const keywords = $('meta[name="keywords"]').attr("content") || null; + const robots = $('meta[name="robots"]').attr("content") || null; const faqData: FaqItem[] = []; const schemaData: any[] = []; @@ -173,6 +176,9 @@ export async function extractMetaData(url: string, keyword?: string) { title, description, image, + canonical, + keywords, + robots, faq: faqData.length > 0 ? faqData : null, schema: schemaData.length > 0 ? schemaData : null, headlines: headlines.length > 0 ? headlines : null, diff --git a/src/components/meta-form.tsx b/src/components/meta-form.tsx index 5f0c226..ee96780 100644 --- a/src/components/meta-form.tsx +++ b/src/components/meta-form.tsx @@ -13,6 +13,9 @@ import { X, ImageOff, Search, + ShieldCheck, + ShieldX, + Link as LinkIcon, } from "lucide-react"; import { extractMetaData, @@ -31,6 +34,7 @@ import { TabIndicator } from "./tab-indicator"; import { getLengthIndicatorColor, type IndicatorColor } from "@/lib/analysis"; import { KeywordHighlighter } from "./keyword-highlighter"; import { SchemaDisplay } from "./schema-display"; +import { Badge } from "./ui/badge"; interface MetaData { title: string; @@ -42,6 +46,9 @@ interface MetaData { keyword?: string | null; keywordCount?: number | null; images?: ImageAltData[] | null; + canonical?: string | null; + keywords?: string | null; + robots?: string | null; } export function MetaForm() { @@ -442,6 +449,105 @@ export function MetaForm() { )} +
+

+ Indexability +

+

+ Indicates if search engines are allowed to index this + page. +

+ {(() => { + const isIndexable = + !metaData.robots || + !metaData.robots.toLowerCase().includes("noindex"); + return ( +
+ {isIndexable ? ( + + ) : ( + + )} +
+

+ {isIndexable + ? "Page is indexable" + : "Page is set to 'noindex'"} +

+

+ {metaData.robots + ? `Robots tag: "${metaData.robots}"` + : "No robots meta tag found."} +

+
+
+ ); + })()} +
+
+
+

+ Canonical URL +

+ +
+

+ The preferred URL for this page, to avoid duplicate + content issues. +

+

+ {metaData.canonical ? ( + <> + + + {metaData.canonical} + + + ) : ( + "Not found" + )} +

+
+
+

+ Meta Keywords +

+

+ Keywords associated with the page. Note: Most search + engines no longer use this tag for ranking. +

+
+ {metaData.keywords ? ( +
+ {metaData.keywords + .split(",") + .map((k) => k.trim()) + .filter(Boolean) + .map((k, i) => ( + + {k} + + ))} +
+ ) : ( + "Not found" + )} +
+