Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,13 @@ BACKEND_FOLDER=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
ifdef PLONE_VERSION
PLONE_VERSION := $(PLONE_VERSION)
else
PLONE_VERSION := 6.1.4
PLONE_VERSION := 6.2.0rc1
endif

ifdef CI
UV_VENV_ARGS :=
else
UV_VENV_ARGS := --python=3.10
endif

VENV_FOLDER=$(BACKEND_FOLDER)/.venv
Expand All @@ -54,11 +60,7 @@ requirements-mxdev.txt: pyproject.toml mx.ini ## Generate constraints file

$(VENV_FOLDER): requirements-mxdev.txt ## Install dependencies
@echo "$(GREEN)==> Install environment$(RESET)"
ifdef CI
@uv venv $(VENV_FOLDER)
else
@uv venv --python=3.10 $(VENV_FOLDER)
endif
@if [[ -d "$(VENV_FOLDER)" ]]; then echo "$(YELLOW)==> Environment already exists at $(VENV_FOLDER)$(RESET)"; else uv venv $(UV_VENV_ARGS) $(VENV_FOLDER); fi
@uv pip install -r requirements-mxdev.txt

.PHONY: sync
Expand All @@ -68,7 +70,7 @@ sync: $(VENV_FOLDER) ## Sync project dependencies

instance/etc/zope.ini instance/etc/zope.conf: instance.yaml ## Create instance configuration
@echo "$(GREEN)==> Create instance configuration$(RESET)"
@uvx cookiecutter -f --no-input -c 2.1.1 --config-file instance.yaml gh:plone/cookiecutter-zope-instance
@uvx cookiecutter -f --no-input -c 2.4.1 --config-file instance.yaml gh:plone/cookiecutter-zope-instance

.PHONY: config
config: instance/etc/zope.ini
Expand Down
1 change: 1 addition & 0 deletions news/29.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add preview-widget for SEO title and description google search preview @Tishasoumya-02
15 changes: 14 additions & 1 deletion src/kitconcept/seo/behaviors/seo.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class ISeo(model.Schema):
fields=[
"seo_title",
"seo_description",
"google_preview",
"seo_noindex",
"seo_canonical_url",
"opengraph_title",
Expand All @@ -26,6 +27,19 @@ class ISeo(model.Schema):
],
)

directives.widget(
"google_preview",
frontendOptions={
"widget": "googleSearchPreviewWidget",
},
)

google_preview = schema.Text(
title=_("Search Result Preview"),
required=False,
missing_value=None,
)

directives.widget(
"seo_title",
frontendOptions={
Expand Down Expand Up @@ -59,7 +73,6 @@ class ISeo(model.Schema):
),
required=False,
)

# https://support.google.com/webmasters/answer/93710?hl=en
seo_noindex = schema.Bool(
title=_("No Index"),
Expand Down
Loading