kopia lustrzana https://github.com/wagtail/wagtail
commit
3370e7620a
|
|
@ -7,12 +7,16 @@ A common feature of the *Edit* pages for all page types is the three tabs at the
|
|||
The Promote tab
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
The second, *Promote*, is where you can set all the 'metadata' (data about data!) for the page. Below is a description of all default fields in the promote tab and what they do.
|
||||
The Promote tab is where you can configure a page's metadata, to help search engines find and index it. Below is a description of all the default fields under this tab.
|
||||
|
||||
* **Slug:** The last part of the web address for the page. E.g. the slug for a blog page called 'The best things on the web' would be the-best-things-on-the-web (``www.example.com/blog/the-best-things-on-the-web``). This is automatically generated from the main page title set in the Content tab. This can be overridden by adding a new slug into the field. Slugs should be entirely lowercase, with words separated by hyphens (-).
|
||||
* **Page title:** An optional, search-engine friendly page title. This is the title that appears in the tab of your browser window. It is also the title that would appear in a search engine if the page was returned as part of a set of search results.
|
||||
**For Search Engines**
|
||||
* **Slug:** The section of the URL that appears after your website's domain e.g. ``http://domain.com/blog/[my-slug]/``. This is automatically generated from the main page title, which is set in the Content tab. Slugs should be entirely lowercase, with words separated by hyphens (-). It is recommended that you don't change a page's slug once a page is published.
|
||||
* **Title tag:** This is the bold headline that often shows up search engine results. This is one of the most significant elements of how search engines rank the page. The keywords used here should align with the keywords you wish to be found for. If you don't think this field is working, ask your developers to check they have configured the site to output the appropriate tags on the frontend.
|
||||
* **Meta description:** This is the descriptive text displayed underneath a headline in search engine results. It is designed to explain what this page is about. It has no impact on how search engines rank your content, but it can impact on the likelihood that a user will click your result. Ideally 140 to 155 characters in length. If you don't think this field is working, ask your developers to check they have configured the site to output the appropriate tags on the frontend.
|
||||
|
||||
**For Site Menus**
|
||||
* **Show in menus:** Ticking this box will ensure that the page is included in automatically generated menus on your site. Note: A page will only display in menus if all of its parent pages also have *Show in menus* ticked.
|
||||
* **Search description:** This field allows you to add text that will be displayed if the page appears in search results. This is especially useful to distinguish between similarly named pages.
|
||||
|
||||
|
||||
.. image:: ../../_static/images/screen26.5_promote_tab.png
|
||||
|
||||
|
|
|
|||
|
|
@ -798,9 +798,11 @@ Page.promote_panels = [
|
|||
MultiFieldPanel([
|
||||
FieldPanel('slug'),
|
||||
FieldPanel('seo_title'),
|
||||
FieldPanel('show_in_menus'),
|
||||
FieldPanel('search_description'),
|
||||
], gettext_lazy('Common page configuration')),
|
||||
], gettext_lazy('For search engines')),
|
||||
MultiFieldPanel([
|
||||
FieldPanel('show_in_menus'),
|
||||
], gettext_lazy('For site menus')),
|
||||
]
|
||||
|
||||
Page.settings_panels = [
|
||||
|
|
|
|||
|
|
@ -0,0 +1,23 @@
|
|||
# Generated by Django 3.0.12 on 2021-02-04 15:31
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('wagtailcore', '0060_fix_workflow_unique_constraint'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='page',
|
||||
name='search_description',
|
||||
field=models.TextField(blank=True, help_text='The descriptive text displayed underneath a headline in search engine results.', verbose_name='meta description'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='page',
|
||||
name='seo_title',
|
||||
field=models.CharField(blank=True, help_text='The name of the page displayed on search engine results as the clickable headline.', max_length=255, verbose_name='title tag'),
|
||||
),
|
||||
]
|
||||
|
|
@ -759,10 +759,10 @@ class Page(AbstractPage, index.Indexed, ClusterableModel, metaclass=PageBase):
|
|||
)
|
||||
|
||||
seo_title = models.CharField(
|
||||
verbose_name=_("page title"),
|
||||
verbose_name=_("title tag"),
|
||||
max_length=255,
|
||||
blank=True,
|
||||
help_text=_("Optional. 'Search Engine Friendly' title. This will appear at the top of the browser window.")
|
||||
help_text=_("The name of the page displayed on search engine results as the clickable headline.")
|
||||
)
|
||||
|
||||
show_in_menus_default = False
|
||||
|
|
@ -771,7 +771,11 @@ class Page(AbstractPage, index.Indexed, ClusterableModel, metaclass=PageBase):
|
|||
default=False,
|
||||
help_text=_("Whether a link to this page will appear in automatically generated menus")
|
||||
)
|
||||
search_description = models.TextField(verbose_name=_('search description'), blank=True)
|
||||
search_description = models.TextField(
|
||||
verbose_name=_('meta description'),
|
||||
blank=True,
|
||||
help_text=_("The descriptive text displayed underneath a headline in search engine results.")
|
||||
)
|
||||
|
||||
go_live_at = models.DateTimeField(
|
||||
verbose_name=_("go live date/time"),
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue