Skip to content

Commit 0f01c00

Browse files
committed
Copied changes from hmpl/blog
1 parent 766ed0e commit 0f01c00

13 files changed

+865
-27
lines changed

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ gem "minima", "~> 2.5.2"
44
group :jekyll_plugins do
55
gem "jekyll-feed", "~> 0.12"
66
gem "jekyll-seo-tag"
7+
gem "jekyll-sitemap"
78
end
89
platforms :mingw, :x64_mingw, :mswin, :jruby do
910
gem "tzinfo", ">= 1", "< 3"

_config.yml

Lines changed: 62 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,71 @@
11
title: HMPL Blog
22
author:
3-
name: ""
4-
email: ""
3+
name: "HMPL Team"
4+
55
description: >
6-
HMPL - 🐜 Server-oriented customizable
7-
templating for JavaScript
8-
theme: minima
6+
HMPL Blog - Learn about server-oriented customizable templating for JavaScript.
7+
Tutorials, guides, and best practices for building modern web applications with HMPL.
8+
tagline: "Server-oriented customizable templating for JavaScript"
9+
url: "https://blog.hmpl-lang.dev"
10+
lang: en_US
11+
12+
# SEO Configuration
13+
seo:
14+
type: BlogPosting
15+
name: HMPL Blog
16+
headline: HMPL Blog - JavaScript Templating Tutorials and Guides
17+
description: >
18+
Comprehensive tutorials and guides for HMPL, a server-oriented customizable
19+
templating solution for JavaScript applications.
20+
keywords: >
21+
HMPL, JavaScript, templating, server-side rendering, SSR, web development,
22+
tutorials, guides, frontend, backend, template engine, JavaScript framework
23+
24+
# Social and Branding
25+
logo: "/favicon.ico"
26+
social:
27+
name: HMPL
28+
links:
29+
- "https://github.com/hmpl-language/hmpl"
30+
- "https://x.com/hmpljs"
31+
- "https://discord.gg/KFunMep36n"
32+
33+
# Site Configuration
34+
timezone: UTC
35+
permalink: /:year/:month/:day/:title/
36+
excerpt_separator: <!--more-->
37+
38+
# Theme Configuration
39+
# theme: minima # Disabled due to Sass compatibility issues
40+
41+
# Sass Configuration
42+
sass:
43+
style: compressed
44+
sass_dir: _sass
45+
sourcemap: never
46+
947
plugins:
1048
- jekyll-feed
1149
- jekyll-seo-tag
50+
- jekyll-sitemap
51+
52+
# Feed Configuration
53+
feed:
54+
posts_limit: 20
55+
excerpt_only: true
56+
57+
# SEO Defaults
58+
defaults:
59+
- scope:
60+
path: ""
61+
type: "posts"
62+
values:
63+
layout: "post"
64+
author: "HMPL Team"
65+
image: "/favicon.ico"
66+
seo:
67+
type: "BlogPosting"
68+
1269
minima:
1370
social_links:
1471
- { platform: github, user_url: "https://github.com/hmpl-language/hmpl" }

_includes/breadcrumbs.html

Lines changed: 37 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,39 @@
1-
<div id="breadcrumbs">
1+
<nav id="breadcrumbs" aria-label="Breadcrumb">
22
{% unless page.url == "/" %}
3-
<a href="/">Home</a>
4-
/ {{ page.title }}
3+
<script type="application/ld+json">
4+
{
5+
"@context": "https://schema.org",
6+
"@type": "BreadcrumbList",
7+
"itemListElement": [
8+
{
9+
"@type": "ListItem",
10+
"position": 1,
11+
"name": "Home",
12+
"item": "{{ site.url }}/"
13+
},
14+
{
15+
"@type": "ListItem",
16+
"position": 2,
17+
"name": "{{ page.title }}",
18+
"item": "{{ page.url | absolute_url }}"
19+
}
20+
]
21+
}
22+
</script>
23+
24+
<ol class="breadcrumb-list" itemscope itemtype="https://schema.org/BreadcrumbList">
25+
<li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
26+
<a itemprop="item" href="{{ site.url }}/">
27+
<span itemprop="name">Home</span>
28+
</a>
29+
<meta itemprop="position" content="1" />
30+
</li>
31+
<li class="breadcrumb-separator">/</li>
32+
<li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
33+
<span itemprop="name">{{ page.title }}</span>
34+
<meta itemprop="item" content="{{ page.url | absolute_url }}" />
35+
<meta itemprop="position" content="2" />
36+
</li>
37+
</ol>
538
{% endunless %}
6-
</div>
39+
</nav>

_includes/seo-head.html

Lines changed: 188 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,188 @@
1+
<!-- Advanced SEO Meta Tags -->
2+
<meta charset="utf-8">
3+
<meta name="viewport" content="width=device-width, initial-scale=1">
4+
5+
<!-- Standard SEO Tags -->
6+
{%- assign page_title = page.title | default: site.title -%}
7+
{%- assign page_description = page.description | default: page.excerpt | default: site.description | strip_html | truncatewords: 50 -%}
8+
{%- assign page_image = page.image | default: site.logo | absolute_url -%}
9+
{%- assign page_url = page.url | absolute_url -%}
10+
11+
<!-- Keywords generation -->
12+
{%- assign page_keywords = "" -%}
13+
{%- if page.tags and page.tags.size > 0 -%}
14+
{%- assign page_keywords = page.tags | join: ", " -%}
15+
{%- elsif page.categories and page.categories.size > 0 -%}
16+
{%- assign page_keywords = page.categories | join: ", " -%}
17+
{%- endif -%}
18+
19+
{%- if page_keywords == "" -%}
20+
{%- assign page_keywords = "HMPL, JavaScript, templating, web development" -%}
21+
{%- if page.title -%}
22+
{%- assign title_words = page.title | split: " " | join: ", " -%}
23+
{%- assign page_keywords = page_keywords | append: ", " | append: title_words -%}
24+
{%- endif -%}
25+
{%- else -%}
26+
{%- assign page_keywords = page_keywords | append: ", HMPL, JavaScript, templating, web development" -%}
27+
{%- endif -%}
28+
29+
<meta name="description" content="{{ page_description }}">
30+
<meta name="keywords" content="{{ page_keywords }}">
31+
<meta name="author" content="{{ page.author | default: site.author.name }}">
32+
33+
<!-- Open Graph / Facebook -->
34+
<meta property="og:type" content="{% if page.layout == 'post' %}article{% else %}website{% endif %}">
35+
<meta property="og:title" content="{{ page_title }}">
36+
<meta property="og:description" content="{{ page_description }}">
37+
<meta property="og:image" content="{{ page_image }}">
38+
<meta property="og:url" content="{{ page_url }}">
39+
<meta property="og:site_name" content="{{ site.title }}">
40+
{%- if page.layout == 'post' -%}
41+
<meta property="article:published_time" content="{{ page.date | date_to_xmlschema }}">
42+
{%- if page.modified_date -%}
43+
<meta property="article:modified_time" content="{{ page.modified_date | date_to_xmlschema }}">
44+
{%- endif -%}
45+
<meta property="article:author" content="{{ page.author | default: site.author.name }}">
46+
{%- if page.tags -%}
47+
{%- for tag in page.tags -%}
48+
<meta property="article:tag" content="{{ tag }}">
49+
{%- endfor -%}
50+
{%- endif -%}
51+
{%- endif -%}
52+
53+
<!-- Twitter -->
54+
<meta name="twitter:card" content="summary_large_image">
55+
<meta name="twitter:title" content="{{ page_title }}">
56+
<meta name="twitter:description" content="{{ page_description }}">
57+
<meta name="twitter:image" content="{{ page_image }}">
58+
<meta name="twitter:site" content="@hmpljs">
59+
<meta name="twitter:creator" content="@hmpljs">
60+
61+
<!-- Additional SEO -->
62+
<meta name="robots" content="index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1">
63+
<meta name="googlebot" content="index, follow">
64+
<link rel="canonical" href="{{ page_url }}">
65+
66+
<!-- Schema.org JSON-LD -->
67+
<script type="application/ld+json">
68+
{
69+
"@context": "https://schema.org",
70+
"@graph": [
71+
{
72+
"@type": "WebSite",
73+
"@id": "{{ site.url }}/#website",
74+
"url": "{{ site.url }}/",
75+
"name": "{{ site.title }}",
76+
"description": "{{ site.description | strip_html }}",
77+
"publisher": {
78+
"@type": "Organization",
79+
"@id": "{{ site.url }}/#organization"
80+
},
81+
"potentialAction": [
82+
{
83+
"@type": "SearchAction",
84+
"target": {
85+
"@type": "EntryPoint",
86+
"urlTemplate": "{{ site.url }}/search?q={search_term_string}"
87+
},
88+
"query-input": "required name=search_term_string"
89+
}
90+
]
91+
},
92+
{
93+
"@type": "Organization",
94+
"@id": "{{ site.url }}/#organization",
95+
"name": "{{ site.title }}",
96+
"url": "{{ site.url }}/",
97+
"logo": {
98+
"@type": "ImageObject",
99+
"url": "{{ site.logo | absolute_url }}"
100+
},
101+
"sameAs": [
102+
"https://github.com/hmpl-language/hmpl",
103+
"https://x.com/hmpljs",
104+
"https://discord.gg/KFunMep36n"
105+
]
106+
}
107+
{%- if page.layout == 'post' -%}
108+
,{
109+
"@type": "BlogPosting",
110+
"@id": "{{ page_url }}/#article",
111+
"isPartOf": {
112+
"@id": "{{ site.url }}/#website"
113+
},
114+
"author": {
115+
"@type": "Person",
116+
"name": "{{ page.author | default: site.author.name }}"
117+
},
118+
"headline": "{{ page.title }}",
119+
"datePublished": "{{ page.date | date_to_xmlschema }}",
120+
{%- if page.modified_date -%}
121+
"dateModified": "{{ page.modified_date | date_to_xmlschema }}",
122+
{%- else -%}
123+
"dateModified": "{{ page.date | date_to_xmlschema }}",
124+
{%- endif -%}
125+
"mainEntityOfPage": {
126+
"@type": "WebPage",
127+
"@id": "{{ page_url }}"
128+
},
129+
"publisher": {
130+
"@type": "Organization",
131+
"@id": "{{ site.url }}/#organization"
132+
},
133+
"image": {
134+
"@type": "ImageObject",
135+
"url": "{{ page_image }}"
136+
},
137+
"description": "{{ page_description }}",
138+
"keywords": "{{ page_keywords }}",
139+
"articleSection": "{% if page.categories %}{{ page.categories | first }}{% else %}Technology{% endif %}",
140+
"inLanguage": "{{ site.lang | default: 'en-US' }}",
141+
"url": "{{ page_url }}"
142+
}
143+
{%- endif -%}
144+
{%- if page.layout == 'home' or page.url == '/' -%}
145+
,{
146+
"@type": "Blog",
147+
"@id": "{{ site.url }}/#blog",
148+
"mainEntityOfPage": {
149+
"@type": "WebPage",
150+
"@id": "{{ site.url }}/"
151+
},
152+
"name": "{{ site.title }}",
153+
"description": "{{ site.description | strip_html }}",
154+
"publisher": {
155+
"@type": "Organization",
156+
"@id": "{{ site.url }}/#organization"
157+
},
158+
"blogPost": [
159+
{%- for post in site.posts limit: 10 -%}
160+
{
161+
"@type": "BlogPosting",
162+
"headline": "{{ post.title }}",
163+
"url": "{{ post.url | absolute_url }}",
164+
"datePublished": "{{ post.date | date_to_xmlschema }}",
165+
"author": {
166+
"@type": "Person",
167+
"name": "{{ post.author | default: site.author.name }}"
168+
}
169+
}{% unless forloop.last %},{% endunless %}
170+
{%- endfor -%}
171+
]
172+
}
173+
{%- endif -%}
174+
]
175+
}
176+
</script>
177+
178+
<!-- Preconnect to external domains -->
179+
<link rel="preconnect" href="https://fonts.googleapis.com">
180+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
181+
<link rel="preconnect" href="https://unpkg.com">
182+
183+
<!-- Favicon and app icons -->
184+
<link rel="icon" href="/favicon.ico" type="image/x-icon">
185+
<link rel="apple-touch-icon" href="/favicon.ico">
186+
187+
<!-- RSS Feed -->
188+
<link rel="alternate" type="application/rss+xml" title="{{ site.title }} Feed" href="{{ '/feed.xml' | absolute_url }}">

_layouts/base.html

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
<!DOCTYPE html>
2-
<html lang="{{ page.lang | default: site.lang | default: " en" }}">
2+
<html lang="{{ page.lang | default: site.lang | default: 'en' }}">
33

4-
{%- include head.html -%}
5-
<script src="https://unpkg.com/clipboard.js"></script>
6-
<link rel="stylesheet" href="/css/style.css" />
4+
<head>
5+
{% include seo-head.html %}
6+
{% seo %}
7+
8+
<!-- Theme CSS -->
9+
<link rel="stylesheet" href="{{ "/assets/main.css" | relative_url }}">
10+
11+
<script src="https://unpkg.com/clipboard.js"></script>
12+
</head>
713

814
<body>
915

0 commit comments

Comments
 (0)