Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

better seo #68

Open
wants to merge 1 commit into
base: flexy
Choose a base branch
from
Open
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
15 changes: 11 additions & 4 deletions base.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,22 @@
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1"/> {% block meta %}{% endblock %}
<title>
{% block title %}Welcome!
{% endblock %}
<meta name="viewport" content="width=device-width, initial-scale=1"/>

{% block meta %}
{{ BetterSeoMicroData(null, null) | raw }}
{% endblock %}

<title>
{% block title %}{{BetterSeoPageTitle()}}{% endblock %}
</title>

<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 128 128%22><text y=%221.2em%22 font-size=%2296%22>⚫️</text><text y=%221.3em%22 x=%220.2em%22 font-size=%2276%22 fill=%22%23fff%22>sf</text></svg>">

{% block stylesheets %}
{{ encore_entry_link_tags('app') }}
{% endblock %}

{% block javascripts %}
{{ encore_entry_script_tags('app') }}
{% endblock %}
Expand Down
7 changes: 3 additions & 4 deletions category.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@
{{ encore_entry_link_tags('category') }}
{% endblock %}

{% block title %}
{{ 'Category'|trans }}
{% endblock %}

{% block body %}
{% include '@components/Layout/Subheader/Category/SubheaderCategory.html.twig' with {title: attr('category', 'title'), description: attr('category', 'chapo'), nbProducts: 9, breadcrumb} %}


{% include '@components/Layout/Subheader/Category/SubheaderCategory.html.twig' with {title: BetterSeoPageH1("category", categoryId), description: attr('category', 'chapo'), nbProducts: 9, breadcrumb} %}
{{ component('Flexy:Layout:CategoryProducts', {categoryId, page}) }}
{% include '@components/Layout/Reinsurance/Reinsurance.html.twig' with { data: [
{
Expand Down
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
"symfony/ux-react": "^2.19",
"symfony/ux-icons": "^2.19",
"symfony/ux-translator": "^2.19",
"symfony/ux-live-component": "^2.19"
"symfony/ux-live-component": "^2.19",
"thelia/page-module": "dev-twig",
"thelia/better-seo-module": "dev-twig"
},
"autoload": {
"psr-4": {
Expand Down
6 changes: 2 additions & 4 deletions content.html.twig
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{% extends 'base.html.twig' %}
{% set contentId = attr('content', 'id') %}

{% block title %}
{{ 'Content page'|trans }}
{% endblock %}

{% block body %}
{% set contents = resources('/api/front/contents', {itemsPerPage:3}) %}
Expand All @@ -14,7 +12,7 @@
img: {url: '/legacy-image-library/category_image_'~c.id~'/full/%5E*!386,280/0/default.webp', alt: c.i18ns.title}
})) %}

{% include '@components/Layout/Subheader/ContentPage/SubheaderContentPage.html.twig' with {title: attr('content', 'title'), description: attr('content', 'chapo') } %}
{% include '@components/Layout/Subheader/ContentPage/SubheaderContentPage.html.twig' with {title: BetterSeoPageH1('content', contentId), description: attr('content', 'chapo') } %}

<div class="px-[25px] lg:pr-[225px] lg:pl-[250px] xl:pr-[325px] xl:pl-[350px] flex gap-[173px] mt-[25px] lg:mt-[54px] mb-[80px] lg:mb-[120px]">
<article class="wysiwyg">
Expand Down
8 changes: 2 additions & 6 deletions folder.html.twig
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
{% extends 'base.html.twig' %}

{% block title %}
{{ 'Folder page'|trans }}
{% endblock %}
{% set folderId = attr('folder', 'id') %}

{% block body %}


{% include '@components/Layout/Subheader/ContentPage/SubheaderContentPage.html.twig' with {title: attr('folder', 'title'), description: attr('folder', 'chapo') } %}
{% include '@components/Layout/Subheader/ContentPage/SubheaderContentPage.html.twig' with {title: BetterSeoPageH1('folder', folderId), description: attr('folder', 'chapo') } %}

<div class="px-[25px] lg:pr-[225px] lg:pl-[250px] xl:pr-[325px] xl:pl-[350px] flex gap-[173px] mt-[25px] lg:mt-[54px] mb-[80px] lg:mb-[120px]">
<article class="wysiwyg">
Expand Down
2 changes: 1 addition & 1 deletion index.html.twig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% extends 'base.html.twig' %}

{% block title %}index{% endblock %}


{% block body %}

Expand Down
6 changes: 1 addition & 5 deletions product.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@
{{ encore_entry_script_tags('product') }}
{% endblock %}


{% set productId = attr('product', 'id') %}
{% block title %}
{{ attr('product', 'title') }}
{% endblock %}

{% set product = resources('/api/front/products/' ~ productId) %}
{% set productCategory = product.productCategories|filter(c => c.defaultCategory)|first.category %}
Expand All @@ -32,7 +28,7 @@
<div class="container">
<div class="ProductPage-grid">
<section id="infos" class="ProductPage-infos">
<h1 class="mb-3 h3">{{ attr('product', 'title') }}</h1>
<h1 class="mb-3 h3">{{ BetterSeoPageH1("product", productId)}}</h1>
{% set chapo = attr('product', 'chapo') %}
{% if chapo %}
<div class="paragraph-3 text-grey">{{ chapo }}</div>
Expand Down