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
Release files for wagtailyoast 0.0.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| wagtailyoast-0.0.10.tar.gz | 11.5 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| wagtailyoast-0.0.10-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.1 MB
Release files / wagtailyoast-0.0.10.tar.gz
| Download URL | wagtailyoast-0.0.10.tar.gz |
|---|---|
| Size | 11.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ea80ef9acafb43fed6b59536a1db669cda6b7517423e0a4b9eb65dad290e2324
|
|
BLAKE2b-256 checksum How to use checksums |
02d122241234aced292794c37278c677871cbc4d2eebdf85cf975718c0220a5f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / wagtailyoast-0.0.10-py3-none-any.whl
| Download URL | wagtailyoast-0.0.10-py3-none-any.whl |
|---|---|
| Size | 11.6 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d5443214c184a87b3d8856dcb8df54f97253a95e0741fb57c92a8c30196c8db5
|
|
BLAKE2b-256 checksum How to use checksums |
3ba0859924f129e47f39255a65bba8f817a2a4fefe812ea74dd476f2c2aae147
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|