mirror of
https://github.com/doctrine/doctrine-website.git
synced 2026-03-23 22:32:11 +01:00
Add seo breadcrumbs markup and tweak page titles.
This commit is contained in:
@@ -12,15 +12,15 @@ parameters:
|
||||
doctrine.website.templates_dir: '%doctrine.website.root_dir%/templates'
|
||||
|
||||
doctrine.website.title: Doctrine
|
||||
doctrine.website.subtitle: PHP Database Tools
|
||||
doctrine.website.subtitle: PHP Open Source Project
|
||||
doctrine.website.url: https://lcl.doctrine-project.org
|
||||
doctrine.website.assets_url: https://www.doctrine-project.org
|
||||
doctrine.website.keywords: [php, mysql, orm, dbal, database, mongodb, odm, annotations, migrations, cache, couchdb]
|
||||
doctrine.website.description: >
|
||||
The Doctrine Project is the home to several PHP libraries primarily
|
||||
focused on database storage and object mapping. The core projects
|
||||
are the Object Relational Mapper (ORM) and the Database Abstraction
|
||||
Layer (DBAL) it is built upon.
|
||||
The Doctrine Project is an open-source PHP project that is home to
|
||||
home to several PHP libraries primarily focused on database storage
|
||||
and object mapping. The core projects are the Object Relational Mapper
|
||||
(ORM) and the Database Abstraction Layer (DBAL) it is built upon.
|
||||
doctrine.website.google_analytics_tracking_id: ''
|
||||
|
||||
doctrine.website.doctrine_users:
|
||||
|
||||
@@ -4,7 +4,6 @@ parameters:
|
||||
path: /index.html
|
||||
controller: Doctrine\Website\Controllers\HomepageController::index
|
||||
defaults:
|
||||
title: Home
|
||||
menuSlug: home
|
||||
|
||||
atom:
|
||||
@@ -91,14 +90,14 @@ parameters:
|
||||
path: /team/maintainers.html
|
||||
controller: Doctrine\Website\Controllers\TeamController::maintainers
|
||||
defaults:
|
||||
title: Doctrine Maintainers
|
||||
title: Maintainers
|
||||
menuSlug: team
|
||||
|
||||
team_contributors:
|
||||
path: /team/contributors.html
|
||||
controller: Doctrine\Website\Controllers\TeamController::contributors
|
||||
defaults:
|
||||
title: Doctrine Contributors
|
||||
title: Contributors
|
||||
menuSlug: team
|
||||
|
||||
team_contributor:
|
||||
@@ -162,6 +161,15 @@ parameters:
|
||||
defaults:
|
||||
menuSlug: projects
|
||||
|
||||
project_docs:
|
||||
path: /projects/{docsSlug}/{language}/{docsVersion}/index.html
|
||||
controller: Doctrine\Website\Controllers\DocumentationController::view
|
||||
defaults:
|
||||
layout: documentation
|
||||
indexed: true
|
||||
menuSlug: projects
|
||||
docsPage: true
|
||||
|
||||
project_docs_section:
|
||||
path: /projects/{docsSlug}/{language}/{docsVersion}/{section}.html
|
||||
controller: Doctrine\Website\Controllers\DocumentationController::view
|
||||
|
||||
@@ -23,7 +23,7 @@ final class SitemapPageHydrator extends ModelHydrator
|
||||
*/
|
||||
protected function doHydrate(array $data) : void
|
||||
{
|
||||
$this->url = (string) ($sitemapPage['url'] ?? '');
|
||||
$this->date = $sitemapPage['date'] ?? new DateTimeImmutable();
|
||||
$this->url = (string) ($data['url'] ?? '');
|
||||
$this->date = $data['date'] ?? new DateTimeImmutable();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{% block title %}Doctrine PHP Consulting{% endblock %}
|
||||
{% block pageTitle %}Consulting{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Consulting</h1>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{% block title %}Doctrine Events{% endblock %}
|
||||
{% block pageTitle %}Events{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Events</h1>
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
{% block title %}Suggest a Doctrine Event{% endblock %}
|
||||
{% block pageTitle %}Suggest an Event{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="{{ path('events') }}">Events</a></li>
|
||||
<li class="breadcrumb-item active" aria-current="page">Suggest an Event</li>
|
||||
</ol>
|
||||
</nav>
|
||||
{% include 'breadcrumbs.html.twig' with {breadcrumbs:[
|
||||
{
|
||||
label: 'Events',
|
||||
url: url('events')
|
||||
},
|
||||
{
|
||||
label: 'Suggest an Event'
|
||||
}
|
||||
]} %}
|
||||
|
||||
<iframe src="https://docs.google.com/forms/d/e/1FAIpQLSeDhyTE57K50Ob-VwqyE9RZO8OCe56HLDd385NPltH4k4nY0g/viewform?embedded=true" width="640" height="667" frameborder="0" marginheight="0" marginwidth="0">Loading...</iframe>
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
{% block title 'Doctrine, The Open-Source PHP ORM and Persistence Tools Project' %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-{{ featuredPartner ? 6 : 12 }} mb-4">
|
||||
|
||||
28
templates/breadcrumbs.html.twig
Normal file
28
templates/breadcrumbs.html.twig
Normal file
@@ -0,0 +1,28 @@
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@type": "BreadcrumbList",
|
||||
"itemListElement": [
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
{
|
||||
"@type": "ListItem",
|
||||
"position": {{ loop.index }},
|
||||
"name": "{{ breadcrumb.label }}",
|
||||
"item": "{{ breadcrumb.url ?? (site.url ~ page.sourceFile.url) }}"
|
||||
}{% if not loop.last %},{% endif %}
|
||||
{% endfor %}
|
||||
]
|
||||
}
|
||||
</script>
|
||||
|
||||
<nav class="breadcrumbs d-none d-sm-block d-md-block d-lg-block d-xl-block" aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
{% for breadcrumb in breadcrumbs %}
|
||||
{% if not loop.last %}
|
||||
<li class="breadcrumb-item"><a href="{{ breadcrumb.url }}">{{ breadcrumb.label }}</a></li>
|
||||
{% else %}
|
||||
<li class="breadcrumb-item active" aria-current="page">{{ breadcrumb.label }}</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</nav>
|
||||
@@ -1,15 +1,21 @@
|
||||
{% block title %}{{ event.name }}{% endblock %}
|
||||
{% block pageTitle %}{{ event.name }}{% endblock %}
|
||||
|
||||
{% block meta_description event.description %}
|
||||
|
||||
{% block content %}
|
||||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="{{ path('events') }}">Events</a></li>
|
||||
<li class="breadcrumb-item"><a href="{{ path('event', {id:event.id, slug:event.slug}) }}">{{ event.name }}</a></li>
|
||||
<li class="breadcrumb-item active" aria-current="page">Call For Papers</li>
|
||||
</ol>
|
||||
</nav>
|
||||
{% include 'breadcrumbs.html.twig' with {breadcrumbs:[
|
||||
{
|
||||
label: 'Events',
|
||||
url: url('events')
|
||||
},
|
||||
{
|
||||
label: event.name,
|
||||
url: url('event', {id:event.id, slug:event.slug})
|
||||
},
|
||||
{
|
||||
label: 'Call for Papers'
|
||||
}
|
||||
]} %}
|
||||
|
||||
{% if event.cfp.exists %}
|
||||
{% if event.cfp.dates.now %}
|
||||
|
||||
@@ -1,14 +1,17 @@
|
||||
{% block title %}{{ event.name }}{% endblock %}
|
||||
{% block pageTitle %}{{ event.name }}{% endblock %}
|
||||
|
||||
{% block meta_description event.description %}
|
||||
|
||||
{% block content %}
|
||||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="{{ path('events') }}">Events</a></li>
|
||||
<li class="breadcrumb-item active" aria-current="page">{{ event.name }}</li>
|
||||
</ol>
|
||||
</nav>
|
||||
{% include 'breadcrumbs.html.twig' with {breadcrumbs:[
|
||||
{
|
||||
label: 'Events',
|
||||
url: url('events')
|
||||
},
|
||||
{
|
||||
label: event.name
|
||||
}
|
||||
]} %}
|
||||
|
||||
{% if event.dates.over %}
|
||||
{% set alertMessage %}
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
{% extends 'layouts/layout.html.twig' %}
|
||||
|
||||
{% if project is defined and project %}
|
||||
{% block title %}{{ page.title }} - {{ project.name }}{% if project.name != project.shortName %} ({{ project.shortName }}){% endif %} - Doctrine{% endblock %}
|
||||
{%- block title -%}
|
||||
{{ page.title }} - {{ site.title }} {{ project.name }}{{ project.name != project.shortName ? ' (' ~ project.shortName ~ ')' : '' }}
|
||||
{%- endblock -%}
|
||||
|
||||
{% block meta_description %}Doctrine {{ project.name }} Documentation: {{ page.title }} {% endblock %}
|
||||
{% block meta_description %}{{ site.title }} {{ project.name }} Documentation: {{ page.title }} {% endblock %}
|
||||
|
||||
{% set pageTitleKeywords = page.title|lower|split(' ') %}
|
||||
|
||||
@@ -51,25 +53,44 @@
|
||||
<div class="row">
|
||||
{# Documentation TOC #}
|
||||
{% if page.docsIndex is defined and page.docsIndex and project is defined %}
|
||||
<nav class="breadcrumbs d-none d-sm-block d-md-block d-lg-block d-xl-block" aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="{{ site.url }}/projects.html">Projects</a></li>
|
||||
<li class="breadcrumb-item"><a href="{{ site.url }}/projects/{{ project.slug }}.html">{{ project.shortName }}</a></li>
|
||||
<li class="breadcrumb-item active" aria-current="page">Documentation</li>
|
||||
</ol>
|
||||
</nav>
|
||||
{% include 'breadcrumbs.html.twig' with {breadcrumbs:[
|
||||
{
|
||||
label: 'Projects',
|
||||
url: url('projects')
|
||||
},
|
||||
{
|
||||
label: project.shortName,
|
||||
url: url('project', {slug:project.slug})
|
||||
},
|
||||
{
|
||||
label: 'Documentation'
|
||||
}
|
||||
]} %}
|
||||
{% endif %}
|
||||
|
||||
{# Documentation Page #}
|
||||
{% if page.docsPage is defined and page.docsPage == true and page.docsIndex == false and project is defined %}
|
||||
<nav class="breadcrumbs d-none d-sm-block d-md-block d-lg-block d-xl-block" aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="{{ site.url }}/projects.html">Projects</a></li>
|
||||
<li class="breadcrumb-item"><a href="{{ site.url }}/projects/{{ project.slug }}.html">{{ project.shortName }}</a></li>
|
||||
<li class="breadcrumb-item"><a href="{{ site.url }}/projects/{{ project.docsSlug }}/en/{{ page.docsVersion }}/">Documentation</a></li>
|
||||
<li class="breadcrumb-item active" aria-current="page">{{ page.title }}</li>
|
||||
</ol>
|
||||
</nav>
|
||||
{% include 'breadcrumbs.html.twig' with {breadcrumbs:[
|
||||
{
|
||||
label: 'Projects',
|
||||
url: url('projects')
|
||||
},
|
||||
{
|
||||
label: project.shortName,
|
||||
url: url('project', {slug:project.slug})
|
||||
},
|
||||
{
|
||||
label: 'Documentation',
|
||||
url: url('project_docs', {
|
||||
docsSlug: project.docsSlug,
|
||||
language: 'en',
|
||||
docsVersion: page.docsVersion
|
||||
})
|
||||
},
|
||||
{
|
||||
label: page.title
|
||||
}
|
||||
]} %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,7 +1,15 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>{% block title %}{{ page.title }} - {{ site.title }} - {{ site.subtitle }}{% endblock %}</title>
|
||||
<title>
|
||||
{%- block title -%}
|
||||
{%- set pageTitle -%}
|
||||
{%- block pageTitle page.title ? page.title : '' -%}
|
||||
{%- endset -%}
|
||||
|
||||
{{ (pageTitle ? pageTitle ~ ' - ' : '' ) ~ site.title ~ ': ' ~ site.subtitle }}
|
||||
{%- endblock -%}
|
||||
</title>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
@@ -55,8 +63,8 @@
|
||||
<meta name="msapplication-square310x310logo" content="{{ site.url }}/images/mstile-310x310.png" />
|
||||
|
||||
<meta name="twitter:card" content="summary" />
|
||||
<meta name="twitter:site" content="@doctrineorm" />
|
||||
<meta name="twitter:creator" content="@doctrineorm" />
|
||||
<meta name="twitter:site" content="@doctrineproject" />
|
||||
<meta name="twitter:creator" content="@doctrineproject" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:url" content="{{ site.url }}{{ page.url }}" />
|
||||
<meta property="og:title" content="{{ block('title') }}" />
|
||||
@@ -96,7 +104,7 @@
|
||||
"name": "Doctrine",
|
||||
"url": "{{ site.url }}",
|
||||
"sameAs": [
|
||||
"https://twitter.com/doctrineorm"
|
||||
"https://twitter.com/doctrineproject"
|
||||
]
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,14 +1,17 @@
|
||||
{% block title %}{{ partner.name }}{% endblock %}
|
||||
{% block pageTitle %}{{ partner.name }}{% endblock %}
|
||||
|
||||
{% block meta_description partner.bio %}
|
||||
|
||||
{% block content %}
|
||||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="{{ path('partners') }}">Partners</a></li>
|
||||
<li class="breadcrumb-item active" aria-current="page">{{ partner.name }}</li>
|
||||
</ol>
|
||||
</nav>
|
||||
{% include 'breadcrumbs.html.twig' with {breadcrumbs:[
|
||||
{
|
||||
label: 'Partners',
|
||||
url: url('partners')
|
||||
},
|
||||
{
|
||||
label: partner.name
|
||||
}
|
||||
]} %}
|
||||
|
||||
<div class="card mb-4 box-shadow">
|
||||
<a href="{{ partner.urlWithUtmParameters({utm_medium:'partner-view'}) }}" target="_blank" rel="noopener noreferrer" data-ga-category="partners" data-ga-action="click" data-ga-label="{{ partner.name }}"><img class="card-img-top p-2" height="100" src="{{ partner.logo }}" alt="{{ partner.name }}"></a>
|
||||
|
||||
@@ -1,17 +1,23 @@
|
||||
{% block title %}{{ project.name }} - {{ site.title }} - {{ site.subtitle }}{% endblock %}
|
||||
{% block pageTitle %}{{ project.name }}{% endblock %}
|
||||
|
||||
{% block meta_description project.description %}
|
||||
|
||||
{% block meta_keywords project.keywords|join(',') %}
|
||||
|
||||
{% block content %}
|
||||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="{{ path('projects') }}">Projects</a></li>
|
||||
<li class="breadcrumb-item"><a href="{{ path('project', {slug:project.slug}) }}">{{ project.shortName }}</a></li>
|
||||
<li class="breadcrumb-item active" aria-current="page">{{ version.name }}</li>
|
||||
</ol>
|
||||
</nav>
|
||||
{% include 'breadcrumbs.html.twig' with {breadcrumbs:[
|
||||
{
|
||||
label: 'Projects',
|
||||
url: url('projects')
|
||||
},
|
||||
{
|
||||
label: project.shortName,
|
||||
url: url('project', {slug:project.slug})
|
||||
},
|
||||
{
|
||||
label: version.name
|
||||
}
|
||||
]} %}
|
||||
|
||||
{% include "project-status-alert.html.twig" with {
|
||||
project:project,
|
||||
|
||||
@@ -1,16 +1,19 @@
|
||||
{% block title %}{{ project.name }} - {{ site.title }} - {{ site.subtitle }}{% endblock %}
|
||||
{% block pageTitle %}{{ project.name }}{% endblock %}
|
||||
|
||||
{% block meta_description project.description %}
|
||||
|
||||
{% block meta_keywords project.keywords|join(',') %}
|
||||
|
||||
{% block content %}
|
||||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="{{ site.url }}/projects.html">Projects</a></li>
|
||||
<li class="breadcrumb-item active" aria-current="page">{{ project.shortName }}</li>
|
||||
</ol>
|
||||
</nav>
|
||||
{% include 'breadcrumbs.html.twig' with {breadcrumbs:[
|
||||
{
|
||||
label: 'Projects',
|
||||
url: url('projects')
|
||||
},
|
||||
{
|
||||
label: project.shortName
|
||||
}
|
||||
]} %}
|
||||
|
||||
{% include "project-status-alert.html.twig" with {
|
||||
project:project,
|
||||
|
||||
Reference in New Issue
Block a user