Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Commit c3aaa44

Browse files
ElectricMaxxxwouterj
authored andcommitted
redo target stuff, refactoring
1 parent 1c419d5 commit c3aaa44

File tree

3 files changed

+46
-31
lines changed

3 files changed

+46
-31
lines changed

bundles/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@ Bundles
1717
search/index
1818
simple_cms/index
1919
tree_browser/index
20+
seo/index
2021

2122
.. include:: map.rst.inc

bundles/seo/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
SeoBundle
2-
=============
2+
=========
33

44
.. toctree::
55
:maxdepth: 2

bundles/seo/introduction.rst

Lines changed: 44 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ for the same content if you need that.
1616
There are two solutions to avoid penalties
1717
with search engines:
1818

19-
- Create a canonical link that identifies the original URL: ``<link rel="canonical" href="/route/org/content">``
19+
- Create a canonical link that identifies the
20+
original URL: ``<link rel="canonical" href="/route/org/content">``
2021

2122
- Redirect to THE original url.
2223

@@ -123,31 +124,34 @@ called `SeoMetada`:
123124
.. code-block:: php
124125
125126
/**
126-
* This string contains the information where we will find the original content.
127-
* Depending on the setting for the cmf_seo.content.pattern, we will do an redirect to this url or
127+
* This string contains the information where we will find the
128+
* original content. Depending on the setting for the
129+
* cmf_seo.content.pattern, we will do an redirect to this url or
128130
* create a canonical link with this value as the href attribute.
129131
*
130132
* @var string
131133
*/
132134
private $originalUrl;
133135
134136
/**
135-
* If this string is set, it will be inserted as a meta tag for the page description.
137+
* If this string is set, it will be inserted as a meta
138+
* tag for the page description.
136139
*
137140
* @var string
138141
*/
139142
private $metaDescription;
140143
141144
/**
142-
* This comma separated list will contain the Keywords for the page's meta information.
145+
* This comma separated list will contain the Keywords for
146+
* the page's meta information.
143147
*
144148
* @var string
145149
*/
146150
private $metaKeywords;
147151
148152
A object should implement
149-
the `SeoAwareInterface`, which simply forced to implement setter/getter for the
150-
seo metadata. A simple example would be:
153+
the `SeoAwareInterface`, which simply forced to implement
154+
setter/getter for the seo metadata. A simple example would be:
151155

152156
.. code-block:: php
153157
@@ -189,11 +193,13 @@ seo metadata. A simple example would be:
189193
$manager->persist($route);
190194
$manager->flush();
191195
192-
Visiting the site with the url ``/seo-content`` (same template shown above) will
193-
show a Page with "Documents own tile" as title, "This ist the text for the description
194-
meta tag" in the description, "Seo, Content" in the keywords and a canonical link with
195-
``href="/original/url/of/content"``. But what about some default string to just concatenate
196-
defaults and documents own values? Just add some more configs to the cmf_seo configuration
196+
Visiting the site with the url ``/seo-content`` (same template
197+
shown above) will show a Page with "Documents own tile" as
198+
title, "This ist the text for the description meta tag" in
199+
the description, "Seo, Content" in the keywords and a canonical
200+
link with ``href="/original/url/of/content"``. But what about
201+
some default string to just concatenate defaults and documents
202+
own values? Just add some more configs to the cmf_seo configuration
197203
section.
198204

199205
.. configuration-block::
@@ -240,9 +246,11 @@ section.
240246
),
241247
);
242248
243-
As you will notice, you got the opportunity to set Symfony translation key for your
244-
default values for title and description. So you will got Multi-Language-Support
245-
out of the box. Just define your values for default title/description as translations:
249+
As you will notice, you got the opportunity to set Symfony
250+
translation key for your default values for title and
251+
description. So you will got Multi-Language-Support
252+
out of the box. Just define your values for default
253+
title/description as translations:
246254

247255
.. code-block:: xml
248256
@@ -263,16 +271,18 @@ out of the box. Just define your values for default title/description as transla
263271
</file>
264272
</xliff>
265273
266-
If you want to concatenate your documents values with the default ones you need them as
267-
parameters in you translation target.
274+
If you want to concatenate your documents values with the
275+
default ones you need them as parameters in you translation
276+
target.
268277

269278
.. tip::
270279

271-
If you does not what to open a translation file for two entry, just set
272-
``Default title | %%content_title%%``or ``Default description. %%content_description%%``.
280+
If you does not what to open a translation file for two entry,
281+
just set ``Default title | %%content_title%%``or ``Default
282+
description. %%content_description%%``.
273283

274-
For changing the default translation domain (messages), the SeoBundle provides a configuration
275-
value:
284+
For changing the default translation domain (messages), the SeoBundle
285+
provides a configuration value:
276286

277287
.. configuration-block::
278288

@@ -301,7 +311,8 @@ value:
301311
),
302312
);
303313
304-
For redirects instead of canonical links (default) set the following option:
314+
For redirects instead of canonical links (default) set the following
315+
option:
305316

306317
.. configuration-block::
307318

@@ -330,10 +341,11 @@ For redirects instead of canonical links (default) set the following option:
330341
),
331342
);
332343
333-
This value will cause a redirect to the url persisted in the ``originalUrl`` property of the
334-
``SeoMetadata``.
344+
This value will cause a redirect to the url persisted in the
345+
``originalUrl`` property of the ``SeoMetadata``.
335346

336-
The SeoMetadata contains a form type for your Symfony Form. Just create you form with the following key:
347+
The SeoMetadata contains a form type for your Symfony Form.
348+
Just create you form with the following key:
337349

338350
.. code-block:: php
339351
@@ -343,8 +355,8 @@ The SeoMetadata contains a form type for your Symfony Form. Just create you form
343355
...
344356
;
345357
346-
For SonataAdminBundle user the SeoBundle provides an admin extension to add that form to your
347-
form configuration.
358+
For SonataAdminBundle user the SeoBundle provides an admin extension
359+
to add that form to your form configuration.
348360

349361
Using extractors for getting your documents seo metadata
350362
--------------------------------------------------------
@@ -373,8 +385,10 @@ value. It is up to the developer how to implement that extraction methods.
373385
| | |extractor will use this |
374386
+--------------------------+------------------------+-----------------------------------------------+
375387

376-
For customizing the extraction process you have got the opportunity to create your own extractor.
377-
Just by implementing the ``SeoExtractorInterface`` and tagging the service as ``cmf_seo.extractor``
388+
For customizing the extraction process you have got the opportunity
389+
to create your own extractor. Just by implementing the
390+
``SeoExtractorInterface`` and tagging the service as
391+
``cmf_seo.extractor``
378392

379393
.. code-block:: xml
380394
@@ -398,5 +412,5 @@ Just by implementing the ``SeoExtractorInterface`` and tagging the service as ``
398412
399413
.. _`with composer`: http://getcomposer.org
400414
.. _`packagist`: https://packagist.org/packages/symfony-cmf/menu-bundle
401-
.. _`with github`: git clone https://github.com/symfony-cmf/SeoContentBundle version path/to/
415+
.. _`with github`: git clone https://github.com/symfony-cmf/SeoContentBundle
402416
.. _`sonata seo documentation`: http://sonata-project.org/bundles/seo/master/doc/index.html

0 commit comments

Comments
 (0)