Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ghoast 👻

SEO analysis tool for Ghost blogs - like Yoast but for the command line

A powerful CLI tool that analyzes web pages for SEO best practices, providing actionable feedback with a color-coded scoring system.

Features

12 Comprehensive SEO Checks:

  • ✅ Keyword in title and first paragraph
  • ✅ Title and meta description optimization
  • ✅ Keyword density analysis (0.5%-2.5%)
  • ✅ URL slug optimization
  • ✅ Heading structure validation (single H1, proper hierarchy)
  • ✅ Internal links (minimum 2 recommended)
  • ✅ Outbound links to authoritative sources
  • ✅ Image alt text with keywords
  • ✅ Content word count (300+ words minimum)
  • ✅ Favicon presence

Color-Coded Results:

  • 🟢 Green (10 pts): Perfect - no action needed
  • 🟡 Amber (5 pts): Good - could be improved
  • 🔴 Red (0 pts): Issues found - needs attention

Installation

Local Development

# Clone the repository
git clone https://github.com/deanhume/ghoast.git
cd ghoast

# Install dependencies
npm install

# Link globally to use the 'ghoast' command
npm link

From npm (when published)

npm install -g ghoast

Usage

Run the tool by providing a URL:

ghoast https://deanhume.com/your-blog-post/

You'll be prompted to enter a focus keyword:

Focus keyword: performance optimization

The tool will then fetch the page, analyze it, and display results:

SEO Analysis for: https://deanhume.com/your-blog-post/
Keyword: "performance optimization"

  ✔  Keyword in Title: Title contains "performance optimization".
  ✔  Title Length: Title is 58 chars — good.
  ✔  Meta Description: Meta description is 145 chars and contains "performance optimization".
  ●  Keyword in First Paragraph: First paragraph doesn't contain "performance optimization". Try to introduce it early.
  ✔  Keyword Density: Keyword density is 1.2% (15 occurrences) — good.
  ...

──────────────────────────────────────────────────
  SEO Score: 85/100
──────────────────────────────────────────────────

  2 check(s) need attention.

SEO Best Practices

The tool checks against these industry-standard SEO guidelines:

  • Keyword Density: 0.5% - 2.5% (avoid keyword stuffing)
  • Title Length: 50-60 characters (prevents truncation in search results)
  • Meta Description: 120-158 characters
  • Word Count: Minimum 300 words (500+ recommended)
  • Headings: Single H1 tag containing focus keyword, proper hierarchy
  • Links: At least 2 internal links, include outbound links to sources
  • Images: Alt text on all images, keyword in at least one
  • URL Slug: Short (<75 chars) and contains focus keyword

Development

Project Structure

ghoast/
├── index.js           # Main CLI entry point
├── src/
│   └── checks.js      # SEO check functions
├── package.json
└── README.md

Adding New Checks

  1. Create a new function in src/checks.js:
export function checkNewFeature($, keyword) {
  // Your logic here
  return { name: 'Check Name', status: 'green|amber|red', message: 'Result message' };
}
  1. Import and add to the results array in index.js:
import { checkNewFeature } from './src/checks.js';

const results = [
  // ... existing checks
  checkNewFeature($, keyword),
];

Running Locally

# Without npm link
node index.js https://example.com

# With npm link
ghoast https://example.com

Contributing

Contributions are welcome! Feel free to submit issues or pull requests.

License

ISC

Author

Built by Dean Hume


Note: This tool is designed for Ghost blogs but works with any web page. It provides suggestions based on common SEO best practices - use your judgment for your specific content strategy.

About

yoast for ghost

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages