- SEO analysis and recommendations powered by YoastSEO
- Real-time content analysis in Wagtail admin
- Keyword optimization suggestions
- Readability analysis
- Meta description and title optimization
- Customizable YoastPanel for Wagtail pages
- Django 5.0+
- Wagtail 7.0+
- YoastSEO 1.80.0
pip install wagtailyoastAdd the package to your INSTALLED_APPS:
# settings.py
INSTALLED_APPS = [
# ...
'wagtailyoast',
# ...
]Configure the following settings in your settings.py:
# Locale used for Yoast analysis (default: 'en_US')
WY_LOCALE = 'en_US'
# Make sure you have STATIC_URL configured
STATIC_URL = '/static/'Add YoastPanel to your Page models:
from wagtail.admin.edit_handlers import TabbedInterface, ObjectList
from wagtailyoast.edit_handlers import YoastPanel
class TestPage(Page):
# ... your page fields ...
keywords = models.CharField(default='', blank=True, max_length=100)
edit_handler = TabbedInterface([
ObjectList(Page.content_panels, heading='Content'),
ObjectList(Page.promote_panels, heading='Promotion'),
ObjectList(Page.settings_panels, heading='Settings'),
YoastPanel(
keywords='keywords',
title='seo_title',
search_description='search_description',
slug='slug'
),
])keywords: Default keywords of the pagetitle: 'Search Engine Friendly' title that appears at the top of the browser windowsearch_description: 'Search Engine Friendly' description for search resultsslug: URL slug of the page
To develop on this package:
- Clone the repository:
git clone git@github.com:Aleksi44/wagtailyoast.git
cd wagtailyoast- Install dependencies:
pip install -r requirements.txt- Set up the database and run migrations:
python manage.py migrate
python manage.py init- Start the Django development server:
python manage.py runserver 0.0.0.0:4243- In a separate terminal, start the Webpack development server:
yarn install
yarn startTo use this package for development in another Wagtail project, install it as an editable package:
pip install -e path/to/wagtailyoastpdm add -e path/to/wagtailyoastuv add --editable path/to/wagtailyoastThis allows you to make changes to the wagtailyoast package and see them immediately reflected in your Wagtail project without needing to reinstall the package.