🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.
Add character counter tools and enhance related tools section
Bill Yang577045257e9b
diff --git a/docs/src/app/(home)/tools/(font-generators)/[slug]/page.tsx b/docs/src/app/(home)/tools/(font-generators)/[slug]/page.tsxindex cc6f62f7c..97a8871a6 100644--- a/docs/src/app/(home)/tools/(font-generators)/[slug]/page.tsx+++ b/docs/src/app/(home)/tools/(font-generators)/[slug]/page.tsx@@ -5,6 +5,7 @@ import PageNameGenerator from "../../components/PageNameGenerator";import PostGenerator from "../../components/PostGenerator";import UsernameGenerator from "../../components/UsernameGenerator";import { HashtagGenerator } from "../../components/HashtagGenerator";+import { CharacterCounter } from "../../components/CharacterCounter";import { platformConfigs, platformList } from "../../components/platform-configs";import {commentPlatformConfigs,@@ -26,6 +27,10 @@ import {hashtagGeneratorPlatformConfigs,hashtagGeneratorPlatformList,} from "../../components/hashtag-generator-platform-configs";+import {+ characterCounterPlatformConfigs,+ characterCounterPlatformList,+} from "../../components/character-counter-platform-configs";import type { Metadata } from "next";import { notFound } from "next/navigation";@@ -61,6 +66,10 @@ export async function generateStaticParams() {slug: `${platform.id}-hashtag-generator`,}));+ const characterCounters = characterCounterPlatformList.map((platform) => ({+ slug: `${platform.id}-character-counter`,+ }));+return [...fontGenerators,...commentGenerators,@@ -68,6 +77,7 @@ export async function generateStaticParams() {...postGenerators,...usernameGenerators,...hashtagGenerators,+ ...characterCounters,];}@@ -77,6 +87,36 @@ export async function generateMetadata({}: PageProps): Promise<Metadata> {const { slug } = await params;+ // Check if it's a character counter+ if (slug.endsWith("-character-counter")) {+ const platformId = slug.replace("-character-counter", "");+ const platform = characterCounterPlatformConfigs[platformId];++ if (!platform) {+ return { title: "Character Counter Not Found" };+ }++ return {+ title: `${platform.displayName} | ${platform.name} Character Limit Tool`,+ description: platform.description,+ openGraph: {+ title: platform.displayName,+ description: platform.description,+ type: "website",+ url: `https://rybbit.com/tools/${platform.id}-character-counter`,+ siteName: "Rybbit Documentation",+ },+ twitter: {+ card: "summary_large_image",+ title: platform.displayName,+ description: platform.description,+ },+ alternates: {+ canonical: `https://rybbit.com/tools/${platform.id}-character-counter`,+ },+ };+ }+// Check if it's a hashtag generatorif (slug.endsWith("-hashtag-generator")) {const platformId = slug.replace("-hashtag-generator", "");@@ -261,6 +301,173 @@ export async function generateMetadata({export default async function PlatformToolPage({ params }: PageProps) {const { slug } = await params;+ // Check if it's a character counter+ if (slug.endsWith("-character-counter")) {+ const platformId = slug.replace("-character-counter", "");+ const platform = characterCounterPlatformConfigs[platformId];++ // Handle invalid platform+ if (!platform) {+ notFound();+ }++ const structuredData = {+ "@context": "https://schema.org",+ "@type": "WebApplication",+ name: platform.displayName,+ description: platform.description,+ url: `https://rybbit.com/tools/${platform.id}-character-counter`,+ applicationCategory: "Utility",+ offers: {+ "@type": "Offer",+ price: "0",+ priceCurrency: "USD",+ },+ author: {+ "@type": "Organization",+ name: "Rybbit",+ url: "https://rybbit.com",+ },+ };++ const educationalContent = (+ <>+ <h2 className="text-2xl font-bold text-neutral-900 dark:text-white mb-4">+ About {platform.name} Character Limits+ </h2>+ <p className="text-neutral-700 dark:text-neutral-300 leading-relaxed mb-6">+ {platform.educationalContent}+ </p>++ <h3 className="text-xl font-semibold text-neutral-900 dark:text-white mb-3">+ How to Use This Tool+ </h3>+ <ol className="space-y-2 text-neutral-700 dark:text-neutral-300 mb-6">+ <li>+ <strong>Type or paste your text</strong> into the text area above+ </li>+ <li>+ <strong>Watch the character count</strong> update in real-time+ </li>+ <li>+ <strong>Monitor the progress bar</strong> to see how close you are+ to the limit+ </li>+ <li>+ <strong>Adjust your text</strong> to stay within {platform.name}'s{" "}+ {platform.characterLimit.toLocaleString()}-character limit+ </li>+ <li>+ <strong>Copy your optimized text</strong> and paste it into{" "}+ {platform.name}+ </li>+ </ol>++ <h3 className="text-xl font-semibold text-neutral-900 dark:text-white mb-3">+ Understanding the Counter+ </h3>+ <ul className="space-y-2 text-neutral-700 dark:text-neutral-300 mb-6">+ <li>+ <strong>Character Count:</strong> Total number of characters+ including spaces and punctuation+ </li>+ <li>+ <strong>Without Spaces:</strong> Character count excluding all+ whitespace+ </li>+ <li>+ <strong>Remaining:</strong> How many more characters you can add+ before hitting the limit+ </li>+ <li>+ <strong>Progress Bar:</strong> Visual indicator of how much of the+ limit you've used+ </li>+ {platform.recommendedLimit && (+ <li>+ <strong>Recommended Limit:</strong> {platform.name} allows{" "}+ {platform.characterLimit.toLocaleString()} characters, but posts+ under {platform.recommendedLimit} characters often perform better+ </li>+ )}+ </ul>++ <p className="text-sm text-neutral-600 dark:text-neutral-400 mt-6">+ <strong>Note:</strong> This tool counts characters locally in your+ browser. Your text is never sent to any server, ensuring complete+ privacy.+ </p>+ </>+ );++ const faqs = [+ {+ question: `What is ${platform.name}'s character limit?`,+ answer: `${platform.name} allows up to ${platform.characterLimit.toLocaleString()} characters per ${+ platform.contentType+ }. ${+ platform.recommendedLimit+ ? `However, posts under ${platform.recommendedLimit} characters typically get better engagement.`+ : ""+ }`,+ },+ {+ question: "How does this character counter work?",+ answer:+ "This tool counts characters in real-time as you type or paste text. It shows your total character count, remaining characters, and a visual progress bar. All counting happens locally in your browser for complete privacy.",+ },+ {+ question: "What counts as a character?",+ answer: `${platform.countingRules} The tool also shows a count without spaces for reference.`,+ },+ {+ question: "What happens if I exceed the character limit?",+ answer: `If your text exceeds ${platform.characterLimit.toLocaleString()} characters, ${+ platform.name+ } will either truncate it or prevent you from posting. The tool alerts you when you're over the limit so you can edit before posting.`,+ },+ {+ question: "Is my text stored or sent anywhere?",+ answer:+ "No! This tool works entirely in your browser. Your text is never sent to any server or stored anywhere. It's completely private and secure.",+ },+ {+ question: "How can Rybbit help me track my social media performance?",+ answer: (+ <>+ Rybbit helps you track engagement, clicks, and performance of your{" "}+ {platform.name} posts. See which content resonates with your+ audience and optimize your strategy.{" "}+ <a+ href="https://rybbit.com"+ className="text-emerald-600 hover:text-emerald-500 underline"+ >+ Start tracking for free+ </a>+ .+ </>+ ),+ },+ ];++ return (+ <ToolPageLayout+ toolSlug={`${platform.id}-character-counter`}+ title={platform.displayName}+ description={platform.description}+ badge="Free Tool"+ toolComponent={<CharacterCounter platform={platform} />}+ educationalContent={educationalContent}+ faqs={faqs}+ relatedToolsCategory="social-media"+ ctaTitle={`Track your ${platform.name} performance with Rybbit`}+ ctaDescription={`Monitor engagement and clicks from your ${platform.name} posts to optimize your content strategy.`}+ ctaEventLocation={`${platform.id}_character_counter_cta`}+ structuredData={structuredData}+ />+ );+ }+// Check if it's a hashtag generatorif (slug.endsWith("-hashtag-generator")) {const platformId = slug.replace("-hashtag-generator", "");diff --git a/docs/src/app/(home)/tools/components/CharacterCounter.tsx b/docs/src/app/(home)/tools/components/CharacterCounter.tsxnew file mode 100644index 000000000..214148662--- /dev/null+++ b/docs/src/app/(home)/tools/components/CharacterCounter.tsx@@ -0,0 +1,220 @@+"use client";++import { useState } from "react";+import { AlertCircle, CheckCircle, Copy, Check } from "lucide-react";+import type { CharacterCounterPlatformConfig } from "./character-counter-platform-configs";++interface CharacterCounterProps {+ platform: CharacterCounterPlatformConfig;+}++export function CharacterCounter({ platform }: CharacterCounterProps) {+ const [text, setText] = useState("");+ const [copied, setCopied] = useState(false);++ const characterCount = text.length;+ const characterCountNoSpaces = text.replace(/\s/g, "").length;+ const remaining = platform.characterLimit - characterCount;+ const percentage = (characterCount / platform.characterLimit) * 100;++ // Determine status+ const isOverLimit = characterCount > platform.characterLimit;+ const isNearLimit = percentage >= 90 && !isOverLimit;+ const isAtRecommended =+ platform.recommendedLimit && characterCount > platform.recommendedLimit;++ const getStatusColor = () => {+ if (isOverLimit) return "text-red-600 dark:text-red-400";+ if (isNearLimit) return "text-orange-600 dark:text-orange-400";+ return "text-emerald-600 dark:text-emerald-400";+ };++ const getProgressBarColor = () => {+ if (isOverLimit) return "bg-red-500";+ if (isNearLimit) return "bg-orange-500";+ return "bg-emerald-500";+ };++ const copyText = async () => {+ try {+ await navigator.clipboard.writeText(text);+ setCopied(true);+ setTimeout(() => setCopied(false), 2000);+ } catch (err) {+ console.error("Failed to copy:", err);+ }+ };++ return (+ <div className="w-full max-w-4xl mx-auto">+ {/* Platform Info */}+ <div className="mb-8 p-6 bg-emerald-50/50 dark:bg-emerald-950/20 border border-emerald-200 dark:border-emerald-800 rounded-xl">+ <div className="flex items-start gap-3">+ <div className="w-5 h-5 mt-0.5 flex-shrink-0">+ {isOverLimit ? (+ <AlertCircle className="w-5 h-5 text-red-600 dark:text-red-400" />+ ) : (+ <CheckCircle className="w-5 h-5 text-emerald-600 dark:text-emerald-400" />+ )}+ </div>+ <div className="flex-1">+ <h3 className="font-semibold text-neutral-900 dark:text-white mb-2">+ {platform.name} {platform.contentType} Limit+ </h3>+ <p className="text-sm text-neutral-600 dark:text-neutral-300 mb-2">+ <strong>Character limit:</strong> {platform.characterLimit.toLocaleString()} characters+ {platform.recommendedLimit && (+ <span className="ml-2 text-neutral-500">+ (recommended: {platform.recommendedLimit} characters)+ </span>+ )}+ </p>+ <p className="text-sm text-neutral-600 dark:text-neutral-300">+ {platform.countingRules}+ </p>+ </div>+ </div>+ </div>++ {/* Text Area */}+ <div className="mb-6">+ <div className="relative">+ <textarea+ value={text}+ onChange={(e) => setText(e.target.value)}+ placeholder={`Type or paste your ${platform.contentType} here...`}+ rows={10}+ className="w-full px-4 py-3 bg-white dark:bg-neutral-900 border border-neutral-300 dark:border-neutral-700 rounded-lg focus:ring-2 focus:ring-emerald-500 dark:focus:ring-emerald-400 focus:border-transparent resize-none text-neutral-900 dark:text-white placeholder-neutral-400 dark:placeholder-neutral-500"+ />+ {text && (+ <button+ onClick={copyText}+ className="absolute top-3 right-3 px-3 py-1.5 text-xs bg-neutral-100 dark:bg-neutral-800 hover:bg-neutral-200 dark:hover:bg-neutral-700 text-neutral-700 dark:text-neutral-200 rounded-md transition-colors duration-200 flex items-center gap-2"+ >+ {copied ? (+ <>+ <Check className="w-3.5 h-3.5 text-emerald-600 dark:text-emerald-400" />+ Copied!+ </>+ ) : (+ <>+ <Copy className="w-3.5 h-3.5" />+ Copy+ </>+ )}+ </button>+ )}+ </div>+ </div>++ {/* Character Count Stats */}+ <div className="space-y-4 mb-6">+ {/* Main Counter */}+ <div className="flex items-center justify-between">+ <div className="flex items-center gap-4">+ <div>+ <p className={`text-3xl font-bold ${getStatusColor()}`}>+ {characterCount.toLocaleString()}+ </p>+ <p className="text-sm text-neutral-500 dark:text-neutral-400">+ characters+ </p>+ </div>+ <div className="h-12 w-px bg-neutral-200 dark:bg-neutral-800" />+ <div>+ <p className={`text-3xl font-bold ${getStatusColor()}`}>+ {remaining >= 0 ? remaining.toLocaleString() : `+${Math.abs(remaining).toLocaleString()}`}+ </p>+ <p className="text-sm text-neutral-500 dark:text-neutral-400">+ {remaining >= 0 ? "remaining" : "over limit"}+ </p>+ </div>+ </div>++ <div className="text-right">+ <p className="text-sm text-neutral-600 dark:text-neutral-300 mb-1">+ <strong>Without spaces:</strong> {characterCountNoSpaces.toLocaleString()}+ </p>+ <p className="text-sm text-neutral-600 dark:text-neutral-300">+ <strong>Progress:</strong> {percentage.toFixed(1)}%+ </p>+ </div>+ </div>++ {/* Progress Bar */}+ <div className="w-full h-3 bg-neutral-200 dark:bg-neutral-800 rounded-full overflow-hidden">+ <div+ className={`h-full transition-all duration-300 ${getProgressBarColor()}`}+ style={{ width: `${Math.min(percentage, 100)}%` }}+ />+ </div>++ {/* Status Messages */}+ {isOverLimit && (+ <div className="p-4 bg-red-50 dark:bg-red-950/20 border border-red-200 dark:border-red-800 rounded-lg flex items-start gap-3">+ <AlertCircle className="w-5 h-5 text-red-600 dark:text-red-400 mt-0.5 flex-shrink-0" />+ <div>+ <p className="text-sm font-semibold text-red-600 dark:text-red-400 mb-1">+ Over Character Limit+ </p>+ <p className="text-sm text-red-600 dark:text-red-400">+ Your {platform.contentType} exceeds {platform.name}'s {platform.characterLimit.toLocaleString()}-character+ limit by {Math.abs(remaining).toLocaleString()} characters. Please shorten your text.+ </p>+ </div>+ </div>+ )}++ {!isOverLimit && isNearLimit && (+ <div className="p-4 bg-orange-50 dark:bg-orange-950/20 border border-orange-200 dark:border-orange-800 rounded-lg flex items-start gap-3">+ <AlertCircle className="w-5 h-5 text-orange-600 dark:text-orange-400 mt-0.5 flex-shrink-0" />+ <div>+ <p className="text-sm font-semibold text-orange-600 dark:text-orange-400 mb-1">+ Approaching Character Limit+ </p>+ <p className="text-sm text-orange-600 dark:text-orange-400">+ You're using {percentage.toFixed(1)}% of {platform.name}'s character limit. Only{" "}+ {remaining.toLocaleString()} characters remaining.+ </p>+ </div>+ </div>+ )}++ {!isOverLimit &&+ !isNearLimit &&+ platform.recommendedLimit &&+ isAtRecommended && (+ <div className="p-4 bg-blue-50 dark:bg-blue-950/20 border border-blue-200 dark:border-blue-800 rounded-lg flex items-start gap-3">+ <AlertCircle className="w-5 h-5 text-blue-600 dark:text-blue-400 mt-0.5 flex-shrink-0" />+ <div>+ <p className="text-sm font-semibold text-blue-600 dark:text-blue-400 mb-1">+ Above Recommended Length+ </p>+ <p className="text-sm text-blue-600 dark:text-blue-400">+ While you're within the limit, posts under {platform.recommendedLimit} characters+ typically perform better on {platform.name}.+ </p>+ </div>+ </div>+ )}+ </div>++ {/* Best Practices */}+ {platform.bestPractices.length > 0 && (+ <div className="p-6 bg-neutral-50 dark:bg-neutral-900/50 border border-neutral-200 dark:border-neutral-800 rounded-lg">+ <h3 className="font-semibold text-neutral-900 dark:text-white mb-3">+ Best Practices for {platform.name}+ </h3>+ <ul className="space-y-2 text-sm text-neutral-700 dark:text-neutral-300">+ {platform.bestPractices.map((practice, index) => (+ <li key={index} className="flex items-start gap-2">+ <span className="w-1.5 h-1.5 rounded-full bg-emerald-500 mt-2 flex-shrink-0" />+ <span>{practice}</span>+ </li>+ ))}+ </ul>+ </div>+ )}+ </div>+ );+}diff --git a/docs/src/app/(home)/tools/components/character-counter-platform-configs.ts b/docs/src/app/(home)/tools/components/character-counter-platform-configs.tsnew file mode 100644index 000000000..6d40d13b1--- /dev/null+++ b/docs/src/app/(home)/tools/components/character-counter-platform-configs.ts@@ -0,0 +1,293 @@+export interface CharacterCounterPlatformConfig {+ id: string;+ name: string;+ displayName: string;+ description: string;+ simpleIconSlug: string;+ colorHex: string;+ characterLimit: number;+ recommendedLimit?: number;+ contentType: string; // e.g., "post", "caption", "tweet", etc.+ educationalContent: string;+ countingRules: string;+ bestPractices: string[];+}++export const characterCounterPlatformConfigs: Record<+ string,+ CharacterCounterPlatformConfig+> = {+ x: {+ id: "x",+ name: "X (Twitter)",+ displayName: "X (Twitter) Character Counter",+ description:+ "Count characters for X (Twitter) posts. Stay within the 280-character limit and craft concise, engaging tweets.",+ simpleIconSlug: "x",+ colorHex: "#000000",+ characterLimit: 280,+ contentType: "tweet",+ countingRules:+ "X counts all characters including spaces, emojis, and punctuation. Links are automatically shortened to 23 characters (http) or 24 characters (https) regardless of actual length.",+ educationalContent: `X (formerly Twitter) has a strict 280-character limit per post. This constraint encourages concise, punchy communication and has become a defining feature of the platform's culture.++Effective X posts make every character count. The best tweets are clear, engaging, and often include a call-to-action or question to drive engagement. Using threads allows you to expand on ideas while keeping each post digestible.`,+ bestPractices: [+ "Keep tweets concise and focused on one idea",+ "Use line breaks for readability",+ "Remember that links count as 23-24 characters",+ "Leave room for retweets with comments",+ "Use threads for longer thoughts",+ "Emojis count as 2 characters each",+ ],+ },+ threads: {+ id: "threads",+ name: "Threads",+ displayName: "Threads Character Counter",+ description:+ "Count characters for Threads posts. Stay within the 500-character limit and create engaging conversational content.",+ simpleIconSlug: "threads",+ colorHex: "#000000",+ characterLimit: 500,+ contentType: "post",+ countingRules:+ "Threads counts all characters including spaces, emojis, and punctuation. The platform encourages more conversational, thread-based content than traditional Twitter.",+ educationalContent: `Threads, Meta's text-based conversation platform, allows up to 500 characters per post. This gives you more room than Twitter/X while still encouraging concise, engaging content.++The platform is designed for conversations and discussion, with a focus on community engagement. The 500-character limit strikes a balance between brevity and substance, allowing for more nuanced thoughts than Twitter while remaining more digestible than long-form content.`,+ bestPractices: [+ "Use the extra space for context and nuance",+ "Break longer thoughts into thread replies",+ "Engage conversationally with your audience",+ "Include calls-to-action or questions",+ "Use line breaks for better readability",+ "Stay authentic and personal in tone",+ ],+ },+ instagram: {+ id: "instagram",+ name: "Instagram",+ displayName: "Instagram Caption Character Counter",+ description:+ "Count characters for Instagram captions. Stay within the 2,200-character limit and craft compelling visual stories.",+ simpleIconSlug: "instagram",+ colorHex: "#E4405F",+ characterLimit: 2200,+ recommendedLimit: 125,+ contentType: "caption",+ countingRules:+ "Instagram allows up to 2,200 characters for captions. However, only the first 125 characters appear before the 'more' button, so front-load important information.",+ educationalContent: `Instagram captions can be up to 2,200 characters, but only the first 125 characters are visible before users tap "more." This makes the opening crucial for engagement.++Effective Instagram captions tell a story, provide context, or ask questions that drive comments. Many successful accounts use longer captions to build community and share authentic moments, while others keep it short and emoji-heavy. The key is knowing your audience and matching their preferences.`,+ bestPractices: [+ "Front-load key information in first 125 characters",+ "Use emojis for visual breaks and personality",+ "Add hashtags at the end or in first comment",+ "Include a call-to-action",+ "Use line breaks for readability (use invisible characters if needed)",+ "Match caption length to content type and audience",+ ],+ },+ facebook: {+ id: "facebook",+ name: "Facebook",+ displayName: "Facebook Post Character Counter",+ description:+ "Count characters for Facebook posts. While the limit is 63,206 characters, shorter posts typically perform better.",+ simpleIconSlug: "facebook",+ colorHex: "#1877F2",+ characterLimit: 63206,+ recommendedLimit: 250,+ contentType: "post",+ countingRules:+ "Facebook technically allows up to 63,206 characters, but posts longer than 477 characters are truncated with a 'See More' button. Research shows shorter posts (40-80 characters) often get more engagement.",+ educationalContent: `While Facebook allows extremely long posts (up to 63,206 characters), data shows that shorter posts typically perform better. Posts under 250 characters tend to get higher engagement rates.++Facebook's algorithm favors content that sparks meaningful interactions. Whether you write a short, punchy update or a longer storytelling post, focus on creating value for your audience. The platform truncates posts after about 477 characters, so front-load important information.`,+ bestPractices: [+ "Keep posts under 250 characters for best engagement",+ "Front-load key information before the 'See More' cutoff",+ "Use paragraph breaks for longer posts",+ "Include a clear call-to-action",+ "Ask questions to encourage comments",+ "Match length to content type (updates vs. stories)",+ ],+ },+ linkedin: {+ id: "linkedin",+ name: "LinkedIn",+ displayName: "LinkedIn Post Character Counter",+ description:+ "Count characters for LinkedIn posts. Stay within the 3,000-character limit and share professional insights.",+ simpleIconSlug: "linkedin",+ colorHex: "#0A66C2",+ characterLimit: 3000,+ recommendedLimit: 150,+ contentType: "post",+ countingRules:+ "LinkedIn allows up to 3,000 characters for posts. Posts longer than 140 characters are truncated with a 'see more' link in the feed, so make your opening count.",+ educationalContent: `LinkedIn posts can be up to 3,000 characters, giving you space for thought leadership and professional insights. However, only the first 140 characters appear in the feed before the 'see more' link.++The most successful LinkedIn posts balance length with value. Longer posts work well for storytelling and insights, but your opening must hook readers immediately. Many top creators use a compelling first line, then expand with bullet points, personal stories, or actionable tips.`,+ bestPractices: [+ "Hook readers in the first 140 characters",+ "Use line breaks and formatting for readability",+ "Include professional insights or value",+ "Ask questions to drive meaningful discussion",+ "Use bullet points for longer posts",+ "End with a clear call-to-action",+ ],+ },+ tiktok: {+ id: "tiktok",+ name: "TikTok",+ displayName: "TikTok Caption Character Counter",+ description:+ "Count characters for TikTok captions. Stay within the 2,200-character limit and create engaging video descriptions.",+ simpleIconSlug: "tiktok",+ colorHex: "#000000",+ characterLimit: 2200,+ recommendedLimit: 150,+ contentType: "caption",+ countingRules:+ "TikTok allows up to 2,200 characters for video captions. However, only the first 80-100 characters are visible before users tap 'more,' so front-load your hook.",+ educationalContent: `TikTok captions can be up to 2,200 characters, but only the first 80-100 characters are visible without tapping 'more.' Since TikTok is video-first, captions often play a supporting role.++Effective TikTok captions hook viewers immediately, include relevant hashtags for discoverability, and often end with a question or call-to-action. Many creators use captions to provide context, add humor, or encourage duets and stitches. The key is complementing your video content, not repeating it.`,+ bestPractices: [+ "Hook viewers in the first 80 characters",+ "Include trending and relevant hashtags",+ "Add a call-to-action (like, comment, follow)",+ "Use emojis to convey personality",+ "Keep it concise unless adding crucial context",+ "Match caption tone to video content",+ ],+ },+ youtube: {+ id: "youtube",+ name: "YouTube",+ displayName: "YouTube Description Character Counter",+ description:+ "Count characters for YouTube video descriptions. Stay within the 5,000-character limit and optimize for search.",+ simpleIconSlug: "youtube",+ colorHex: "#FF0000",+ characterLimit: 5000,+ recommendedLimit: 200,+ contentType: "video description",+ countingRules:+ "YouTube allows up to 5,000 characters for video descriptions. Only the first 100-150 characters are visible above the 'Show more' button, so front-load important keywords and information.",+ educationalContent: `YouTube video descriptions can be up to 5,000 characters, giving you ample space for SEO, timestamps, links, and context. However, only the first 100-150 characters appear above the fold.++Great YouTube descriptions serve multiple purposes: they help your video rank in search, provide context for viewers, include timestamps for navigation, and add links to related content or products. The opening should include your primary keywords and a compelling hook that encourages viewers to read more.`,+ bestPractices: [+ "Front-load primary keywords in first 150 characters",+ "Include relevant links in the first paragraph",+ "Add detailed timestamps for longer videos",+ "Use keywords naturally throughout",+ "Include calls-to-action (subscribe, like, etc.)",+ "Add links to related videos and playlists",+ ],+ },+ pinterest: {+ id: "pinterest",+ name: "Pinterest",+ displayName: "Pinterest Pin Description Counter",+ description:+ "Count characters for Pinterest pin descriptions. Stay within the 500-character limit and optimize for search.",+ simpleIconSlug: "pinterest",+ colorHex: "#E60023",+ characterLimit: 500,+ contentType: "pin description",+ countingRules:+ "Pinterest allows up to 500 characters for pin descriptions. The platform is search-focused, so descriptions should include relevant keywords while being helpful and descriptive.",+ educationalContent: `Pinterest pin descriptions have a 500-character limit and play a crucial role in discoverability. Pinterest is a visual search engine, so descriptions should be keyword-rich while remaining natural and helpful.++Effective pin descriptions tell users what they'll learn or achieve, include relevant keywords for search, and provide enough context to make clicking worthwhile. Since pins are often saved and repinned, clear descriptions help your content reach the right audience over time.`,+ bestPractices: [+ "Include relevant keywords naturally",+ "Describe what users will learn or achieve",+ "Front-load important information",+ "Use a friendly, helpful tone",+ "Include a call-to-action (save, click, try)",+ "Avoid keyword stuffing",+ ],+ },+ reddit: {+ id: "reddit",+ name: "Reddit",+ displayName: "Reddit Post Title Character Counter",+ description:+ "Count characters for Reddit post titles. Stay within the 300-character limit and create clear, engaging titles.",+ simpleIconSlug: "reddit",+ colorHex: "#FF4500",+ characterLimit: 300,+ contentType: "post title",+ countingRules:+ "Reddit post titles are limited to 300 characters. Titles should be clear, descriptive, and follow subreddit-specific rules. Text posts can contain up to 40,000 characters.",+ educationalContent: `Reddit post titles have a 300-character limit, though most successful titles are much shorter. Titles must be clear, descriptive, and follow each subreddit's specific rules.++Great Reddit titles balance clarity with intrigue. They should accurately represent the content while being compelling enough to earn clicks and upvotes. Many subreddits have specific title formatting requirements, so always check the rules before posting. Clickbait or misleading titles typically get downvoted or removed.`,+ bestPractices: [+ "Be clear and descriptive",+ "Follow subreddit-specific title rules",+ "Front-load the most important information",+ "Avoid clickbait or misleading titles",+ "Use proper capitalization and formatting",+ "Keep it concise when possible",+ ],+ },+ mastodon: {+ id: "mastodon",+ name: "Mastodon",+ displayName: "Mastodon Post Character Counter",+ description:+ "Count characters for Mastodon posts. Default limit is 500 characters, though this varies by instance.",+ simpleIconSlug: "mastodon",+ colorHex: "#6364FF",+ characterLimit: 500,+ contentType: "post (toot)",+ countingRules:+ "Most Mastodon instances have a 500-character limit for posts (toots), though some instances allow more. Links and mentions count toward the limit, unlike Twitter.",+ educationalContent: `Mastodon's default character limit is 500 characters per post (called a 'toot'), though individual instances can set their own limits. This gives you more space than Twitter/X for nuanced thoughts.++Mastodon culture values thoughtful, conversational posts. The decentralized nature means communities have different norms, but generally, users appreciate content warnings, alt text for images, and respectful discourse. The extra characters allow for more context and nuance than Twitter-style platforms.`,+ bestPractices: [+ "Use content warnings (CW) when appropriate",+ "Add alt text to all images for accessibility",+ "Be respectful and thoughtful in posts",+ "Engage with local and federated timelines",+ "Use hashtags for discoverability",+ "Check your instance's specific character limit",+ ],+ },+ bluesky: {+ id: "bluesky",+ name: "Bluesky",+ displayName: "Bluesky Post Character Counter",+ description:+ "Count characters for Bluesky posts. Stay within the 300-character limit and engage in decentralized conversations.",+ simpleIconSlug: "bluesky",+ colorHex: "#1185FE",+ characterLimit: 300,+ contentType: "post",+ countingRules:+ "Bluesky has a 300-character limit per post. The platform uses a decentralized protocol (AT Protocol) and encourages concise, meaningful interactions.",+ educationalContent: `Bluesky posts are limited to 300 characters, creating a middle ground between Twitter/X's 280 and Threads' 500. As a decentralized social network built on the AT Protocol, Bluesky emphasizes user control and portability.++The platform attracts users seeking Twitter-like interactions without centralized control. Effective Bluesky posts are concise, engaging, and often part of broader conversations. The character limit encourages focused thoughts while still allowing for more context than Twitter.`,+ bestPractices: [+ "Keep posts focused and concise",+ "Engage in conversations and threads",+ "Use custom feeds to curate content",+ "Be authentic and conversational",+ "Include relevant context in threads",+ "Participate in community discussions",+ ],+ },+};++export const characterCounterPlatformList = Object.values(+ characterCounterPlatformConfigs+);diff --git a/docs/src/app/(home)/tools/page.tsx b/docs/src/app/(home)/tools/page.tsxindex cbd6b760a..e5d24c1cf 100644--- a/docs/src/app/(home)/tools/page.tsx+++ b/docs/src/app/(home)/tools/page.tsx@@ -28,6 +28,7 @@ import { pageNamePlatformList } from "./components/page-name-platform-configs";import { postGeneratorPlatformList } from "./components/post-generator-platform-configs";import { usernameGeneratorPlatformList } from "./components/username-generator-platform-configs";import { hashtagGeneratorPlatformList } from "./components/hashtag-generator-platform-configs";+import { characterCounterPlatformList } from "./components/character-counter-platform-configs";import {SiDiscord,SiX,@@ -284,6 +285,13 @@ const hashtagGeneratorTools = hashtagGeneratorPlatformList.map(platform => ({description: `Generate strategic hashtags for ${platform.name} to boost discoverability.`,}));+const characterCounterTools = characterCounterPlatformList.map(platform => ({+ href: `/tools/${platform.id}-character-counter`,+ icon: platformIconMap[platform.id],+ title: platform.displayName,+ description: `Count characters for ${platform.name} posts and stay within limits.`,+}));+const socialMediaTools = [...fontGeneratorTools,...commentGeneratorTools,@@ -291,6 +299,7 @@ const socialMediaTools = [...postGeneratorTools,...usernameGeneratorTools,...hashtagGeneratorTools,+ ...characterCounterTools,];function ToolCard({ tool }: { tool: { href: string; icon: any; title: string; description: string } }) {diff --git a/docs/src/components/RelatedTools.tsx b/docs/src/components/RelatedTools.tsxindex 214485993..3fc20937a 100644--- a/docs/src/components/RelatedTools.tsx+++ b/docs/src/components/RelatedTools.tsx@@ -663,6 +663,72 @@ const allTools: Tool[] = [href: "/tools/tumblr-hashtag-generator",category: "social-media",},+ {+ name: "X (Twitter) Character Counter",+ description: "Count characters for X posts and stay within the 280-character limit",+ href: "/tools/x-character-counter",+ category: "social-media",+ },+ {+ name: "Threads Character Counter",+ description: "Count characters for Threads posts with 500-character limit tracking",+ href: "/tools/threads-character-counter",+ category: "social-media",+ },+ {+ name: "Instagram Caption Character Counter",+ description: "Count characters for Instagram captions within the 2,200-character limit",+ href: "/tools/instagram-character-counter",+ category: "social-media",+ },+ {+ name: "Facebook Post Character Counter",+ description: "Count characters for Facebook posts with recommended length guidance",+ href: "/tools/facebook-character-counter",+ category: "social-media",+ },+ {+ name: "LinkedIn Post Character Counter",+ description: "Count characters for LinkedIn posts within the 3,000-character limit",+ href: "/tools/linkedin-character-counter",+ category: "social-media",+ },+ {+ name: "TikTok Caption Character Counter",+ description: "Count characters for TikTok captions with 2,200-character limit",+ href: "/tools/tiktok-character-counter",+ category: "social-media",+ },+ {+ name: "YouTube Description Character Counter",+ description: "Count characters for YouTube descriptions within 5,000-character limit",+ href: "/tools/youtube-character-counter",+ category: "social-media",+ },+ {+ name: "Pinterest Pin Description Counter",+ description: "Count characters for Pinterest descriptions within 500-character limit",+ href: "/tools/pinterest-character-counter",+ category: "social-media",+ },+ {+ name: "Reddit Post Title Character Counter",+ description: "Count characters for Reddit titles within the 300-character limit",+ href: "/tools/reddit-character-counter",+ category: "social-media",+ },+ {+ name: "Mastodon Post Character Counter",+ description: "Count characters for Mastodon toots with 500-character default limit",+ href: "/tools/mastodon-character-counter",+ category: "social-media",+ },+ {+ name: "Bluesky Post Character Counter",+ description: "Count characters for Bluesky posts within the 300-character limit",+ href: "/tools/bluesky-character-counter",+ category: "social-media",+ },];interface RelatedToolsProps {