Skip to content

Commit 189adfe

Browse files
🚀 Enhances site CI and configuration
Updates CI workflow to use newer versions of actions and Ruby. Adds Jekyll configuration file and related includes/assets for enabling Google AdSense and other site enhancements. Improves .gitignore by adding common Jekyll and IDE generated files.
1 parent d809d77 commit 189adfe

18 files changed

+319
-45
lines changed

.github/workflows/website.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: 'Blog de Daniel Monettelli - CI'
1+
name: "Blog de Daniel Monettelli - CI"
22
on:
33
push:
44
branches:
@@ -37,12 +37,12 @@ jobs:
3737

3838
- name: Setup Pages
3939
id: pages
40-
uses: actions/configure-pages@v3
40+
uses: actions/configure-pages@v4
4141

4242
- name: Setup Ruby
4343
uses: ruby/setup-ruby@v1
4444
with:
45-
ruby-version: 3.2
45+
ruby-version: 3.3
4646
bundler-cache: true
4747

4848
- name: Build site
@@ -53,11 +53,11 @@ jobs:
5353
- name: Test site
5454
run: |
5555
bundle exec htmlproofer _site \
56-
\-\-disable-external=true \
56+
\-\-disable-external \
5757
\-\-ignore-urls "/^http:\/\/127.0.0.1/,/^http:\/\/0.0.0.0/,/^http:\/\/localhost/"
5858
5959
- name: Upload site artifact
60-
uses: actions/upload-pages-artifact@v1
60+
uses: actions/upload-pages-artifact@v3
6161
with:
6262
path: "_site${{ steps.pages.outputs.base_path }}"
6363

@@ -70,4 +70,4 @@ jobs:
7070
steps:
7171
- name: Deploy to GitHub Pages
7272
id: deployment
73-
uses: actions/deploy-pages@v2
73+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Gemfile.lock
55

66
# Jekyll cache
77
.jekyll-cache
8+
.jekyll-metadata
89
_site
910

1011
# RubyGems
@@ -16,7 +17,11 @@ package-lock.json
1617

1718
# IDE configurations
1819
.idea
19-
.vscode
20+
.vscode/*
21+
!.vscode/settings.json
22+
!.vscode/extensions.json
23+
!.vscode/tasks.json
2024

2125
# Misc
26+
_sass/vendors
2227
assets/js/dist

Gemfile

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,13 @@
22

33
source "https://rubygems.org"
44

5-
gem "jekyll-theme-chirpy", "~> 6.4", ">= 6.4.2"
5+
gem "jekyll-theme-chirpy", "~> 7.3"
66

7-
group :test do
8-
gem "html-proofer", "~> 4.4"
9-
end
7+
gem "html-proofer", "~> 5.0", group: :test
108

11-
# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
12-
# and associated library.
139
platforms :mingw, :x64_mingw, :mswin, :jruby do
1410
gem "tzinfo", ">= 1", "< 3"
1511
gem "tzinfo-data"
1612
end
1713

18-
# Performance-booster for watching directories on Windows
19-
gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]
20-
21-
# Lock `http_parser.rb` gem to `v0.6.x` on JRuby builds since newer versions of the gem
22-
# do not have a Java counterpart.
23-
gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby]
14+
gem "wdm", "~> 0.2.0", :platforms => [:mingw, :x64_mingw, :mswin]

_config.yml

Lines changed: 67 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,34 @@ lang: es-ES
1111
# Change to your timezone › https://kevinnovak.github.io/Time-Zone-Picker
1212
timezone: America/Lima
1313

14+
# Google AdSense configuration
15+
google_adsense: "ca-pub-7596549899792751" # Tu ID de cliente de Google AdSense
16+
adsense:
17+
enabled: true # Activar/desactivar globalmente AdSense
18+
auto_ads: true # Habilitar anuncios automáticos
19+
# Configuración para mostrar anuncios en distintos lugares
20+
show_in_posts: true # Mostrar anuncios en posts
21+
show_in_pages: false # No mostrar en páginas estáticas
22+
1423
# jekyll-seo-tag settings › https://github.com/jekyll/jekyll-seo-tag/blob/master/docs/usage.md
1524
# ↓ --------------------------
1625

17-
title: Blog de Daniel Monettelli
26+
title: Blog de Daniel Monettelli # the main title
1827

19-
tagline: Perspectivas frescas del mundo de .NET MAUI. # it will display as the sub-title
28+
tagline: Perspectivas frescas del mundo de .NET MAUI. # it will display as the subtitle
2029

2130
description: >- # used by seo meta and the atom feed
2231
Perspectivas frescas del mundo de .NET MAUI.
2332
2433
# Fill in the protocol & hostname for your site.
25-
# e.g. 'https://username.github.io', note that it does not end with a '/'.
34+
# E.g. 'https://username.github.io', note that it does not end with a '/'.
2635
url: "https://blogdedanielmonettelli.github.io"
2736

2837
github:
29-
username: danielmonettelli # change to your github username
38+
username: danielmonettelli # change to your GitHub username
3039

3140
twitter:
32-
username: DaniMonettelli # change to your twitter username
41+
username: DaniMonettelli # change to your Twitter username
3342

3443
social:
3544
# Change to your full name.
@@ -38,19 +47,44 @@ social:
3847
email: danielmonetelli@hotmail.com # change to your email address
3948
links:
4049
# The first element serves as the copyright owner's link
41-
- https://twitter.com/DaniMonettelli # change to your twitter homepage
42-
- https://blogdedanielmonettelli.github.io # change to your github homepage
50+
- https://twitter.com/DaniMonettelli # change to your Twitter homepage
51+
- https://blogdedanielmonettelli.github.io # change to your GitHub homepage
4352
# Uncomment below to add more social links
4453
# - https://www.facebook.com/username
4554
# - https://www.linkedin.com/in/username
4655

47-
google_site_verification: TeYzsLRqfADe2XETO1Gjub3g15Z9PuU6x71gXaaU-wo # fill in to your verification string
56+
# Site Verification Settings
57+
webmaster_verifications:
58+
google: "TeYzsLRqfADe2XETO1Gjub3g15Z9PuU6x71gXaaU-wo" # fill in your Google verification code
59+
bing: # fill in your Bing verification code
60+
alexa: # fill in your Alexa verification code
61+
yandex: # fill in your Yandex verification code
62+
baidu: # fill in your Baidu verification code
63+
facebook: # fill in your Facebook verification code
4864

4965
# ↑ --------------------------
5066
# The end of `jekyll-seo-tag` settings
5167

52-
google_analytics:
53-
id: "G-5DTSLJLHZK" # fill in your Google Analytics ID
68+
# Web Analytics Settings
69+
analytics:
70+
google:
71+
id: "G-5DTSLJLHZK" # fill in your Google Analytics ID
72+
goatcounter:
73+
id: # fill in your GoatCounter ID
74+
umami:
75+
id: # fill in your Umami ID
76+
domain: # fill in your Umami domain
77+
matomo:
78+
id: # fill in your Matomo ID
79+
domain: # fill in your Matomo domain
80+
cloudflare:
81+
id: "a5c519103107448faf2a841d7cc9fb9d" # fill in your Cloudflare Web Analytics token
82+
fathom:
83+
id: # fill in your Fathom Site ID
84+
85+
# Page views settings
86+
pageviews:
87+
provider: # now only supports 'goatcounter'
5488

5589
# Prefer color scheme setting.
5690
#
@@ -60,17 +94,17 @@ google_analytics:
6094
#
6195
# Available options:
6296
#
63-
# light - Use the light color scheme
64-
# dark - Use the dark color scheme
97+
# light Use the light color scheme
98+
# dark Use the dark color scheme
6599
#
66-
theme_mode: # [light|dark]
100+
theme_mode: # [light | dark]
67101

68-
# The CDN endpoint for images.
102+
# The CDN endpoint for media resources.
69103
# Notice that once it is assigned, the CDN url
70-
# will be added to all image (site avatar & posts' images) paths starting with '/'
104+
# will be added to all media resources (site avatar, posts' images, audio and video files) paths starting with '/'
71105
#
72106
# e.g. 'https://cdn.com'
73-
img_cdn: "https://raw.githubusercontent.com/blogdedanielmonettelli/blogdedanielmonettelli.github.io/main/assets/images/"
107+
cdn: "https://raw.githubusercontent.com/blogdedanielmonettelli/blogdedanielmonettelli.github.io/main/assets/images/"
74108

75109
# the avatar on sidebar, support local or CORS resources
76110
avatar: "Daniel_Monettelli.png"
@@ -83,8 +117,9 @@ social_preview_image: # string, local or CORS resources
83117
toc: true
84118

85119
comments:
86-
active: "giscus" # The global switch for posts comments, e.g., 'disqus'. Keep it empty means disable
87-
# The active options are as follows:
120+
# Global switch for the post-comment system. Keeping it empty means disabled.
121+
provider: "giscus" # [disqus | utterances | giscus]
122+
# The provider options are as follows:
88123
disqus:
89124
shortname: # fill with the Disqus shortname. › https://help.disqus.com/en/articles/1717111-what-s-a-shortname
90125
# utterances settings › https://utteranc.es/
@@ -98,6 +133,7 @@ comments:
98133
category: Q&A # <category>
99134
category_id: DIC_kwDOJCvoiM4CUfUZ # <gh-category-id>
100135
mapping: title # optional, default to 'pathname'
136+
strict: # optional, default to '0'
101137
input_position: # optional, default to 'bottom'
102138
lang: es # optional, default to the value of `site.lang`
103139
reactions_enabled: # optional, default to the value of `1`
@@ -108,10 +144,17 @@ assets:
108144
enabled: # boolean, keep empty means false
109145
# specify the Jekyll environment, empty means both
110146
# only works if `assets.self_host.enabled` is 'true'
111-
env: # [development|production]
147+
env: # [development | production]
112148

113149
pwa:
114-
enabled: true # the option for PWA feature
150+
enabled: true # The option for PWA feature (installable)
151+
cache:
152+
enabled: true # The option for PWA offline cache
153+
# Paths defined here will be excluded from the PWA cache.
154+
# Usually its value is the `baseurl` of another website that
155+
# shares the same domain name as the current website.
156+
deny_paths:
157+
# - "/example" # URLs match `<SITE_URL>/example/*` will not be cached by the PWA
115158

116159
paginate: 10
117160

@@ -121,6 +164,7 @@ baseurl: ""
121164
# ------------ The following options are not recommended to be modified ------------------
122165

123166
kramdown:
167+
footnote_backlink: "&#8617;&#xfe0e;"
124168
syntax_highlighter: rouge
125169
syntax_highlighter_opts: # Rouge Options › https://github.com/jneen/rouge#full-options
126170
css_class: highlight
@@ -161,10 +205,6 @@ defaults:
161205
path: assets/img/favicons
162206
values:
163207
swcache: true
164-
- scope:
165-
path: assets/js/dist
166-
values:
167-
swcache: true
168208

169209
sass:
170210
style: compressed
@@ -185,8 +225,9 @@ exclude:
185225
- tools
186226
- README.md
187227
- LICENSE
188-
- rollup.config.js
189-
- package*.json
228+
- purgecss.js
229+
- "*.config.js"
230+
- "package*.json"
190231

191232
jekyll-archives:
192233
enabled: [categories, tags]

_includes/ad-display.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{% if site.google_adsense %}
2+
<div class="ad-container">
3+
<ins class="adsbygoogle"
4+
style="display:block"
5+
data-ad-client="{{ site.google_adsense }}"
6+
data-ad-slot="{{ include.ad_slot }}"
7+
data-ad-format="auto"
8+
data-full-width-responsive="true"></ins>
9+
<script>
10+
(adsbygoogle = window.adsbygoogle || []).push({});
11+
</script>
12+
</div>
13+
{% endif %}

_includes/adsense.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{% if site.google_adsense %}
2+
<!-- Google AdSense Code -->
3+
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client={{ site.google_adsense }}" crossorigin="anonymous"></script>
4+
{% endif %}

_includes/head-adsense.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{% if site.adsense.enabled %}
2+
{% include adsense.html %}
3+
4+
{% if site.adsense.auto_ads %}
5+
<script>
6+
(adsbygoogle = window.adsbygoogle || []).push({
7+
google_ad_client: "{{ site.google_adsense }}",
8+
enable_page_level_ads: true
9+
});
10+
</script>
11+
{% endif %}
12+
{% endif %}

_includes/head-custom.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<!-- Inyección de Google AdSense en el head -->
2+
{% include head-adsense.html %}
3+
4+
<!-- Estilos para anuncios -->
5+
<link rel="stylesheet" href="{{ '/assets/css/adsense.css' | relative_url }}">

_includes/post-adsense.html

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{% if site.adsense.enabled and page.ads != false %}
2+
{% if include.location == 'top' %}
3+
<div class="post-ad-top ad-container">
4+
<ins class="adsbygoogle"
5+
style="display:block"
6+
data-ad-client="{{ site.google_adsense }}"
7+
data-ad-format="horizontal"
8+
data-full-width-responsive="true"></ins>
9+
<script>
10+
(adsbygoogle = window.adsbygoogle || []).push({});
11+
</script>
12+
</div>
13+
{% elsif include.location == 'bottom' %}
14+
<div class="post-ad-bottom ad-container">
15+
<ins class="adsbygoogle"
16+
style="display:block"
17+
data-ad-client="{{ site.google_adsense }}"
18+
data-ad-format="horizontal"
19+
data-full-width-responsive="true"></ins>
20+
<script>
21+
(adsbygoogle = window.adsbygoogle || []).push({});
22+
</script>
23+
</div>
24+
{% elsif include.location == 'inline' %}
25+
<div class="post-ad-inline ad-container">
26+
<ins class="adsbygoogle"
27+
style="display:block"
28+
data-ad-client="{{ site.google_adsense }}"
29+
data-ad-format="auto"
30+
data-full-width-responsive="true"></ins>
31+
<script>
32+
(adsbygoogle = window.adsbygoogle || []).push({});
33+
</script>
34+
<div class="ad-separator"></div>
35+
</div>
36+
{% endif %}
37+
{% endif %}

assets/css/adsense.css

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/* Estilos para los contenedores de anuncios */
2+
.ad-container {
3+
text-align: center;
4+
margin: 2rem auto;
5+
overflow: hidden;
6+
max-width: 100%;
7+
}
8+
9+
/* Asegurarse de que los anuncios son responsivos */
10+
.ad-container ins.adsbygoogle {
11+
margin: 0 auto;
12+
}
13+
14+
/* Separador para anuncios en artículos */
15+
.ad-separator {
16+
margin: 2rem 0;
17+
border-bottom: 1px solid #f0f0f0;
18+
}
19+
20+
/* Anuncios en la barra lateral */
21+
.ad-sidebar {
22+
margin-bottom: 2rem;
23+
}

0 commit comments

Comments
 (0)