Skip to content

Commit

Permalink
add post-thumbnail, add ToC, update style-sheet, code formatted, bug …
Browse files Browse the repository at this point in the history
…fixed
  • Loading branch information
Deep0Thinking committed Jan 10, 2024
1 parent f0aa9e7 commit 685d747
Show file tree
Hide file tree
Showing 42 changed files with 4,567 additions and 245 deletions.
7 changes: 7 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# frozen_string_literal: true

source "https://rubygems.org"
gemspec

gem "minima", ENV["JEKYLL_VERSION"] if ENV["JEKYLL_VERSION"]
gem 'jekyll-toc'
91 changes: 91 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
PATH
remote: .
specs:
minima (2.5.1)
jekyll (>= 3.5, < 5.0)
jekyll-feed (~> 0.9)
jekyll-seo-tag (~> 2.1)

GEM
remote: https://rubygems.org/
specs:
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
colorator (1.1.0)
concurrent-ruby (1.2.2)
em-websocket (0.5.3)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0)
eventmachine (1.2.7)
ffi (1.16.3)
forwardable-extended (2.6.0)
google-protobuf (3.25.1-arm64-darwin)
http_parser.rb (0.8.0)
i18n (1.14.1)
concurrent-ruby (~> 1.0)
jekyll (4.3.3)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
i18n (~> 1.0)
jekyll-sass-converter (>= 2.0, < 4.0)
jekyll-watch (~> 2.0)
kramdown (~> 2.3, >= 2.3.1)
kramdown-parser-gfm (~> 1.0)
liquid (~> 4.0)
mercenary (>= 0.3.6, < 0.5)
pathutil (~> 0.9)
rouge (>= 3.0, < 5.0)
safe_yaml (~> 1.0)
terminal-table (>= 1.8, < 4.0)
webrick (~> 1.7)
jekyll-feed (0.17.0)
jekyll (>= 3.7, < 5.0)
jekyll-sass-converter (3.0.0)
sass-embedded (~> 1.54)
jekyll-seo-tag (2.8.0)
jekyll (>= 3.8, < 5.0)
jekyll-toc (0.18.0)
jekyll (>= 3.9)
nokogiri (~> 1.12)
jekyll-watch (2.2.1)
listen (~> 3.0)
kramdown (2.4.0)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liquid (4.0.4)
listen (3.8.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.4.0)
nokogiri (1.16.0-arm64-darwin)
racc (~> 1.4)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (5.0.4)
racc (1.7.3)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
rexml (3.2.6)
rouge (4.2.0)
safe_yaml (1.0.5)
sass-embedded (1.69.7-arm64-darwin)
google-protobuf (~> 3.25)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
unicode-display_width (2.5.0)
webrick (1.8.1)

PLATFORMS
arm64-darwin-22
ruby

DEPENDENCIES
bundler
jekyll-toc
minima!

BUNDLED WITH
2.5.4
5 changes: 4 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@

title: Please-type-your-Github-name-here's Blog

remote_theme: Jekyll/Minima
remote_theme: jekyll/minima

show_description: true

header_pages:
- all-tags.md
- archive.md
- about.md

plugins:
- jekyll-toc
6 changes: 6 additions & 0 deletions _includes/custom-head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{% comment %}
Placeholder to allow defining custom head, in principle, you can add anything here, e.g. favicons:

1. Head over to https://realfavicongenerator.net/ to add your own favicons.
2. Customize default _includes/custom-head.html in your source directory and insert the given code snippet.
{% endcomment %}
6 changes: 3 additions & 3 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
{%- seo -%}

<link rel="stylesheet" href="{{ "/assets/css/style.css" | relative_url }}">
{%- feed_meta -%}

{%- if jekyll.environment == 'production' and site.google_analytics -%}
{%- include google-analytics.html -%}
{%- endif -%}
Expand All @@ -19,4 +19,4 @@

<link rel="shortcut icon" type="image/x-icon" href="{{ site.baseurl }}/favicon/favicon.ico">

</head>
</head>
31 changes: 31 additions & 0 deletions _includes/header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<header class="site-header">
<div class="wrapper">
{%- assign default_paths = site.pages | map: "path" -%}
{%- assign page_paths = site.header_pages | default: default_paths -%}
{%- assign titles_size = site.pages | map: 'title' | join: '' | size -%}
<a class="site-title" rel="author" href="{{ "/" | relative_url }}">{{ site.title | escape }}</a>

{%- if titles_size > 0 -%}
<nav class="site-nav">
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger">
<span class="menu-icon">
<svg viewBox="0 0 18 15" width="18px" height="15px">
<path d="M18,1.484c0,0.82-0.665,1.484-1.484,1.484H1.484C0.665,2.969,0,2.304,0,1.484l0,0C0,0.665,0.665,0,1.484,0 h15.032C17.335,0,18,0.665,18,1.484L18,1.484z M18,7.516C18,8.335,17.335,9,16.516,9H1.484C0.665,9,0,8.335,0,7.516l0,0 c0-0.82,0.665-1.484,1.484-1.484h15.032C17.335,6.031,18,6.696,18,7.516L18,7.516z M18,13.516C18,14.335,17.335,15,16.516,15H1.484 C0.665,15,0,14.335,0,13.516l0,0c0-0.82,0.665-1.483,1.484-1.483h15.032C17.335,12.031,18,12.695,18,13.516L18,13.516z"/>
</svg>
</span>
</label>

<div class="trigger">
{%- for path in page_paths -%}
{%- assign my_page = site.pages | where: "path", path | first -%}
{%- if my_page.title -%}
<a class="page-link" href="{{ my_page.url | relative_url }}">{{ my_page.title | escape }}</a>
{%- endif -%}
{%- endfor -%}
</div>
</nav>
{%- endif -%}
</div>
</header>

5 changes: 4 additions & 1 deletion _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,13 @@

<main class="page-content" aria-label="Content">
<div class="wrapper" style="text-align: justify;">
{% toc %}
{{ content }}
</div>
</main>

</body>

</html>
<script src="assets/js/custom-styles.js"></script>

</html>
22 changes: 19 additions & 3 deletions _layouts/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
---

<div class="home">

{%- if page.title -%}
<h1 class="page-heading">{{ page.title }}</h1>
{%- endif -%}
Expand Down Expand Up @@ -43,7 +43,23 @@ <h3>
<br><br>

{%- if site.show_description -%}
{{ post.description }}
<div class="post-info">

<!-- Post Thumbnail -->
{%- if post.thumbnail -%}
<div class="post-thumbnail">
<img src="{{ post.thumbnail }}" alt="Post Thumbnail">
</div>
{%- endif -%}

<!-- Description -->
{%- if post.description -%}
<div class="post-description">
{{ post.description }}
</div>
{%- endif -%}

</div>
{%- endif -%}

</li>
Expand Down Expand Up @@ -71,4 +87,4 @@ <h3>

{%- endif -%}

</div>
</div>
2 changes: 1 addition & 1 deletion _layouts/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ <h1 class="post-title">{{ page.title | escape }}</h1>
{{ content }}
</div>

</article>
</article>
Loading

0 comments on commit 685d747

Please sign in to comment.