SeoBundle
をインストールし、サイトマップを構築するようにバンドルを設定しました(docs)。symfony - SeoBundleがEMPTYサイトマップを構築
AppKernel.php
:
new Sonata\SeoBundle\SonataSeoBundle(),
new Symfony\Cmf\Bundle\CoreBundle\CmfCoreBundle(),
new Symfony\Cmf\Bundle\SeoBundle\CmfSeoBundle(),
のフルバンドル構成(config.yml
):
sonata_seo:
page:
title: Erasmus internship – Training Experience
metas:
name:
keywords: Erasmus Internships, Internship in Europe, International Internships, Erasmus+, Erasmus Entrepreneur, Student Internships, Internships Abroad, Student Placements
description: Find Internships with Training Experience: Students can find internships & employment opportunities in Europe’s platform for internships. Search paid internships and placements abroad.
viewport: width=device-width, initial-scale=1
format-detection: telephone=no
robots: index, follow
property:
'og:site_name': Training Experience
'og:title': Erasmus internship – Training Experience
'og:description': Find Internships with Training Experience: Students can find internships & employment opportunities in Europe’s platform for internships. Search paid internships and placements abroad."
'og:url': https://www.trainingexperience.org
'og:image': https://www.trainingexperience.org/bundles/index/images/tx-orange.png
http-equiv:
'Content-Type': text/html; charset=utf-8
head:
'xmlns': http://www.w3.org/1999/xhtml
'xmlns:og': http://opengraphprotocol.org/schema/
cmf_seo:
title: seo.title
description: seo.description
sitemap:
enabled: true
content_listener:
enabled: false
を追加しましたルートrouting.yml
へ:私は/sitemaps/sitemap.xml
にアクセスしたときに今
sitemaps:
prefix: /sitemaps
resource: "@CmfSeoBundle/Resources/config/routing/sitemap.xml"
は、それが開かれ、ないていますURLが表示されます:
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml"></urlset>
どうすればよいですか?
修正しましたか? – breq