Skip to content

Commit

Permalink
Add TOC plugin and use relative links
Browse files Browse the repository at this point in the history
  • Loading branch information
gd-codes committed Dec 14, 2023
1 parent 7d9bc49 commit 7699a15
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 17 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ group :jekyll_plugins do
gem 'jekyll-paginate'
gem 'jekyll-seo-tag'
gem 'jekyll-archives'
gem 'jekyll-toc'
gem 'kramdown'
gem 'rouge'
end
Expand Down
13 changes: 12 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ GEM
jekyll (>= 3.8, < 5.0)
jekyll-sitemap (1.4.0)
jekyll (>= 3.7, < 5.0)
jekyll-toc (0.18.0)
jekyll (>= 3.9)
nokogiri (~> 1.12)
jekyll-watch (2.2.1)
listen (~> 3.0)
kramdown (2.3.1)
Expand All @@ -53,9 +56,16 @@ GEM
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.4.0)
mini_portile2 (2.8.4)
nokogiri (1.15.4)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
nokogiri (1.15.4-x64-mingw32)
racc (~> 1.4)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (4.0.6)
racc (1.7.1)
rb-fsevent (0.10.4)
rb-inotify (0.10.1)
ffi (~> 1.0)
Expand All @@ -81,9 +91,10 @@ DEPENDENCIES
jekyll-paginate
jekyll-seo-tag
jekyll-sitemap
jekyll-toc
kramdown
rouge
webrick (~> 1.7)

BUNDLED WITH
2.2.3
2.2.26
5 changes: 5 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ title: "AstroThoughts"
description: "Blog of the Space Technology and Astronomy Cell"
logo: 'assets/images/logo.png'
favicon: 'assets/images/logo.png'
url: 'https://stac.iitmandi.co.in'
baseurl: /blog
google_analytics: 'UA-46278016-1'
disqus: 'demowebsite'
Expand Down Expand Up @@ -71,6 +72,7 @@ plugins:
- jekyll-feed
- jekyll-seo-tag
- jekyll-archives
- jekyll-toc

# Archives
jekyll-archives:
Expand Down Expand Up @@ -103,3 +105,6 @@ adsense-data-ad-slot: "1363087678"
lazyimages: "enabled"

exclude: [changelog.md, LICENSE.txt, README.md, Gemfile, Gemfile.lock]

toc:
ordered_list: true
10 changes: 5 additions & 5 deletions _includes/featuredbox.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
<div class="col-12 col-md-12 col-lg-5 pr-lg-0">
<div class="h-100">
<div class="wrapthumbnail">
<a href="{{ post.url | absolute_url }}">
<a href="{{ post.url | relative_url }}">
{% if site.lazyimages == "enabled" %}
<img class="featured-box-img-cover lazyimg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAACCAQAAAA3fa6RAAAADklEQVR42mNkAANGCAUAACMAA2w/AMgAAAAASUVORK5CYII=" data-src="{% if post.image contains "://" %}{{ post.image }}{% else %}{{ post.image | absolute_url }}{% endif %}">
<img class="featured-box-img-cover lazyimg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAACCAQAAAA3fa6RAAAADklEQVR42mNkAANGCAUAACMAA2w/AMgAAAAASUVORK5CYII=" data-src="{% if post.image contains "://" %}{{ post.image }}{% else %}{{ post.image | relative_url }}{% endif %}">
{% else %}
<img class="featured-box-img-cover" src="{% if post.image contains "://" %}{{ post.image }}{% else %}{{ post.image | absolute_url }}{% endif %}">
<img class="featured-box-img-cover" src="{% if post.image contains "://" %}{{ post.image }}{% else %}{{ post.image | relative_url }}{% endif %}">
{% endif %}
</a>
</div>
Expand All @@ -21,7 +21,7 @@
<div class="card">
<div class="card-body">
<h2 class="card-title">
<a class="text-dark" href="{{ post.url | absolute_url }}">{{ post.title }}</a>
<a class="text-dark" href="{{ post.url | relative_url }}">{{ post.title }}</a>
{% if post.rating %}
<div class="mb-2 mt-2 font-weight-normal">
{% include star_rating_postbox.html %}
Expand All @@ -46,7 +46,7 @@ <h4 class="card-text">{{ post.excerpt | strip_html | truncatewords:25 }}</h4>
{% endif %}
<span class="post-date">{{ post.date | date_to_string }}</span>
</span>
<span class="post-read-more"><a href="{{ post.url | absolute_url }}" title="Read Story"><svg class="svgIcon-use" width="25" height="25" viewbox="0 0 25 25"><path d="M19 6c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v14.66h.012c.01.103.045.204.12.285a.5.5 0 0 0 .706.03L12.5 16.85l5.662 4.126a.508.508 0 0 0 .708-.03.5.5 0 0 0 .118-.285H19V6zm-6.838 9.97L7 19.636V6c0-.55.45-1 1-1h9c.55 0 1 .45 1 1v13.637l-5.162-3.668a.49.49 0 0 0-.676 0z" fill-rule="evenodd"></path></svg></a></span>
<span class="post-read-more"><a href="{{ post.url | relative_url }}" title="Read Story"><svg class="svgIcon-use" width="25" height="25" viewbox="0 0 25 25"><path d="M19 6c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v14.66h.012c.01.103.045.204.12.285a.5.5 0 0 0 .706.03L12.5 16.85l5.662 4.126a.508.508 0 0 0 .708-.03.5.5 0 0 0 .118-.285H19V6zm-6.838 9.97L7 19.636V6c0-.55.45-1 1-1h9c.55 0 1 .45 1 1v13.637l-5.162-3.668a.49.49 0 0 0-.676 0z" fill-rule="evenodd"></path></svg></a></span>
<div class="clearfix"></div>
</div>
</div>
Expand Down
10 changes: 5 additions & 5 deletions _includes/postbox.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@
<div class="col-lg-4 col-md-6 mb-30px card-group">
<div class="card h-100">
<div class="maxthumb">
<a href="{{ post.url | absolute_url }}">
<a href="{{ post.url | relative_url }}">
{% if post.image %}

{% if site.lazyimages == "enabled" %}
<img class="img-fluid lazyimg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAACCAQAAAA3fa6RAAAADklEQVR42mNkAANGCAUAACMAA2w/AMgAAAAASUVORK5CYII=" data-src="{% if post.image contains "://" %}{{ post.image }}{% else %}{{ post.image | absolute_url }}{% endif %}" alt="{{ post.title }}">
<img class="img-fluid lazyimg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAACCAQAAAA3fa6RAAAADklEQVR42mNkAANGCAUAACMAA2w/AMgAAAAASUVORK5CYII=" data-src="{% if post.image contains "://" %}{{ post.image }}{% else %}{{ post.image | relative_url }}{% endif %}" alt="{{ post.title }}">
{% else %}
<img class="img-fluid" src="{% if post.image contains "://" %}{{ post.image }}{% else %}{{ post.image | absolute_url }}{% endif %}" alt="{{ post.title }}">
<img class="img-fluid" src="{% if post.image contains "://" %}{{ post.image }}{% else %}{{ post.image | relative_url }}{% endif %}" alt="{{ post.title }}">
{% endif %}

{% endif %}
</a>
</div>
<div class="card-body">
<h2 class="card-title">
<a class="text-dark" href="{{ post.url | absolute_url }}">{{ post.title }}</a>
<a class="text-dark" href="{{ post.url | relative_url }}">{{ post.title }}</a>
{% if post.rating %}
<div class="mb-2 mt-2 font-weight-normal">
{% include star_rating_postbox.html %}
Expand All @@ -42,7 +42,7 @@ <h4 class="card-text">{{ post.excerpt | strip_html | truncatewords:30 }}</h4>
{% endif %}
<span class="post-date">{{ post.date | date_to_string }}</span>
</span>
<span class="post-read-more"><a href="{{ post.url | absolute_url }}" title="Read Story"><svg class="svgIcon-use" width="25" height="25" viewbox="0 0 25 25"><path d="M19 6c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v14.66h.012c.01.103.045.204.12.285a.5.5 0 0 0 .706.03L12.5 16.85l5.662 4.126a.508.508 0 0 0 .708-.03.5.5 0 0 0 .118-.285H19V6zm-6.838 9.97L7 19.636V6c0-.55.45-1 1-1h9c.55 0 1 .45 1 1v13.637l-5.162-3.668a.49.49 0 0 0-.676 0z" fill-rule="evenodd"></path></svg></a></span>
<span class="post-read-more"><a href="{{ post.url | relative_url }}" title="Read Story"><svg class="svgIcon-use" width="25" height="25" viewbox="0 0 25 25"><path d="M19 6c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v14.66h.012c.01.103.045.204.12.285a.5.5 0 0 0 .706.03L12.5 16.85l5.662 4.126a.508.508 0 0 0 .708-.03.5.5 0 0 0 .118-.285H19V6zm-6.838 9.97L7 19.636V6c0-.55.45-1 1-1h9c.55 0 1 .45 1 1v13.637l-5.162-3.668a.49.49 0 0 0-.676 0z" fill-rule="evenodd"></path></svg></a></span>
<div class="clearfix"></div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ <h1 class="sitetitle">{{ site.name }}</h1>
================================================== -->
<div class="alertbar">
<div class="container text-center">
<span><img src="{{ site.baseurl }}/{{ site.logo }}" alt="{{site.title}}"> &nbsp; Never miss a <b>story</b> from us, subscribe to our newsletter</span>
<span><img src="{{ site.baseurl }}/{{ site.logo }}" alt="{{site.title}}" height="50px"> &nbsp; Never miss a <b>story</b> from us, subscribe to our newsletter</span>
<form action="{{site.mailchimp-list}}" method="post" name="mc-embedded-subscribe-form" class="wj-contact-form validate" target="_blank" novalidate>
<div class="mc-field-group">
<input type="email" placeholder="Email" name="EMAIL" class="required email" id="mce-EMAIL" autocomplete="on" required>
Expand Down
8 changes: 4 additions & 4 deletions _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ <h1 class="posttitle">{{ page.title }}</h1>
{% if page.image %}

{% if site.lazyimages == "enabled" %}
<img class="featured-image img-fluid lazyimg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAACCAQAAAA3fa6RAAAADklEQVR42mNkAANGCAUAACMAA2w/AMgAAAAASUVORK5CYII=" data-src="{% if page.image contains "://" %}{{ page.image }}{% else %}{{ page.image | absolute_url }}{% endif %}" alt="{{ page.title }}">
<img class="featured-image img-fluid lazyimg" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAACCAQAAAA3fa6RAAAADklEQVR42mNkAANGCAUAACMAA2w/AMgAAAAASUVORK5CYII=" data-src="{% if page.image contains "://" %}{{ page.image }}{% else %}{{ page.image | relative_url }}{% endif %}" alt="{{ page.title }}">
{% else %}
<img class="featured-image img-fluid" src="{% if page.image contains "://" %}{{ page.image }}{% else %}{{ page.image | absolute_url }}{% endif %}" alt="{{ page.title }}">
<img class="featured-image img-fluid" src="{% if page.image contains "://" %}{{ page.image }}{% else %}{{ page.image | relative_url }}{% endif %}" alt="{{ page.title }}">
{% endif %}

{% endif %}
Expand Down Expand Up @@ -123,10 +123,10 @@ <h3 class="font-weight-bold">Summary</h3>
<!-- Prev/Next -->
<div class="row PageNavigation d-flex justify-content-between font-weight-bold">
{% if page.previous.url %}
<a class="prev d-block col-md-6" href="{{page.previous.url | absolute_url}}"> &laquo; {{page.previous.title}}</a>
<a class="prev d-block col-md-6" href="{{page.previous.url | relative_url}}"> &laquo; {{page.previous.title}}</a>
{% endif %}
{% if page.next.url %}
<a class="next d-block col-md-6 text-lg-right" href="{{page.next.url | absolute_url}}">{{page.next.title}} &raquo; </a>
<a class="next d-block col-md-6 text-lg-right" href="{{page.next.url | relative_url}}">{{page.next.title}} &raquo; </a>
{% endif %}
<div class="clearfix"></div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ <h2><span>Featured</span></h2>
</div>
</section>

{% endif %} -->
{% endif %}

<!-- Posts Index
================================================== -->
Expand Down

0 comments on commit 7699a15

Please sign in to comment.