Skip to content

Commit 38b77c0

Browse files
author
Skender Gashi
committed
fixed live reload
1 parent 4d80b43 commit 38b77c0

File tree

156 files changed

+551
-113
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

156 files changed

+551
-113
lines changed

Gemfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ gem 'coffee-script'
88
gem 'autoprefixer-rails'
99
gem 'mini_magick'
1010

11-
gem 'jekyll', '>=3.0'
11+
gem 'jekyll', '>=4.2'
1212

1313
# Jekyll Plugins
1414
gem 'jekyll-watch'
1515
gem 'jekyll-paginate'
1616
gem 'jekyll-feed'
17-
gem 'jekyll-assets'
1817
gem 'jekyll-sitemap'
1918
gem 'jekyll-scholar'
19+
gem 'liquid-tag-parser'
2020
# gem 'jekyll-archives'
2121

2222
gem 'jgd'

Gemfile.lock

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
addressable (2.8.4)
5+
public_suffix (>= 2.0.2, < 6.0)
6+
autoprefixer-rails (10.4.13.0)
7+
execjs (~> 2)
8+
bibtex-ruby (6.0.0)
9+
latex-decode (~> 0.0)
10+
citeproc (1.0.10)
11+
namae (~> 1.0)
12+
citeproc-ruby (1.1.14)
13+
citeproc (~> 1.0, >= 1.0.9)
14+
csl (~> 1.6)
15+
coffee-script (2.4.1)
16+
coffee-script-source
17+
execjs
18+
coffee-script-source (1.12.2)
19+
colorator (1.1.0)
20+
concurrent-ruby (1.2.2)
21+
csl (1.6.0)
22+
namae (~> 1.0)
23+
rexml
24+
csl-styles (1.0.1.11)
25+
csl (~> 1.0)
26+
em-websocket (0.5.3)
27+
eventmachine (>= 0.12.9)
28+
http_parser.rb (~> 0)
29+
eventmachine (1.2.7)
30+
execjs (2.8.1)
31+
extras (0.3.0)
32+
forwardable-extended (~> 2.5)
33+
ffi (1.15.5)
34+
forwardable-extended (2.6.0)
35+
google-protobuf (3.23.4-aarch64-linux)
36+
http_parser.rb (0.8.0)
37+
i18n (1.14.1)
38+
concurrent-ruby (~> 1.0)
39+
jekyll (4.3.2)
40+
addressable (~> 2.4)
41+
colorator (~> 1.0)
42+
em-websocket (~> 0.5)
43+
i18n (~> 1.0)
44+
jekyll-sass-converter (>= 2.0, < 4.0)
45+
jekyll-watch (~> 2.0)
46+
kramdown (~> 2.3, >= 2.3.1)
47+
kramdown-parser-gfm (~> 1.0)
48+
liquid (~> 4.0)
49+
mercenary (>= 0.3.6, < 0.5)
50+
pathutil (~> 0.9)
51+
rouge (>= 3.0, < 5.0)
52+
safe_yaml (~> 1.0)
53+
terminal-table (>= 1.8, < 4.0)
54+
webrick (~> 1.7)
55+
jekyll-feed (0.17.0)
56+
jekyll (>= 3.7, < 5.0)
57+
jekyll-paginate (1.1.0)
58+
jekyll-sass-converter (3.0.0)
59+
sass-embedded (~> 1.54)
60+
jekyll-scholar (7.1.3)
61+
bibtex-ruby (~> 6.0)
62+
citeproc-ruby (~> 1.0)
63+
csl-styles (~> 1.0)
64+
jekyll (~> 4.0)
65+
jekyll-sitemap (1.4.0)
66+
jekyll (>= 3.7, < 5.0)
67+
jekyll-watch (2.2.1)
68+
listen (~> 3.0)
69+
jgd (1.13.0)
70+
jekyll (>= 1.5.1)
71+
trollop (= 2.9.9)
72+
kramdown (2.4.0)
73+
rexml
74+
kramdown-parser-gfm (1.1.0)
75+
kramdown (~> 2.0)
76+
latex-decode (0.4.0)
77+
liquid (4.0.4)
78+
liquid-tag-parser (2.0.2)
79+
extras (~> 0.3)
80+
liquid (>= 3.0, < 5.0)
81+
listen (3.8.0)
82+
rb-fsevent (~> 0.10, >= 0.10.3)
83+
rb-inotify (~> 0.9, >= 0.9.10)
84+
mercenary (0.4.0)
85+
mini_magick (4.12.0)
86+
namae (1.1.1)
87+
pathutil (0.16.2)
88+
forwardable-extended (~> 2.6)
89+
public_suffix (5.0.3)
90+
rb-fsevent (0.11.2)
91+
rb-inotify (0.10.1)
92+
ffi (~> 1.0)
93+
rexml (3.2.6)
94+
rouge (4.1.2)
95+
safe_yaml (1.0.5)
96+
sass (3.7.4)
97+
sass-listen (~> 4.0.0)
98+
sass-embedded (1.64.1-aarch64-linux-gnu)
99+
google-protobuf (~> 3.23)
100+
sass-listen (4.0.0)
101+
rb-fsevent (~> 0.9, >= 0.9.4)
102+
rb-inotify (~> 0.9, >= 0.9.7)
103+
terminal-table (3.0.2)
104+
unicode-display_width (>= 1.1.1, < 3)
105+
trollop (2.9.9)
106+
uglifier (4.2.0)
107+
execjs (>= 0.3.0, < 3)
108+
unicode-display_width (2.4.2)
109+
webrick (1.8.1)
110+
111+
PLATFORMS
112+
aarch64-linux
113+
114+
DEPENDENCIES
115+
autoprefixer-rails
116+
coffee-script
117+
jekyll (>= 4.2)
118+
jekyll-feed
119+
jekyll-paginate
120+
jekyll-scholar
121+
jekyll-sitemap
122+
jekyll-watch
123+
jgd
124+
liquid-tag-parser
125+
mini_magick
126+
sass
127+
uglifier
128+
129+
RUBY VERSION
130+
ruby 3.2.2p53
131+
132+
BUNDLED WITH
133+
2.4.10

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
## Local Development
22

33
### Start Development Environment
4-
`docker run --rm -v "$PWD":/usr/src/app -w /usr/src/app ruby:3.2.2 bash -c "bundle config set --local path '/usr/src/app/vendor' && bundle install && bundle exec jekyll serve --livereload"`
4+
5+
`docker run --rm -p 35729:35729 -p 4000:4000 -v "$PWD":/usr/src/app -w /usr/src/app ruby:3.2.2 bash -c "bundle config set --local path '/usr/src/app/vendor' && bundle install && bundle exec jekyll serve --livereload --host=0.0.0.0"`

_assets/css/vendor/font-awesome/_mixins.scss

Lines changed: 0 additions & 26 deletions
This file was deleted.

_assets/css/vendor/font-awesome/_path.scss

Lines changed: 0 additions & 15 deletions
This file was deleted.

_config.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ exclude:
1919
- CONTRIBUTING.md
2020

2121
plugins:
22-
- jekyll-assets
2322
- jekyll-paginate
2423
- jekyll-feed
2524
- jekyll/scholar
@@ -50,7 +49,7 @@ assets:
5049
- '*.ttf'
5150
digest: true
5251
features:
53-
liquid: false
52+
liquid: true
5453
automatic_img_size: false
5554
automatic_img_alt: false
5655

_includes/after_footer.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<script src="/assets/custom.js" />
1+
<!--<script src="/assets/js/custom.js" />-->
22

33
<!-- {% if site.google_analytics_tracking_id %}
44
<script>

_includes/asides/github.html

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,30 @@ <h3 class="panel-title"><i class="fa fa-github fa-fw"></i>GitHub Repos</h3>
66
<p class="loading">Status updating...</p>
77
</div>
88
{% if site.data.github.show_profile_link %}
9-
<div class="panel-body gh-profile-link text-muted">
10-
<div class="pull-right">
11-
<a href="https://github.com/{{include.username}}">@{{include.username}}</a> on <i class="fa fa-github fa-fw"></i>GitHub
12-
</div>
9+
<div class="panel-body gh-profile-link text-muted">
10+
<div class="pull-right">
11+
<a href="https://github.com/{{include.username}}">@{{include.username}}</a> on <i
12+
class="fa fa-github fa-fw"></i>GitHub
1313
</div>
14+
</div>
1415
{% endif %}
1516
<script type="text/javascript">
16-
$(document).ready(function(){
17-
if (!window.jXHR){
18-
var jxhr = document.createElement('script');
19-
jxhr.type = 'text/javascript';
20-
jxhr.src = '{% asset_path vendor/jXHR %}';
21-
var s = document.getElementsByTagName('script')[0];
22-
s.parentNode.insertBefore(jxhr, s);
23-
}
17+
$(document).ready(function () {
18+
if (!window.jXHR) {
19+
var jxhr = document.createElement('script');
20+
jxhr.type = 'text/javascript';
21+
jxhr.src = '/_assets/js/vendor/jXHR.js';
22+
var s = document.getElementsByTagName('script')[0];
23+
s.parentNode.insertBefore(jxhr, s);
24+
}
2425

25-
github.showRepos({
26-
user: '{{ include.username }}',
27-
count: {{ site.data.github.repo_count }},
28-
skip_forks: {{ site.data.github.skip_forks }},
29-
target: '#gh_repos'
30-
});
26+
github.showRepos({
27+
user: '{{ include.username }}',
28+
count: '{{ site.data.github.repo_count }}',
29+
skip_forks: '{{ site.data.github.skip_forks }}',
30+
target: '#gh_repos'
31+
});
3132
});
3233
</script>
33-
{% js github %}
34+
<script src="/_assets/js/github.js"></script>
3435
</section>

_includes/head.html

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,20 @@
55
<meta name="viewport" content="width=device-width, initial-scale=1.0">
66
<meta name="description" content="{{ site.description }}">
77
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
8-
<link rel="stylesheet" href="/assets/css/main.css">
9-
<script src="/assets/js/vendor/jquery-1.12.0.js" />
8+
<link rel="stylesheet" href="/assets/css/styles.css">
9+
<script src="/assets/js/vendor/jquery-1.12.0.js"></script>
10+
<script src="/assets/js/vendor/bootstrap/affix.js"></script>
11+
<script src="/assets/js/vendor/bootstrap/alert.js"></script>
12+
<script src="/assets/js/vendor/bootstrap/button.js"></script>
13+
<script src="/assets/js/vendor/bootstrap/carousel.js"></script>
14+
<script src="/assets/js/vendor/bootstrap/collapse.js"></script>
15+
<script src="/assets/js/vendor/bootstrap/dropdown.js"></script>
16+
<script src="/assets/js/vendor/bootstrap/modal.js"></script>
17+
<script src="/assets/js/vendor/bootstrap/scrollspy.js"></script>
18+
<script src="/assets/js/vendor/bootstrap/tab.js"></script>
19+
<script src="/assets/js/vendor/bootstrap/transition.js"></script>
20+
<script src="/assets/js/vendor/bootstrap/tooltip.js"></script>
21+
<script src="/assets/js/vendor/bootstrap/popover.js"></script>
22+
<script src="/assets/js/vendor/jquery.githubRepoWidget.js"></script>
23+
<script src="/assets/js/custom.js"></script>
1024
</head>

_plugins/image.rb

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
module Jekyll
2+
module Tags
3+
class ImageTagError < StandardError
4+
def initialize(msg)
5+
super
6+
end
7+
end
8+
9+
class ImageTag < Liquid::Tag
10+
def initialize(tag_name, markup, tokens)
11+
@markup = markup.strip
12+
@markup = split_string_with_quotes(@markup)
13+
14+
# the source of the image
15+
@img = @markup[0].gsub("'", "").gsub('"', '')
16+
if(not @img.include? "/")
17+
@img = "/assets/images/#@img"
18+
end
19+
20+
# contains every attribute (i.e. alt or class)
21+
@attributes = ''
22+
23+
# gets the alt attribute
24+
@alt = @markup.select {|sub| sub.include? "alt:"}[0]
25+
26+
# gets the class attribute
27+
@class = @markup.select {|sub| sub.include? "class:"}[0]
28+
29+
if @alt != nil
30+
@alt[":"] = "="
31+
@alt.gsub("'", '"')
32+
@attributes += "#@alt "
33+
end
34+
35+
if @class != nil
36+
@class[":"] = "="
37+
@class.gsub("'", '"')
38+
@attributes += "#@class "
39+
end
40+
41+
42+
end
43+
def render(context)
44+
@img = Liquid::Template.parse(@img).render(context)
45+
"<img src=\"#@img\" #@attributes >"
46+
end
47+
end
48+
end
49+
end
50+
51+
# splits strings at spaces but not if the spaces are inside quotes
52+
def split_string_with_quotes(str)
53+
words = []
54+
current_word = ''
55+
in_quotes = false
56+
57+
str.each_char do |char|
58+
if char == ' ' && !in_quotes
59+
words << current_word unless current_word.empty?
60+
current_word = ''
61+
else
62+
current_word += char
63+
if char == '"' || char == "'"
64+
in_quotes = !in_quotes
65+
end
66+
end
67+
end
68+
69+
words << current_word unless current_word.empty?
70+
words
71+
end
72+
73+
Liquid::Template.register_tag('image', Jekyll::Tags::ImageTag)
74+
Liquid::Template.register_tag('img', Jekyll::Tags::ImageTag)

0 commit comments

Comments
 (0)