Yoast For Wagtail
Project description
Tested with :
django==3.0.9
wagtail==2.10.1
yoastseo:1.80.0
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
wagtailyoast-0.0.10.tar.gz
(11.5 MB
view details)
Built Distribution
File details
Details for the file wagtailyoast-0.0.10.tar.gz
.
File metadata
- Download URL: wagtailyoast-0.0.10.tar.gz
- Upload date:
- Size: 11.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ea80ef9acafb43fed6b59536a1db669cda6b7517423e0a4b9eb65dad290e2324 |
|
MD5 | eed781e081ac9c06a16c3c19b693a36d |
|
BLAKE2b-256 | 02d122241234aced292794c37278c677871cbc4d2eebdf85cf975718c0220a5f |
File details
Details for the file wagtailyoast-0.0.10-py3-none-any.whl
.
File metadata
- Download URL: wagtailyoast-0.0.10-py3-none-any.whl
- Upload date:
- Size: 11.6 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5443214c184a87b3d8856dcb8df54f97253a95e0741fb57c92a8c30196c8db5 |
|
MD5 | 73202b5dba53cfe045458b5485bf131b |
|
BLAKE2b-256 | 3ba0859924f129e47f39255a65bba8f817a2a4fefe812ea74dd476f2c2aae147 |