Skip to content

fourdigits/wagtailyoast

This branch is 12 commits ahead of, 3 commits behind Aleksi44/wagtailyoast:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Oct 30, 2023
b4c6f9a Â· Oct 30, 2023

History

43 Commits
Oct 30, 2023
Oct 30, 2023
Oct 30, 2023
Sep 12, 2020
Sep 12, 2020
Sep 12, 2020
Feb 14, 2023
Aug 30, 2020
Aug 30, 2020
Feb 14, 2023
Jul 15, 2021
Nov 27, 2020
Oct 30, 2023
Sep 12, 2020
Aug 30, 2020
Feb 14, 2023
Oct 30, 2023
Aug 30, 2020
Nov 27, 2020
Sep 12, 2020

Repository files navigation

Wagtail Yoast SEO

https://img.shields.io/pypi/v/wagtailyoast https://img.shields.io/pypi/pyversions/wagtailyoast

Yoastseo + Wagtail = 🚀

Tested with :

  • django==3.0.9
  • wagtail==2.10.1
  • yoastseo:1.80.0

https://d271q0ph7te9f8.cloudfront.net/www/images/screenshot-wagtail-yoast-.original.png

Setup

Install with pip :

pip install wagtailyoast

Add wagtailyoast to django apps installed :

INSTALLED_APPS = [
    ...
    'wagtailyoast',
]

Add locale used for Yoast and make sure you have STATIC_URL set up in your settings.py :

WY_LOCALE = 'en_US'
STATIC_URL = '/static/'

Add YoastPannel to your Page models :

from wagtail.admin.edit_handlers import TabbedInterface, ObjectList
from wagtailyoast.edit_handlers import YoastPanel


class TestPage(Page):
    ...
    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'
        ),
    ])

YoastPanel params are :

  • keywords : Default keywords of the page.
  • title : 'Search Engine Friendly' title. This will appear at the top of the browser window.
  • search_description : 'Search Engine Friendly' description.
  • slug : URL of the page.

Development env

git clone git@github.com:Aleksi44/wagtailyoast.git
pip install -r requirements.txt

Run Django Server

python manage.py migrate
python manage.py init
python manage.py runserver 0.0.0.0:4243

Run Webpack Server

yarn
yarn start

Packages

No packages published

Languages

  • Python 58.7%
  • JavaScript 34.1%
  • HTML 5.2%
  • Makefile 1.2%
  • SCSS 0.8%