Skip to content

Commit

Permalink
Merge pull request #90 from LeNPaul/gem-theme
Browse files Browse the repository at this point in the history
Gem theme
  • Loading branch information
LeNPaul committed Jun 6, 2021
2 parents 11b60ed + a194a25 commit 17c03dd
Show file tree
Hide file tree
Showing 68 changed files with 550 additions and 1,966 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -4,3 +4,4 @@ Gemfile.lock
.sass-cache
.jekyll-metadata
.DS_Store
.jekyll-cache
31 changes: 2 additions & 29 deletions Gemfile
@@ -1,29 +1,2 @@
# source "https://rubygems.org"

# Hello! This is where you manage which Jekyll version is used to run.
# When you want to use a different version, change it below, save the
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
#
# bundle exec jekyll serve
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
gem "jekyll", "~> 3.6.2"

# This is the default theme for new Jekyll sites. You may change this to anything you like.
# gem "minima", "~> 2.0"

# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
# gem "github-pages", group: :jekyll_plugins

# If you have any plugins, put them here!
group :jekyll_plugins do
gem "jekyll-feed", "~> 0.6"
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
gem 'jekyll-paginate'
gem 'jekyll-sitemap'
gem 'jekyll-seo-tag'
source "https://rubygems.org"
gemspec
2 changes: 1 addition & 1 deletion LICENSE.md
@@ -1,6 +1,6 @@
# The MIT License (MIT)

Copyright (c) 2017 Paul Le
Copyright (c) 2021 Paul Le

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
8 changes: 4 additions & 4 deletions _config.yml
Expand Up @@ -16,13 +16,13 @@ paginate: 5
# Build settings
markdown: kramdown
highlighter: rouge
permalink: none
permalink: /:title
plugins: [jekyll-paginate, jekyll-sitemap, jekyll-feed, jekyll-seo-tag]

# Customise atom feed settings (this is where Jekyll-Feed gets configuration information)
title: 'Your Site Name'
description: 'with a cool subheading'
author: 'You!'
title: 'Lagrange'
description: 'a minimalist Jekyll theme'
author: 'Paul Le'

# RSS 2.0 can be used instead of Atom by uncommenting following two lines
#feed:
Expand Down
18 changes: 9 additions & 9 deletions _data/settings.yml
@@ -1,22 +1,22 @@
# Change 'comments' to true for Disqus comments
disqus:
comments: false
disqus_shortname: ''
disqus_shortname: 'https-lenpaul-github-io-lagrange'

# If you are not using Google Analytics, please change 'google-ID' to an empty string
google-ID: ''
google-ID: 'UA-112060364-1'

menu:
- {name: 'About', path: 'menu', url: 'about.html'}
- {name: 'Writing', path: 'menu', url: 'writing.html'}
- {name: 'Contact', path: 'menu', url: 'contact.html'}
- {name: 'About', url: 'about.html'}
- {name: 'Writing', url: 'writing.html'}
- {name: 'Contact', url: 'contact.html'}

# Available social icons are powered by Font Awesome, so you can use any icon that they offer
social:
- {icon: 'github', link: ''}
- {icon: 'twitter', link: ''}
- {icon: 'linkedin', link: ''}
- {icon: 'envelope', link: 'mailto:'}
- {icon: 'github', link: 'https://www.github.com/lenpaul'}
- {icon: 'twitter', link: 'https://twitter.com/paululele'}
- {icon: 'linkedin', link: 'http://www.linkedin.com/in/lenpaul/'}
- {icon: 'envelope', link: 'mailto:l.nguyen.paul@gmail.com'}
- {icon: 'rss-square', link: '/feed.xml'}
# - {icon: 'rss-square', link: '/rss-feed.xml'}

Expand Down
4 changes: 2 additions & 2 deletions _includes/footer.html
@@ -1,4 +1,4 @@
<footer class="footer">
{% include social-icons.html %}
<div class="post-date"><a href="{{ site.github.url }}/menu/about.html">{{ site.title }} | {{ site.description }} by {{ site.author }}</a></div>
</footer>
<div class="footer-description"><a href="{{ site.github.url }}/">{{ site.title }} | {{ site.description }} by {{ site.author }}</a></div>
</footer>
1 change: 0 additions & 1 deletion _includes/google-analytics.html
Expand Up @@ -3,7 +3,6 @@
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', '{{ site.data.settings.google-ID }}', 'auto');
ga('send', 'pageview');
</script>
8 changes: 0 additions & 8 deletions _includes/head.html
@@ -1,29 +1,24 @@
<head>

<title>
{% if page.title == "Home" %}
{{ site.title }} | {{ site.description }}
{% else %}
{{ page.title }} | {{ site.title }}
{% endif %}
</title>

<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="utf-8">

<link rel="stylesheet" href="{{ site.github.url }}/assets/css/main.css">
<link rel="stylesheet" href="{{ site.github.url }}/assets/css/syntax.css">
<!-- Use Atom -->
{% feed_meta %}
<!-- Use RSS-2.0 -->
<!--<link href="{{ site.github.url }}/rss-feed.xml" type="application/rss+xml" rel="alternate" title="{{ site.title }} | {{ site.description }}"/>
//-->

<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Serif:400,400italic,700%7CPT+Sans:400">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Code+Pro">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Quattrocento+Sans">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">

<script type="text/javascript" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-MML-AM_CHTML">
MathJax.Hub.Config({
Expand All @@ -32,11 +27,8 @@
}
});
</script>

<!-- Google Analytics -->
{% include google-analytics.html %}

<!-- Use Jekyll SEO plugin -->
{% seo %}

</head>
6 changes: 3 additions & 3 deletions _includes/header.html
@@ -1,7 +1,7 @@
<header class="masthead">
<h3 class="masthead-title">
<header class="header">
<h3 class="header-title">
<a href="{{ site.github.url }}/">{{ site.title }}</a>
<small class="masthead-subtitle">{{ site.description }}</small>
<small class="header-subtitle">{{ site.description }}</small>
{% include menu.html %}
</h3>
</header>
2 changes: 1 addition & 1 deletion _includes/menu.html
@@ -1,7 +1,7 @@
<div class="menu">
<nav class="menu-content">
{% for item in site.data.settings.menu %}
<a href="{{ site.github.url }}/{{ item.path }}/{{ item.url }}">{{ item.name }}</a>
<a href="{{ site.github.url }}/{{ item.url }}">{{ item.name }}</a>
{% endfor %}
</nav>
<nav class="social-icons">
Expand Down
22 changes: 0 additions & 22 deletions docs/_layouts/post.html → _includes/post-date.html 100755 → 100644
@@ -1,17 +1,3 @@
---
layout: default
---

<h1>
{{ page.title }}
</h1>

{% if page.image %}
<img src="{{ site.github.url }}/assets/img/{{ page.image }}">
{% endif %}

{{ content }}

<span class="post-date">
{{ site.data.settings.post_date_prefix }}
{% assign d = page.date | date: "%-d" %}
Expand All @@ -29,11 +15,3 @@ <h1>
{{ site.author }}
{% endif %}
</span>

{% include social-sharing.html %}

{% include related-posts.html %}

{% if site.data.settings.disqus.comments %}
{% include disqus.html %}
{% endif %}
1 change: 0 additions & 1 deletion _includes/read-time.html
Expand Up @@ -8,7 +8,6 @@
{{ words | divided_by:180 }} minute read
{% endif %}
{% endif %}

{% if post.layout == post %}
{% assign words = content | number_of_words %}
{% if words < 180 %}
Expand Down
13 changes: 7 additions & 6 deletions docs/menu/writing.md → _layouts/archive.html 100755 → 100644
@@ -1,10 +1,13 @@
---
layout: page
title: Writing
layout: default
---
<ul class="posts">
{% for post in site.posts %}

<h1>
{{ page.title }}
</h1>

<ul class="posts-container">
{% for post in site.posts %}
{% unless post.next %}
<h3>{{ post.date | date: '%Y' }}</h3>
{% else %}
Expand All @@ -14,11 +17,9 @@ <h3>{{ post.date | date: '%Y' }}</h3>
<h3>{{ post.date | date: '%Y' }}</h3>
{% endif %}
{% endunless %}

<li itemscope>
<a href="{{ site.github.url }}{{ post.url }}">{{ post.title }}</a>
<p class="post-date"><span><i class="fa fa-calendar" aria-hidden="true"></i> {{ post.date | date: "%B %-d" }} - <i class="fa fa-clock-o" aria-hidden="true"></i> {% include read-time.html %}</span></p>
</li>

{% endfor %}
</ul>
25 changes: 9 additions & 16 deletions _layouts/default.html
@@ -1,20 +1,13 @@
<!doctype html>
<html>

{% include head.html %}

<body>

<div class="container">
{% include header.html %}

<div class="post-container">
{{ content }}
{% include head.html %}
<body>
<div class="container">
{% include header.html %}
<div class="content-container">
{{ content }}
</div>
{% include footer.html %}
</div>

{% include footer.html %}

</div>

</body>
</body>
</html>
29 changes: 13 additions & 16 deletions _layouts/home.html
@@ -1,33 +1,30 @@
---
layout: default
title: Home
---

{% for post in paginator.posts %}
<div class="posts">
<h1>
<a href="{{ site.github.url }}{{ post.url }}">{{ post.title }}</a>
</h1>
{% if post.image %}
<div class="thumbnail-container">
<a href="{{ site.github.url }}{{ post.url }}"><img src="{{ site.github.url }}/assets/img/{{ post.image }}"></a>
<div class="posts-container">
<h1>
<a href="{{ site.github.url }}{{ post.url }}">{{ post.title }}</a>
</h1>
{% if post.image %}
<div class="thumbnail-container">
<a href="{{ site.github.url }}{{ post.url }}"><img src="{{ site.github.url }}/assets/img/{{ post.image }}"></a>
</div>
{% endif %}
<p>
{{ post.content | strip_html | truncate: 350 }} <a href="{{ site.github.url }}{{ post.url }}">Read more</a>
<span class="post-date"><i class="fa fa-calendar" aria-hidden="true"></i> {{ post.date | date_to_string }} - <i class="fa fa-clock-o" aria-hidden="true"></i> {% include read-time.html %}</span>
</p>
</div>
{% endif %}
<p>
{{ post.content | strip_html | truncate: 350 }} <a href="{{ site.github.url }}{{ post.url }}">Read more</a>
<span class="post-date"><i class="fa fa-calendar" aria-hidden="true"></i> {{ post.date | date_to_string }} - <i class="fa fa-clock-o" aria-hidden="true"></i> {% include read-time.html %}</span>
</p>
</div>
{% endfor %}

<!-- Pagination links -->
<div class="pagination">
{% if paginator.next_page %}
<a class="pagination-button pagination-active next" href="{{ site.github.url }}{{ paginator.next_page_path }}">{{ site.data.settings.pagination.previous_page }}</a>
{% else %}
<span class="pagination-button">{{ site.data.settings.pagination.previous_page }}</span>
{% endif %}

{% if paginator.previous_page %}
<a class="pagination-button pagination-active" href="{{ site.baseurl }}{{ paginator.previous_page_path }}">{{ site.data.settings.pagination.next_page }}</a>
{% else %}
Expand Down
5 changes: 3 additions & 2 deletions _layouts/page.html
Expand Up @@ -5,5 +5,6 @@
<h1>
{{ page.title }}
</h1>

{{ content }}
<article>
{{ content }}
</article>
38 changes: 12 additions & 26 deletions _layouts/post.html
Expand Up @@ -5,35 +5,21 @@
<h1>
{{ page.title }}
</h1>

{% if page.image %}
<img src="{{ site.github.url }}/assets/img/{{ page.image }}">
{% endif %}

{{ content }}

<span class="post-date">
{{ site.data.settings.post_date_prefix }}
{% assign d = page.date | date: "%-d" %}
{{ page.date | date: "%B" }}
{% case d %}
{% when '1' or '21' or '31' %}{{ d }}st
{% when '2' or '22' %}{{ d }}nd
{% when '3' or '23' %}{{ d }}rd
{% else %}{{ d }}th{% endcase %},
{{ page.date | date: "%Y" }}
by
{% if page.author %}
{{ page.author }}
{% else %}
{{ site.author }}
{% endif %}
</span>

{% include social-sharing.html %}

{% include related-posts.html %}

<article>
{{ content }}
</article>
{% if site.hide_post_date != true %}
{% include post-date.html %}
{% endif %}
{% if site.hide_post_share != true %}
{% include social-sharing.html %}
{% endif %}
{% if site.hide_related_posts != true %}
{% include related-posts.html %}
{% endif %}
{% if site.data.settings.disqus.comments %}
{% include disqus.html %}
{% endif %}
10 changes: 0 additions & 10 deletions _posts/2010-04-04-sample.md

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 6 additions & 0 deletions _sass/_-sections-dir.scss
@@ -0,0 +1,6 @@
@import "base",
"code",
"default",
"home",
"post",
"social-icons"

0 comments on commit 17c03dd

Please sign in to comment.