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
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.9.tar.gz
(10.2 MB
view hashes)
Built Distribution
Close
Hashes for wagtailyoast-0.0.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 98f55a5f6c6a0be024efe89e25966e380b14e4d1c927cba05573d3577ad08413 |
|
MD5 | 0b83186384836f3cda62e406c9112805 |
|
BLAKE2-256 | b670bdc8f857fa8355af6a8e7fe60035c96c6ed5ebfbd4d044d54bab6f1f218f |