Skip to content

Commit 3e2b970

Browse files
committed
Major Site Update: 19 Fixes and Updates - 2024
1 parent 5daca79 commit 3e2b970

20 files changed

+127
-134
lines changed

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
## 2024 - 2nd March 2024 - Saturday
2+
Happy New Year 2024! Staring to maintain a simple changelog for the blog.
3+
4+
#### Breaking changes
5+
- Discord supports old and new invite code styles
6+
- Be explicit about jekyll version to fix github action
7+
- Add webrick to gemspec because it isnt included in ruby3 anymore
8+
- Update gem versions to what GitHub Pages uses
9+
- Replace var with let or const in javascript
10+
- Fixed bug where hovering over search results showed the string {desc}
11+
- Add support for header-extra parameter
12+
- Remove duplicate css
13+
- Pagination: change arrows to fontawesome and dont show text on small screens
14+
- Use slash instead of empty string for absolute url, try to fix links in 'jekyll build'
15+
- Made the footer stick to the bottom
16+
- Post navigation: move arrow to correct location
17+
- Bug fix: escape characters in url in searchjson
18+
- Simplify header html
19+
- Change role=main to main tag
20+
- Fix layouy bug where code blocks dont scroll horizontally
21+
- Add a title-on-all-pages site option
22+
- Add a title-off-on-page site option (Custom Solution)
23+
- Updated Search Bar

Gemfile.lock

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,29 @@ PATH
22
remote: .
33
specs:
44
beautiful-jekyll-theme (5.0.0)
5-
jekyll (~> 3.8)
5+
jekyll (~> 3.9.3)
66
jekyll-paginate (~> 1.1)
77
jekyll-sitemap (~> 1.4)
8-
kramdown (~> 2.3.0)
8+
kramdown (~> 2.3.2)
99
kramdown-parser-gfm (~> 1.1)
1010

1111
GEM
1212
remote: https://rubygems.org/
1313
specs:
14-
addressable (2.8.1)
14+
addressable (2.8.6)
1515
public_suffix (>= 2.0.2, < 6.0)
1616
colorator (1.1.0)
17-
concurrent-ruby (1.2.0)
17+
concurrent-ruby (1.2.3)
1818
em-websocket (0.5.3)
1919
eventmachine (>= 0.12.9)
2020
http_parser.rb (~> 0)
2121
eventmachine (1.2.7)
22-
ffi (1.15.5)
22+
ffi (1.16.3)
2323
forwardable-extended (2.6.0)
2424
http_parser.rb (0.8.0)
25-
i18n (1.12.0)
25+
i18n (1.14.1)
2626
concurrent-ruby (~> 1.0)
27-
jekyll (3.9.3)
27+
jekyll (3.9.5)
2828
addressable (~> 2.4)
2929
colorator (~> 1.0)
3030
em-websocket (~> 0.5)
@@ -49,18 +49,18 @@ GEM
4949
kramdown-parser-gfm (1.1.0)
5050
kramdown (~> 2.0)
5151
liquid (4.0.4)
52-
listen (3.8.0)
52+
listen (3.9.0)
5353
rb-fsevent (~> 0.10, >= 0.10.3)
5454
rb-inotify (~> 0.9, >= 0.9.10)
5555
mercenary (0.3.6)
5656
pathutil (0.16.2)
5757
forwardable-extended (~> 2.6)
58-
public_suffix (5.0.1)
58+
public_suffix (5.0.4)
5959
rake (12.3.3)
6060
rb-fsevent (0.11.2)
6161
rb-inotify (0.10.1)
6262
ffi (~> 1.0)
63-
rexml (3.2.5)
63+
rexml (3.2.6)
6464
rouge (3.30.0)
6565
safe_yaml (1.0.5)
6666
sass (3.7.4)
@@ -72,6 +72,7 @@ GEM
7272

7373
PLATFORMS
7474
arm64-darwin-22
75+
arm64-darwin-23
7576

7677
DEPENDENCIES
7778
beautiful-jekyll-theme!
@@ -80,4 +81,4 @@ DEPENDENCIES
8081
webrick (~> 1.8)
8182

8283
BUNDLED WITH
83-
2.3.11
84+
2.3.26

_config.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ social-network-links:
8989
# mastodon: instance.url/@username
9090
# ORCID: your ORCID ID
9191
# google-scholar: your google scholar
92-
# discord: invite/invite_code or users/userid
92+
# discord: "invite_code" or "users/userid" or "invite/invite_code"
9393
# kaggle: yourname
9494
# hackerrank: yourname
9595

@@ -112,6 +112,12 @@ share-links-active:
112112
# Remove this if you don't want a link in the footer
113113
url-pretty: "anudit.in"
114114

115+
# Show the site title in the <title> of all pages in addition to the page title
116+
title-on-all-pages: true
117+
118+
# Hide the site title in the <title> of a page in addition to the page title
119+
title-off-on-page: false
120+
115121
# Excerpt word length - Truncate the excerpt of each post on the feed page to the specified number of words
116122
excerpt_length: 50
117123

_includes/footer-minimal.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
{% if site.url-pretty %}
1414
&nbsp;&nbsp;&bull;&nbsp;&nbsp;
15-
<a href="{{ '' | absolute_url }}">{{ site.url-pretty }}</a>
15+
<a href="{{ '/' | absolute_url }}">{{ site.url-pretty }}</a>
1616
{% endif %}
1717
</div>
1818
</footer>

_includes/footer.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
{% if site.url-pretty %}
2121
&nbsp;&bull;&nbsp;
2222
<span class="author-site">
23-
<a href="{% if site.url-canonical %}{{ site.url-canonical }}{% else %}{{ '' | absolute_url }}{% endif %}">{{ site.url-pretty }}</a>
23+
<a href="{% if site.url-canonical %}{{ site.url-canonical }}{% else %}{{ '/' | absolute_url }}{% endif %}">{{ site.url-pretty }}</a>
2424
</span>
2525
{% endif %}
2626

_includes/head.html

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<meta charset="utf-8">
33
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
44

5-
{% capture title %}
5+
{% capture pagetitle %}
66
{%- if page.use-site-title -%}
77
{{ site.title | strip_html | xml_escape }} {{ site.title-separator }} {{ site.share-title }}
88
{%- elsif page.share-title -%}
@@ -14,6 +14,14 @@
1414
{%- endif -%}
1515
{% endcapture %}
1616

17+
{% capture title %}
18+
{%- if page.title-off-on-page -%}
19+
{{ pagetitle }}
20+
{%- elsif site.title and site.title-on-all-pages and (site.title != pagetitle) -%}
21+
{{ pagetitle }} | {{ site.title }}
22+
{%- endif -%}
23+
{% endcapture %}
24+
1725
{% capture description %}
1826
{%- if page.use-site-title -%}
1927
{{ site.meta-description | strip_html | xml_escape }}

_includes/header.html

Lines changed: 16 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
1-
<!-- TODO this file has become a mess, refactor it -->
2-
31
{% assign date_format = site.date_format | default: "%B %-d, %Y" %}
42

5-
{% if page.cover-img or page.title %}
6-
73
{% if page.cover-img %}
84
<div id="header-big-imgs" data-num-img={% if page.cover-img.first %}{{ page.cover-img.size }}{% else %}1{% endif %}
95
{% for bigimg in page.cover-img %}
106
{% assign imgnum = forloop.index %}
117
{% for imginfo in bigimg %}
12-
{% if imginfo[0] %}
8+
{% if imginfo[0] %}
139
data-img-src-{{ imgnum }}="{{ imginfo[0] | absolute_url }}"
1410
data-img-desc-{{ imgnum }}="{{ imginfo[1] }}"
1511
{% else %}
@@ -21,44 +17,8 @@
2117
{% endif %}
2218

2319
<header class="header-section {% if page.cover-img %}has-img{% endif %}">
24-
{% if page.cover-img %}
25-
<div class="big-img intro-header">
26-
<div class="container-md">
27-
<div class="row">
28-
<div class="col-xl-8 offset-xl-2 col-lg-10 offset-lg-1">
29-
<div class="{{ include.type }}-heading">
30-
<!-- Using page.meta-title instead of page.title to display "Hi, I'm Anudit" on the home page. -->
31-
<h1>{% if page.meta-title %}{{ page.meta-title | strip_html }}{% else %}<br/>{% endif %}</h1>
32-
<!-- <h1>{% if page.title %}{{ page.title | strip_html }}{% else %}<br/>{% endif %}</h1> -->
33-
{% if page.subtitle %}
34-
{% if include.type == "page" %}
35-
<hr class="small">
36-
<span class="{{ include.type }}-subheading">{{ page.subtitle | strip_html }}</span>
37-
{% else %}
38-
<h2 class="{{ include.type }}-subheading">{{ page.subtitle | strip_html }}</h2>
39-
{% endif %}
40-
{% endif %}
41-
42-
{% if include.type == "post" %}
43-
<span class="post-meta">Posted on {{ page.date | date: date_format }}</span>
44-
{% if page.last-updated %}
45-
<span class="post-meta">
46-
<span class="d-none d-md-inline middot">&middot;</span>
47-
Last updated {{ page.last-updated | date: date_format }}
48-
</span>
49-
{% endif %}
50-
{% if page.readtime %}
51-
{% include readtime.html %}
52-
{% endif %}
53-
{% endif %}
54-
</div>
55-
</div>
56-
</div>
57-
</div>
58-
<span class='img-desc'></span>
59-
</div>
60-
{% endif %}
61-
<div class="intro-header no-img">
20+
<div class="intro-header {% if page.cover-img %} big-img {% endif %}">
21+
{% if page.cover-img or page.title %}
6222
<div class="container-md">
6323
<div class="row">
6424
<div class="col-xl-8 offset-xl-2 col-lg-10 offset-lg-1">
@@ -72,8 +32,11 @@ <h1>{% if page.title %}{{ page.title | strip_html }}{% else %}<br/>{% endif %}</
7232
<h2 class="{{ include.type }}-subheading">{{ page.subtitle | strip_html }}</h2>
7333
{% endif %}
7434
{% endif %}
75-
76-
{% if include.type == "post" %}
35+
36+
{% if include.type == "post" %}
37+
{% if page.author %}
38+
By <strong>{{ page.author | strip_html }}</strong><br>
39+
{% endif%}
7740
<span class="post-meta">Posted on {{ page.date | date: date_format }}</span>
7841
{% if page.last-updated %}
7942
<span class="post-meta">
@@ -89,10 +52,14 @@ <h2 class="{{ include.type }}-subheading">{{ page.subtitle | strip_html }}</h2>
8952
</div>
9053
</div>
9154
</div>
55+
{% endif %}
56+
{% if page.cover-img %}<span class='img-desc'></span>{% endif %}
9257
</div>
93-
</header>
9458

95-
96-
{% else %}
97-
<div class="intro-header"></div>
59+
{% if page.header-extra %}
60+
{% for file in page.header-extra %}
61+
{% include {{ file }} %}
62+
{% endfor %}
9863
{% endif %}
64+
65+
</header>

_includes/nav.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<nav class="navbar navbar-expand-xl navbar-light fixed-top navbar-custom {% if page.nav-short %}top-nav-short-permanent{% else %}top-nav-regular{% endif %}">
22

33
{%- if site.title-img -%}
4-
<a class="navbar-brand navbar-brand-logo" href="{{ '' | absolute_url }}"><img alt="{{ site.title }} Logo" src="{{ site.title-img | relative_url}}"/></a>
4+
<a class="navbar-brand navbar-brand-logo" href="{{ '/' | absolute_url }}"><img alt="{{ site.title }} Logo" src="{{ site.title-img | relative_url}}"/></a>
55
{%- elsif site.title -%}
6-
<a class="navbar-brand" href="{{ '' | absolute_url }}">{{ site.title }}</a>
6+
<a class="navbar-brand" href="{{ '/' | absolute_url }}">{{ site.title }}</a>
77
{%- endif -%}
88

99
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#main-navbar" aria-controls="main-navbar" aria-expanded="false" aria-label="Toggle navigation">
@@ -50,7 +50,7 @@
5050
{% if site.avatar and page.show-avatar != false %}
5151
<div class="avatar-container">
5252
<div class="avatar-img-border">
53-
<a href="{{ '' | absolute_url }}">
53+
<a href="{{ '/' | absolute_url }}">
5454
<img alt="Navigation bar avatar" class="avatar-img" src="{{ site.avatar | relative_url }}" />
5555
</a>
5656
</div>

_includes/search.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,16 @@
1212
{% for post in site.posts %} \
1313
{ \
1414
"title" : "{% if post.title != "" %}{{ post.title | strip_html | escape }}{% else %}{{ post.excerpt | strip_html | escape | strip }}{%endif%}", \
15+
"desc" : "{% if post.title != "" %}{{ post.title | strip_html | escape }}{% else %}{{ post.excerpt | strip_html | escape | strip }}{%endif%}", \
1516
"category" : "{{ post.tags | join: \', \' }}", \
16-
"url" : "{{ site.baseurl }}{{ post.url }}", \
17+
"url" : "{{ site.baseurl }}{{ post.url | escape }}", \
1718
"date" : "{{ post.date | date: "%B %e, %Y" | default: "January 1, 1970" }}" \
1819
}, \
1920
{% endfor %} \
2021
{% for page in site.html_pages %}{% if page.title != "{title}" and page.title != "404 - Page not found" %} \
2122
{ \
2223
"title" : "{% if page.title != "" %}{{ page.title | strip_html | escape }}{% else %}{{ page.excerpt | strip_html | escape | strip }}{% endif %}", \
24+
"desc" : "{% if page.title != "" %}{{ page.title | strip_html | escape }}{% else %}{{ page.excerpt | strip_html | escape | strip }}{% endif %}", \
2325
"category" : "{% if page.tags %}{{ page.tags | join: \', \' }}{% else %}page{% endif %}", \
2426
"url" : "{{ site.baseurl }}{{ page.url }}", \
2527
"date" : "{{ page.date | date: '%B %e, %Y' | default: "January 1, 1970" }}" \

_includes/social-networks-links.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@
302302

303303
{%- if site.social-network-links.discord -%}
304304
<li class="list-inline-item">
305-
<a href="https://discord.com/{{ site.social-network-links.discord }}" title="Discord">
305+
<a href="https://discord.com/{{discord_url_prefix}}{{site.social-network-links.discord}}" title="Discord">
306306
<span class="fa-stack fa-lg" aria-hidden="true">
307307
<i class="fas fa-circle fa-stack-2x"></i>
308308
<i class="fab fa-discord fa-stack-1x fa-inverse"></i>

0 commit comments

Comments
 (0)