Skip to content

Commit

Permalink
refactor: SEO
Browse files Browse the repository at this point in the history
ArnaudLigny committed Aug 30, 2024
1 parent cf96b81 commit 493ccb9
Showing 4 changed files with 31 additions and 3 deletions.
18 changes: 18 additions & 0 deletions assets/css/hyde.css
Original file line number Diff line number Diff line change
@@ -257,3 +257,21 @@ a.sidebar-nav-item:focus {
.theme-cecil .related-posts li a:hover {
color: #163C56;
}



/*
* Fix
*/

/* Home > title (~h1) */
.sidebar-about .title {
margin-top: 0;
margin-bottom: .5rem;
color: #fff;
font-weight: 700;
line-height: 1.25;
font-size: 3.25rem;
font-family: "Abril Fatface", serif;
text-rendering: optimizeLegibility;
}
2 changes: 1 addition & 1 deletion layouts/_default/index.html.twig
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@
{%- for post in site.pages.showable|filter_by('section', 'blog')|sort_by_date|slice(0, 1) ~%}
<div class="post">
{%- block post ~%}
<h1 class="post-title"><a href="{{ url(post) }}">{{ post.title }}</a></h1>
<h2 class="post-title"><a href="{{ url(post) }}">{{ post.title }}</a></h2>
<span class="post-date">{{ post.date|format_date('long') }}</span>
{%- if post.image is defined ~%}
{{ asset(post.image)|html({alt: post.title}, {responsive: true}) }}
4 changes: 2 additions & 2 deletions layouts/_default/list.html.twig
Original file line number Diff line number Diff line change
@@ -13,9 +13,9 @@
{%- for post in pages ~%}
<div class="post">
{%- block post ~%}
<h1 class="post-title">
<h2 class="post-title">
<a href="{{ url(post) }}">{{ post.title|e }}</a>
</h1>
</h2>
<span class="post-date">{{ post.date|format_date('long') }}</span>
{{ post.content|excerpt_html }}
<footer class="readmore">
10 changes: 10 additions & 0 deletions layouts/_default/page.html.twig
Original file line number Diff line number Diff line change
@@ -40,9 +40,19 @@
<div class="container{% if site.hyde.sidebar.sticky %} sidebar-sticky{% endif %}">
{%- block sidebar ~%}
<div class="sidebar-about">
{%- if page.id == site.home ~%}
<h1>
{{ site.title }}
</h1>
{%- elseif page.type == 'section' or page.type == 'term' ~%}
<h1>
<a href="{{ url(site.home) }}">{{ site.title }}</a>
</h1>
{%- else ~%}
<div class="title">
<a href="{{ url(site.home) }}">{{ site.title }}</a>
</div>
{%- endif ~%}
<p class="lead">{{ site.description }}</p>
</div>
<nav class="sidebar-nav">

0 comments on commit 493ccb9

Please sign in to comment.