Skip to content

Commit 01974ac

Browse files
committed
Revert "SEO optimization" from Commit ec942d3 for head, author, and book layouts
1 parent ecd7ef2 commit 01974ac

File tree

3 files changed

+71
-310
lines changed

3 files changed

+71
-310
lines changed

_includes/head.html

Lines changed: 16 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -27,86 +27,18 @@
2727
<meta property="twitter:site" content="{{ site.twitter }}">
2828
<meta property="twitter:card" content="summary_large_image" />
2929

30-
<!--
31-
SEO OPTIMIZATION: Page-specific Open Graph Meta Tags
32-
- Different og:type for book pages vs author pages vs general website pages
33-
- Page-specific metadata for better social sharing and search understanding
34-
- Author information, release date, and categorization for books
35-
-->
36-
{% if page.layout == 'book' %}
37-
<meta property="og:type" content="book">
38-
<!-- SEO: Book author information for Open Graph -->
39-
<meta property="book:author" content="{% for author_id in page.authors %}{% assign author = site.people | where: 'name', author_id | first %}{{ author.name | default: author_id }}{% unless forloop.last %}, {% endunless %}{% endfor %}">
40-
<!-- SEO: Book release date for better categorization -->
41-
<meta property="book:release_date" content="{{ page.start | date: '%Y-%m-%d' }}">
42-
<!-- SEO: Book categorization for content understanding -->
43-
<meta property="book:tag" content="Book of the Week">
44-
{% elsif page.layout == 'author' %}
45-
<meta property="og:type" content="profile">
46-
<!-- SEO: Author-specific Open Graph metadata -->
47-
<meta property="profile:first_name" content="{{ page.title | split: ' ' | first }}">
48-
<meta property="profile:last_name" content="{{ page.title | split: ' ' | last }}">
49-
<meta property="profile:username" content="{{ page.short }}">
50-
{% if page.twitter %}
51-
<meta property="profile:username" content="{{ page.twitter }}">
52-
{% endif %}
53-
{% else %}
54-
<meta property="og:type" content="website">
55-
{% endif %}
30+
<meta property="og:type" content="website">
5631
<meta property="og:site_name" content="{{ site.name }}">
5732
<meta property="og:url" content="{{ site.url }}{{ page.url }}">
5833
<link rel="canonical" href="{{ site.url }}{{ page.url }}">
5934

60-
<!--
61-
SEO OPTIMIZATION: Enhanced Image Meta Tags
62-
- Image dimensions for better social media display
63-
- Alt text for accessibility and SEO
64-
- Consistent image tags for both Open Graph and Twitter Cards
65-
- Author-specific image handling
66-
-->
67-
{% if page.layout == 'author' %}
68-
<meta property="og:image" content="{{ site.url }}/{{ page.picture }}">
69-
<!-- SEO: Image dimensions for optimal social media display -->
70-
<meta property="og:image:width" content="400">
71-
<meta property="og:image:height" content="400">
72-
<!-- SEO: Descriptive alt text for image accessibility -->
73-
<meta property="og:image:alt" content="{{ page.title }} - Author Profile Photo">
74-
<meta property="twitter:image" content="{{ site.url }}/{{ page.picture }}">
75-
<!-- SEO: Twitter-specific image alt text -->
76-
<meta property="twitter:image:alt" content="{{ page.title }} - Author Profile Photo">
77-
<link rel="image_src" href="{{ site.url }}/{{ page.picture }}">
78-
{% else %}
79-
<meta property="og:image" content="{{ site.url }}/{{ page.image }}">
80-
<!-- SEO: Image dimensions for optimal social media display -->
81-
<meta property="og:image:width" content="1200">
82-
<meta property="og:image:height" content="630">
83-
<!-- SEO: Descriptive alt text for image accessibility -->
84-
<meta property="og:image:alt" content="{{ page.title }} book cover">
85-
<meta property="twitter:image" content="{{ site.url }}/{{ page.image }}">
86-
<!-- SEO: Twitter-specific image alt text -->
87-
<meta property="twitter:image:alt" content="{{ page.title }} book cover">
88-
<link rel="image_src" href="{{ site.url }}/{{ page.image }}">
89-
{% endif %}
35+
<meta property="og:image" content="{{ site.url }}/{{ page.image }}">
36+
<meta property="twitter:image" content="{{ site.url }}/{{ page.image }}">
37+
<link rel="image_src" href="{{ site.url }}/{{ page.image }}">
9038

91-
<!-- SEO: Page-specific meta descriptions for search engines and social media -->
92-
{% if page.layout == 'author' %}
93-
<meta property="og:description" content="{{ page.content | strip_html | truncate: 160 | escape | default: 'Learn more about ' | append: page.title | append: ', a data science professional and member of the DataTalks.Club community.' }}">
94-
<meta property="twitter:description" content="{{ page.content | strip_html | truncate: 160 | escape | default: 'Learn more about ' | append: page.title | append: ', a data science professional and member of the DataTalks.Club community.' }}">
95-
<meta name="description" content="{{ page.content | strip_html | truncate: 160 | escape | default: 'Learn more about ' | append: page.title | append: ', a data science professional and member of the DataTalks.Club community.' }}">
96-
<!-- SEO: Author-specific keywords -->
97-
<meta name="keywords" content="{{ page.title | downcase }}, author, data scientist, machine learning, data talks club, {% if page.twitter %}{{ page.twitter }}, {% endif %}{% if page.github %}{{ page.github }}, {% endif %}{% if page.linkedin %}{{ page.linkedin }}, {% endif %}data science professional, AI expert">
98-
{% else %}
99-
<meta property="og:description" content="{{ page.description }}">
100-
<meta property="twitter:description" content="{{ page.description }}">
101-
<meta name="description" content="{{ page.description }}">
102-
<!--
103-
SEO OPTIMIZATION: Keywords Meta Tag
104-
- Comprehensive keywords including book title, authors, and site context
105-
- Helps search engines understand page content and relevance
106-
- Includes site-specific terms for better categorization
107-
-->
108-
<meta name="keywords" content="book, {{ page.title | downcase }}, {% for author_id in page.authors %}{% assign author = site.people | where: 'name', author_id | first %}{{ author.name | default: author_id | downcase }}{% unless forloop.last %}, {% endunless %}{% endfor %}, book of the week, data talks club">
109-
{% endif %}
39+
<meta property="og:description" content="{{ page.description }}">
40+
<meta property="twitter:description" content="{{ page.description }}">
41+
<meta name="description" content="{{ page.description }}">
11042

11143
<link rel="apple-touch-icon" sizes="152x152" href="/apple-touch-icon.png">
11244
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
@@ -116,26 +48,16 @@
11648
<meta name="msapplication-TileColor" content="#da532c">
11749
<meta name="theme-color" content="#ffffff">
11850

119-
<!--
120-
SEO OPTIMIZATION: Performance & Core Web Vitals
121-
- Preload critical CSS for faster rendering
122-
- Async loading prevents render blocking
123-
- display=swap prevents font flash (FOIT/FOUT)
124-
- Noscript fallbacks for accessibility
125-
-->
126-
<!-- Preload critical resources -->
127-
<link rel="preload" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
128-
<noscript><link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"></noscript>
129-
130-
<!-- SEO: Google Fonts with display=swap for better performance -->
131-
<link rel="preload" href="https://fonts.googleapis.com/css?family=Alegreya+Sans:300,400,700&display=swap" as="style" onload="this.onload=null;this.rel='stylesheet'">
132-
<noscript><link href="https://fonts.googleapis.com/css?family=Alegreya+Sans:300,400,700&display=swap" rel="stylesheet"></noscript>
133-
134-
<link rel="preload" href="https://fonts.googleapis.com/css?family=Raleway:300,400,500,600,700&display=swap" as="style" onload="this.onload=null;this.rel='stylesheet'">
135-
<noscript><link href="https://fonts.googleapis.com/css?family=Raleway:300,400,500,600,700&display=swap" rel="stylesheet"></noscript>
51+
<link rel="stylesheet"
52+
href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
53+
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh"
54+
crossorigin="anonymous">
55+
56+
<link href="https://fonts.googleapis.com/css?family=Alegreya+Sans:300,400,700" rel="stylesheet" />
57+
<link href="https://fonts.googleapis.com/css?family=Raleway:300,400,500,600,700" rel="stylesheet" />
58+
13659

137-
<!-- SEO: Load non-critical resources asynchronously -->
138-
<script src="https://kit.fontawesome.com/c37fbeb327.js" crossorigin="anonymous" async></script>
60+
<script src="https://kit.fontawesome.com/c37fbeb327.js"></script>
13961

14062
<link rel="stylesheet" href="/assets/styles.css" />
14163
<link rel="stylesheet" href="/assets/syntax.css" />

_layouts/author.html

Lines changed: 34 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -5,67 +5,44 @@
55
<body>
66
{% include header.html %}
77

8-
<main class="container">
8+
<div class="container">
99
<div class="row">
1010
<div class="col-lg-8 mx-auto">
1111

12-
<!-- SEO: Author Profile Header with Semantic HTML -->
13-
<header class="my-3 author-name text-center">
14-
<img class="author-image" src="/{{ page.picture }}"
15-
alt="{{ page.title }} - Author Profile Photo"
16-
loading="eager" />
17-
<h1 class="author-title">{{ page.title }}</h1>
18-
</header>
12+
<div class="my-3 author-name text-center">
13+
<img class="author-image" src="/{{ page.picture }}" />
14+
{{ page.title }}
15+
</div>
1916

20-
<!-- SEO: Author Biography Section -->
21-
<section class="content-main my-3" aria-labelledby="author-bio">
22-
<h2 id="author-bio" class="sr-only">Author Biography</h2>
17+
<div class="content-main my-3">
2318
{{ content }}
24-
</section>
19+
</div>
2520

26-
<!-- SEO: Author Social Links with Security and Accessibility -->
27-
<nav class="author-links my-3" aria-label="Author Social Media Links">
21+
<div class="author-links my-3">
2822
{% if page.twitter %}
29-
<a href="https://twitter.com/{{ page.twitter }}" target="_blank" rel="noopener noreferrer" aria-label="Follow {{ page.title }} on Twitter">
30-
<i class="fab fa-twitter" aria-hidden="true"></i>
31-
<span class="sr-only">Twitter</span>
32-
</a>
23+
<a href="https://twitter.com/{{ page.twitter }}" target="_blank"><i class="fab fa-twitter"></i></a>
3324
{% endif %}
3425
{% if page.linkedin %}
35-
<a href="https://linkedin.com/in/{{ page.linkedin }}" target="_blank" rel="noopener noreferrer" aria-label="Connect with {{ page.title }} on LinkedIn">
36-
<i class="fab fa-linkedin-in" aria-hidden="true"></i>
37-
<span class="sr-only">LinkedIn</span>
38-
</a>
26+
<a href="https://linkedin.com/in/{{ page.linkedin }}" target="_blank"><i class="fab fa-linkedin-in"></i></a>
3927
{% endif %}
4028
{% if page.github %}
41-
<a href="https://github.com/{{ page.github }}" target="_blank" rel="noopener noreferrer" aria-label="View {{ page.title }}'s GitHub profile">
42-
<i class="fab fa-github" aria-hidden="true"></i>
43-
<span class="sr-only">GitHub</span>
44-
</a>
29+
<a href="https://github.com/{{ page.github }}" target="_blank"><i class="fab fa-github"></i></a>
4530
{% endif %}
4631
{% if page.web %}
47-
<a href="{{ page.web }}" target="_blank" rel="noopener noreferrer" aria-label="Visit {{ page.title }}'s personal website">
48-
<i class="fas fa-link" aria-hidden="true"></i>
49-
<span class="sr-only">Personal Website</span>
50-
</a>
32+
<a href="{{ page.web }}" target="_blank"><i class="fas fa-link"></i></a>
5133
{% endif %}
52-
</nav>
34+
</div>
5335

5436
{% assign articles = site.posts
5537
| where_exp: "post", "post.authors contains page.short" %}
5638

5739
{% if articles.size > 0 %}
58-
<!-- SEO: Author Articles Section with Semantic Structure -->
59-
<section class="author-articles my-4" aria-labelledby="articles-heading">
60-
<h2 id="articles-heading">Articles by {{ page.title }}</h2>
61-
<ul class="articles-list">
62-
{% for post in articles %}
63-
<li class="article-item">
64-
<a href="{{ post.url }}" title="Read: {{ post.title }}">{{ post.title }}</a>
65-
</li>
66-
{% endfor %}
67-
</ul>
68-
</section>
40+
<h3>Articles</h3>
41+
<ul>
42+
{% for post in articles %}
43+
<li><a href="{{ post.url }}">{{ post.title }}</a></li>
44+
{% endfor %}
45+
</ul>
6946
{% endif %}
7047

7148
{% assign events = site.data.events
@@ -74,66 +51,34 @@ <h2 id="articles-heading">Articles by {{ page.title }}</h2>
7451
| sort: 'time' %}
7552

7653
{% if events.size > 0 %}
77-
<!-- SEO: Author Events Section with Semantic Structure -->
78-
<section class="author-events my-4" aria-labelledby="events-heading">
79-
<h2 id="events-heading">Events by {{ page.title }}</h2>
80-
<ul class="events-list">
81-
{% for event in events %}
82-
<li class="event-item">
83-
{% include event.html event=event speakers=false %}
84-
</li>
85-
{% endfor %}
86-
</ul>
87-
</section>
54+
<h3>Events</h3>
55+
<ul>
56+
{% for event in events %}
57+
<li>{% include event.html event=event speakers=false %}</li>
58+
{% endfor %}
59+
</ul>
8860
{% endif %}
8961

9062
{% assign books = site.books
9163
| where_exp: "book", "book.authors contains page.short" %}
9264

9365
{% if books.size > 0 %}
94-
<!-- SEO: Author Books Section with Semantic Structure -->
95-
<section class="author-books my-4" aria-labelledby="books-heading">
96-
<h2 id="books-heading">Books by {{ page.title }}</h2>
97-
<ul class="books-list">
98-
{% for book in books %}
99-
<li class="book-item">
100-
<a href="{{ book.id }}.html" title="Read about: {{ book.title }}">{{ book.title }}</a>
101-
</li>
102-
{% endfor %}
103-
</ul>
104-
</section>
66+
<h3>Books</h3>
67+
<ul>
68+
{% for book in books %}
69+
<li><a href="{{ book.id }}.html">{{ book.title }}</a> (the book of the week from {{ book.start | date_to_string }} to {{ book.end | date_to_string }})</li>
70+
{% endfor %}
71+
</ul>
10572
{% endif %}
10673

10774
<div class="article-divider"></div>
10875

109-
<!-- SEO: Newsletter Subscription Section -->
110-
<aside class="article-end" aria-labelledby="subscribe-heading">
111-
<h2 id="subscribe-heading" class="sr-only">Newsletter Subscription</h2>
76+
<div class="article-end">
11277
{% include subscribe.html subscribe="true" %}
113-
</aside>
78+
</div>
11479
</div>
11580
</div>
116-
</main>
81+
</div>
11782

11883
{% include footer.html %}
119-
120-
<!-- SEO: JSON-LD Structured Data for Author -->
121-
<script type="application/ld+json">
122-
{
123-
"@context": "https://schema.org",
124-
"@type": "Person",
125-
"name": "{{ page.title }}",
126-
"image": "{{ site.url }}/{{ page.picture }}",
127-
"description": "{{ page.content | strip_html | truncate: 160 | escape }}",
128-
"url": "{{ site.url }}{{ page.url }}",
129-
{% if page.twitter or page.linkedin or page.github or page.web %}
130-
"sameAs": [
131-
{% if page.twitter %}"https://twitter.com/{{ page.twitter }}"{% endif %}
132-
{% if page.linkedin %}{% if page.twitter %},{% endif %}"https://linkedin.com/in/{{ page.linkedin }}"{% endif %}
133-
{% if page.github %}{% if page.twitter or page.linkedin %},{% endif %}"https://github.com/{{ page.github }}"{% endif %}
134-
{% if page.web %}{% if page.twitter or page.linkedin or page.github %},{% endif %}"{{ page.web }}"{% endif %}
135-
]
136-
{% endif %}
137-
}
138-
</script>
13984
</body>

0 commit comments

Comments
 (0)